> > I did call this code in a kind of stress test 5000 times! > > 4964 times the message was received, > 26 times the message receive(25) delivered null
Was the message always available on the brokers queue when you called consumer.receive(25)? Have you tried extending the timeout on receive() or putting a short sleep between sending and consuming the msg? Is it really related to using msg selectors? I presume your broker is a separate JVM process. Even though ActiveMQ will only send back a producer ack once it has persisted the msg (and hence has pretty much put it on the queue) I still wonder if this is a timing issue. A short sleep between send and receive should confirm or correct this. Torsten Mielke tors...@fusesource.com tmie...@blogspot.com