deep problem with messeges that remain inside queue and .....
Hi
Thank you for reading my post.
I have a problem with using mq version 4.1 .
here is what i am doing:
Create a queue,
Create a connection and connect to queue.
use Client_acknowledge mode.
Start the connection and listener will process the messages.
problem is that sometimes it does not pick up any message from the queue and meanwhile i see (using imqcmd ) that there are tens of messages inside the Queue.
also it sometimes it process for example 1500 message and 100-200 message remain inside the queue.
for test purpose i am sending same message into the queue so, it processor want to fail then all of those message should remain in the queue.
I should mention that when I traced the application execution and it does not enter the OnMessage of the listener (when i have message inside the queue)
does any one faced such problem?
thanks
[929 byte] By [
Legolas.wa] at [2007-11-27 5:12:51]

# 3
How are you retrieving the message ?
If you are using receiveNoWait() and calling it immediately after creating the receiver its possible that the messages are in transient. In MQ, a message is only returned if it is immediately available by the client (and it may take some period of time for the first message to be delivered to the client from the broker). We have an RFE to cause noWait to block if a message "would" be available however it is not implemented at this time (or planned for any current release)
If you aren't using receiveNoWait(), are you using multiple consumers ?MQ batches messages to a consumer based on the setting of the consumerFlowLimit setting on the destination. By default this is 1000. For example, if you send 1010 messages and started two receivers the first might have 1000 messages routed to it while the second would get only 10. (its possible that they may be more evenly divided but this is the worst case). If you think you are running into this problem, you should decrease the consumerFlowControlLimit to 1 to see if that helps the problem. (you can later tune this variable based on how the system performs, a higher number will improve performance on a loaded system)
# 4
Hi
Thank you very much for reply.
I am not using receiveNoWait() or receive method, i am using listener interface and i implement onMessage method to process messages.
problem is that it does not pick up messages sometimes, and sometimes some messages are inside queue after it process a fair number of messages.
so problem is:
- it client does not pick up messages sometimes in the startup of client.
- some messages are stocked into queue after sometimes that client works and are not delivered.
I should say that i am using multiple connections and for each connection i have a listener and a thread.
Thanks