Posted: Tue May 11, 2010 9:27 am Post subject: MQQueueManager - is for long leaving or not
Apprentice
Joined: 23 Mar 2010 Posts: 25
We have application where we need to connect to MQ every 10 seconds once. We would like to know the best practices from the group is the MQQueueManager class is deisned to keep the connection open for long. Or we need to open the connection and close as soon we are done.
Posted: Tue May 11, 2010 9:31 am Post subject: Re: MQQueueManager - is for long leaving or not
Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
apk007 wrote:
Please let me know the best pratices around this.
Connect when the application starts and keep the connection open until the application ends. Connection is a very resource expensive operation and should be done as infrequently as possible.
I'd also recommend using a get with wait rather than polling every 10 seconds to see if a message has shown up. _________________ Honesty is the best policy.
Insanity is the best defence.
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