Joined: 16 May 2001 Posts: 72 Location: Edinburgh, UK
Hi,
We're currently testing a medium throughput application where we have 10 threads getting from a queue using JMS_CorrelationId as a selector and we're finding that it is not performant. The incoming messages are running at around 5 per second! We've got a Session per thread so it doesn't looking like as if it's a sync problem.
Anyone else had this problem and is there any way to speed it up? At a guess I think JMS is browsing every message on every thread and evaluating the selector on that (ie not using the index to get the message!)...groan!
Does this really mean we can't use JMS for multithreaded high throughput apps?!
Nobody ever replied to you, and you've probably moved on alot, but your message came up in my search for "JMS selectors". I have a similar problem where a package is using JMS selectors to filter messages that match a certain criteria - in my case a JMS property that identifies the package's "API" that needs to be invoked. When loaded with messages, CPU resource quickly hits 100% and it appears that the JMS layer has to do a get with browse to select each message in turn and then perform its filtering, rather than base MQ doing this for you. Their tip on using the selector as described below might assist you.
The statement from IBM is:
----------
This is a known problem with using JMS.
It must be remembered that JMS API is not the same as MQ API and they work
in different ways.
Using JMS Queuereceiver with a selector the client application retrieves
all messages and inspects them to check if they match the selection
criterion.
This is not the same as retrieving a message by CorrelID using MQ API where
the queue manager selects the message and passes it to the client.
However there is an optimization to the JMS API where you can specify the
JMSCorrelationID using 'ID:'+hexstring and this will improve the
performance.
See the Using Java manual Chapter 12 for information on the use of
selectors.
---------- _________________ Regards
John
The pain of low quaility far outlasts the joy of low price.
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum