thank you tabish! You've mentioned the key point. For some reason I have to set the prefetch size=0 in my connection string(jms.prefetchPolicy.queuePrefetch=0). That's no wonder why I always receive null message while I call receveNoWait().
I will call receive(timeout) instead. thanks again! -- View this message in context: http://activemq.2283324.n4.nabble.com/consumer-receiveNoWait-question-tp4656435p4656616.html Sent from the ActiveMQ - User mailing list archive at Nabble.com.