activemq-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stephen Vincent <Stephen.Vinc...@sas.com>
Subject JMS java client having trouble receiving with message selector
Date Fri, 10 Dec 2010 16:53:23 GMT
       My JMS java client creates one consumer with a message selector and works fine when
receiving messages from WebSphere MQ.   But seldom works when receiving from a queue on ActiveMQ
5.3.1 and 5.4.1.  Most of the time I don't get any messages.  I can consistently get it to
work *IF* I am stepping through the java code using the debugger in Eclipse and I have "?jms.prefetchPolicy.queuePrefetch=1"
added to my jndi provider URL.  I only have one consumer, so I don't think it is a flow control
or maxPageSize issue.  However, given that it works when under the debugger, then it may be
something like that.

       In my test case, I put 50 messages on the queue, where every third message should match
on my selector, which compares against JMSCorrelationID.  (eg. JMSCorrelationID = '223456789ABCDEF012345622'
)

        I have seen it work a few times outside of the debugger, but it fails most of the
time.  I am currently running this test case on Windows XP, Java spec version 1.6.0_21, class
version 50.0.

        I am able to use the activemq-admin command line tool to get messages using a selector.
 For example:

    activemq-admin browse --amqurl tcp://localhost:61616 --msgsel " JMSCorrelationID = '223456789ABCDEF012345622'"
request

However, my JMS compliant Java application is having trouble doing it.  Obviously my app is
doing something different.  If you have any ideas of what might be causing this, please let
me know.

Thanks,
sv

sasasasasasasasasasasasasasasasasasasasasasasasasasasasasasasasas
Stephen Vincent
Platform R&D
Tel: + 1 919 531 7556
stephen.vincent@sas.com
SAS ... THE POWER TO KNOW




Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message