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 API Support » How to connect more than one queue manager?

Post new topic  Reply to topic
 How to connect more than one queue manager? « View previous topic :: View next topic » 
Author Message
chenxiaohua
PostPosted: Tue Jun 20, 2006 7:00 pm    Post subject: How to connect more than one queue manager? Reply with quote

Newbie

Joined: 15 Jun 2006
Posts: 1

Hello!
I want to connect two queue manager in one application, i am working on c++.
I get 2002 error code when i connect second qmgr, but i can get two on java application. why? if can't get more than one connection in one thread, what shall i do?
who have some demo witch resolve this problem.
Back to top
View user's profile Send private message Send e-mail
RogerLacroix
PostPosted: Tue Jun 20, 2006 10:22 pm    Post subject: Reply with quote

Jedi Knight

Joined: 15 May 2001
Posts: 3253
Location: London, ON Canada

Hi,

Make each queue manager connection request in separate threads.

Regards,
Roger Lacroix
Capitalware Inc.
_________________
Capitalware: Transforming tomorrow into today.
Connected to MQ!
Twitter
Back to top
View user's profile Send private message Visit poster's website
wschutz
PostPosted: Wed Jun 21, 2006 1:37 am    Post subject: Reply with quote

Jedi Knight

Joined: 02 Jun 2005
Posts: 3316
Location: IBM (retired)

Can you tell us why you need to connect to two qmgrs in your application? This isn't a "typical" programming pattern....
_________________
-wayne
Back to top
View user's profile Send private message Send e-mail AIM Address
tleichen
PostPosted: Wed Jun 21, 2006 10:56 am    Post subject: Reply with quote

Yatiri

Joined: 11 Apr 2005
Posts: 663
Location: Center of the USA

If you just make a channel between the two queue managers along with approriate xmit queues, etc., you should be able to architect a solution that will not require your application to connect to two queue managers directly.
_________________
IBM Certified MQSeries Specialist
IBM Certified MQSeries Developer
Back to top
View user's profile Send private message
jefflowrey
PostPosted: Wed Jun 21, 2006 2:26 pm    Post subject: Reply with quote

Grand Poobah

Joined: 16 Oct 2002
Posts: 19981

wschutz wrote:
Can you tell us why you need to connect to two qmgrs in your application? This isn't a "typical" programming pattern....


Unless one is writing a monitoring program.

Or a web-administration program.
_________________
I am *not* the model of the modern major general.


Last edited by jefflowrey on Fri Jun 23, 2006 2:12 am; edited 1 time in total
Back to top
View user's profile Send private message
boydl
PostPosted: Fri Jun 23, 2006 2:06 am    Post subject: Reply with quote

Novice

Joined: 05 Feb 2003
Posts: 16

Another reason for doing such thing is for the "Replying" application having a client connecting to a cluster of queue managers.

The requesting application (Client connection) can put messages to any of the clustered queue manager. Hence, the replying apps need to ensure that it can get messages from all of the queue manager in the cluster.
Back to top
View user's profile Send private message
jefflowrey
PostPosted: Fri Jun 23, 2006 2:17 am    Post subject: Reply with quote

Grand Poobah

Joined: 16 Oct 2002
Posts: 19981

boydl wrote:
The requesting application (Client connection) can put messages to any of the clustered queue manager. Hence, the replying apps need to ensure that it can get messages from all of the queue manager in the cluster.


No. You have that very confused.

In a request/reply scenario the requester (client) sends a message to a known queue on a particular queue manager. The server app reads from this queue, and is only connected to that one queue manager. The request message indicates what queue the client wants to receive the reply on, and also what queue manager that queue lives on. The server app does NOT then open a new client connection to that queue manager. The server app merely opens the reply-to-queue and reply-to-queue manager, and puts the reply. MQ networking handles moving the message to the right place.

In a cluster scenario, there can be multiple copies of a particular queue - for example the server app queue can exist more than once. THEN messages will be "sprayed" out to all of those queues. BUT it is NOT expected that a single instance of the server app will be GETTING from all of those queues. It is expected that there are multiple copies of that server app, each getting from a single queue. Otherwise you have removed all the scalability you have just gotten by adding the cluster and multiple queue instances!
_________________
I am *not* the model of the modern major general.
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 API Support » How to connect more than one queue manager?
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.