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 IndexIBM MQ Java / JMSBest practice for jms request reply

Post new topicReply to topic
Best practice for jms request reply View previous topic :: View next topic
Author Message
jkh
PostPosted: Fri Apr 10, 2015 1:29 am Post subject: Best practice for jms request reply Reply with quote

Newbie

Joined: 09 Oct 2013
Posts: 5

We have a queue manager running on a windows box and sometime it is difficult to connect to it. It can take 10-20 seconds to get a connection. We see the problem when connecting from both java applications using native MQ classes, java applications running jms and when using the support pack MO72.
I think the problem is a jms application running on WAS that create a connection for each request for the queue manager. The application sends approx. 10 requests per second. For each request the application:
    Creates a connection
    Creates a session
    Creates a producer
    Sends the request
    Creates a consumer
    Receive the reply
    Close consumer
    Close producer
    Close session
    Close connection

WAS has configured “0” minimum number of connections in the connection factory connection pool. If the pool is empty then WAS need create 5 connection at the same time if the application reveive 5 requests at the same time. We will try to increase the minimum number of connection to maybe 25.
My question is what the best practice is for connecting to mq via jms when requests are sendt and replies received. Should we only have one connection and reuse it for all requests/replies or is there a better way?

Regards
Jakob
Back to top
View user's profile Send private message
mqjeff
PostPosted: Fri Apr 10, 2015 4:42 am Post subject: Reply with quote

Grand Master

Joined: 25 Jun 2008
Posts: 17447

First of all, you can tell really easily if the WAS application is actually the problem, by looking at the status of active svrconn channels and at open sockets on the queue manager machine.

Second of all, the JMS application should be using a QCF to create a connection, and ideally be looking up that QCF from JNDI.

If it's doing that in your step of "create a connection", then it's acting as it should.

You should then tune the connection pool - as you suggest - so that fewer connections are being opened and then closed again in a short period of time. You may still want the pool minimum size to be 0, so that all connections are closed when the JMS app is completely idle. But you might want to examine how long the connections stay alive in the pool...
Back to top
View user's profile Send private message
Display posts from previous:
Post new topicReply to topic Page 1 of 1

MQSeries.net Forum IndexIBM MQ Java / JMSBest practice for jms request reply
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.