ZF-11644: Zend_Queue_Adapter_Activemq : Timout problems occur when i try to receive more messages than existing in the queue

Description

Hello,

I have created a consumer which tries to receive 5 messages per call.

The problem occurs in the receive function when the loop continues to call $this->_client->receive() whereas no more messages are in the queue.

I have seen that you're calling the "$this->_client->canRead()" method only before the beginning of the loop.

I have personnally added the following test in the beginning of the loop : if(!$this->_client->canRead()) { break; } This allows to stop the loop when the stream is empty...

Comments

No comments to display