This content has been marked as final. Show 7 replies
any comment is very welcome.
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)
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.
Have you tried calling recoverSession? This is supposed to request that all unacknowledged messages be redelivered, without having to close the session and open a new one. I don't know if it guarantees in what order the messages are redelivered.
hi this i navee,
i am also facing same problem,
when some times my messageListner is not firing onMessage() method .
even though messages are in queue, after restarting the server all messages getting cleared.
how to procedd in this problme, is problem with sun java JMS?
please help me in this case.