ASG
IBM
Zystems
Cressida
Icon
Netflexity
 
  MQSeries.net
Search  Search       Tech Exchange      Education      Certifications      Library      Info Center      SupportPacs      LinkedIn  Search  Search                                                                   FAQ  FAQ   Usergroups  Usergroups
 
Register  ::  Log in Log in to check your private messages
 
RSS Feed - WebSphere MQ Support RSS Feed - Message Broker Support

MQSeries.net Forum Index » IBM MQ Java / JMS » JMS MessageProducer very slow writing to Cluster Queue

Post new topic  Reply to topic
 JMS MessageProducer very slow writing to Cluster Queue « View previous topic :: View next topic » 
Author Message
khookguy
PostPosted: Tue Mar 30, 2004 2:44 pm    Post subject: JMS MessageProducer very slow writing to Cluster Queue Reply with quote

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
View user's profile Send private message Send e-mail
khookguy
PostPosted: Wed Mar 31, 2004 10:51 am    Post subject: MessageListener was the culprit! Reply with quote

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
View user's profile Send private message Send e-mail
bower5932
PostPosted: Wed Mar 31, 2004 12:29 pm    Post subject: Reply with quote

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
View user's profile Send private message Send e-mail Visit poster's website AIM Address Yahoo Messenger
khookguy
PostPosted: Fri Apr 02, 2004 11:50 am    Post subject: Reply with quote

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
View user's profile Send private message Send e-mail
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » IBM MQ Java / JMS » JMS MessageProducer very slow writing to Cluster Queue
Jump to:  



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
Protected by Anti-Spam ACP
 
 


Theme by Dustin Baccetti
Powered by phpBB © 2001, 2002 phpBB Group

Copyright © MQSeries.net. All rights reserved.