|
RSS Feed - WebSphere MQ Support
|
RSS Feed - Message Broker Support
|
 |
|
JMS MessageProducer very slow writing to Cluster Queue |
« View previous topic :: View next topic » |
Author |
Message
|
khookguy |
Posted: Tue Mar 30, 2004 2:44 pm Post subject: JMS MessageProducer very slow writing to Cluster Queue |
|
|
Novice
Joined: 14 Jan 2002 Posts: 13
|
I'm tearing my hair out with this. Any help would be much appreciated.
Whenever I invoke MessageProducer.send() where the MessageProducer has been defined on a Cluster Queue, it takes about 5 seconds for the send method to return. However, producing message to a local queue is quick.
Below is script that sets up the cluster.
** **** MSQC commands to set up the Client ****
** Make the QMGR a Cluster Repository
ALTER QMGR REPOS(EAI)
** Join the EAI cluster
DEFINE CHANNEL(TO.EAI_CLIENT) CHLTYPE(CLUSRCVR) +
TRPTYPE(TCP) CONNAME('eai-client2.javector.com') +
CLUSTER(EAI) +
DESCR('Cluster-receiver channel for QM_eai_client') +
REPLACE
DEFINE CHANNEL(TO.EAI_SERVER) CHLTYPE(CLUSSDR) TRPTYPE(TCP) +
CONNAME('javector-server.javector.com') CLUSTER(EAI) +
DESCR('Cluster-sender channel going to QM_eai_server') +
REPLACE
** Define local queue to receive responses
DEFINE QLOCAL('EAI_RESPONSES') REPLACE +
CLUSTER(EAI) +
DESCR('For receiving responses from services') +
DEFPSIST(YES) SHARE |
|
Back to top |
|
 |
khookguy |
Posted: Wed Mar 31, 2004 10:51 am Post subject: MessageListener was the culprit! |
|
|
Novice
Joined: 14 Jan 2002 Posts: 13
|
Sorry to reply to my own post, but I figured this out and I'm wondering if anyone else has had a similar experience.
It turned out that when I got rid of the MessageListener that I was using on the Queue Manager that was trying to send to the cluster queue, my performance went through the roof. Maybe the MessageListener was blocking the mechanism by which messages get put to a cluster queue?!?!
Anybody got any ideas that might shed some light on this behavior?
Thanks,
Mark |
|
Back to top |
|
 |
bower5932 |
Posted: Wed Mar 31, 2004 12:29 pm Post subject: |
|
|
 Jedi Knight
Joined: 27 Aug 2001 Posts: 3023 Location: Dallas, TX, USA
|
When you say MessageListener, do you mean the asynchronous listener (ie, the onMessage)? Also, is your listener doing anything with message selectors? |
|
Back to top |
|
 |
khookguy |
Posted: Fri Apr 02, 2004 11:50 am Post subject: |
|
|
Novice
Joined: 14 Jan 2002 Posts: 13
|
Yes, I mean the "onMessage" interface instance you register with a MessageConsumer via JMS.
As I've discovered, the JMS Session object is not thread-safe. Therefore, my error (described above) was to register a message listener on this session and then use the same session to try to send messages via a MessageProducer. The JMS specification prohibits this, but you can still write code to do it, and at least in this instance, MQ doesn't throw any runtime exception. It just wipes out performance because the session thread is dedicated to the listener. Probably, there are other contact admin side effects as well .....
bower5932 wrote: |
When you say MessageListener, do you mean the asynchronous listener (ie, the onMessage)? Also, is your listener doing anything with message selectors? |
|
|
Back to top |
|
 |
|
|
 |
|
Page 1 of 1 |
|
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
|
|
|
|