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 » MQ Open/Access Q and Close Q performance

Post new topic  Reply to topic
 MQ Open/Access Q and Close Q performance « View previous topic :: View next topic » 
Author Message
gifs71
PostPosted: Wed Aug 18, 2004 10:56 am    Post subject: MQ Open/Access Q and Close Q performance Reply with quote

Novice

Joined: 05 Aug 2004
Posts: 13

Hi,

In my Java program, I get a message from a queue and then process it and repeat this as long as there are messages in the queue. The program would run 24/7 and would shutdown only in case of certains error conditions while processing. Now my question is the sequence of operations when I do this:

Code:
Scenario 1:
                  Connect to Q Mgr at startup
                  Repeat the following steps for each GET:
                        Access/Open a Q
                        GET a msg
                        Close the Q
                  Disconnect from the Q Mgr at shutdown

Scenario 2:
                  Connect to Q Mgr at startup
                  Access/Open a Q
                  Repeat the following steps for each GET:
                       GET a msg
                  At shutdown:
                       Close the Q
                       Disconnect from the Q Mgr


Now in terms of performance, it would seem that the "Scenario 2" is better because you only incur the cost of Open/Accessing and Closing the Queue once and not for every GET as in the case of "Scenario 1". But when I performed the tests I didn't see much of a performance difference between the two scenarios. So was wondering what Scenario should I implement? Is there anything that would weigh in favor of one Scenario over the other?

Thanks.

Rahul.
Back to top
View user's profile Send private message
vennela
PostPosted: Wed Aug 18, 2004 11:05 am    Post subject: Reply with quote

Jedi Knight

Joined: 11 Aug 2002
Posts: 4055
Location: Hyderabad, India

It also helps if you can tell what OPEN options you are specifying when you open the queue.
Scenario 2 is better if you open the queue in shared mode and want to run/ be able to run multiple copies of it.
Back to top
View user's profile Send private message Send e-mail Visit poster's website
leongor
PostPosted: Sun Aug 22, 2004 3:57 am    Post subject: Reply with quote

Master

Joined: 13 May 2002
Posts: 264
Location: Israel

How do you measure it ? You need to run hundreds of messages to see a real difference.
_________________
Regards.
Leonid.

IBM Certified MQSeries Specialist.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » IBM MQ Java / JMS » MQ Open/Access Q and Close Q performance
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.