using MQ from VB - 2 seperate connections

7 views
Skip to first unread message

Adam

unread,
Apr 27, 2004, 12:09:04 AM4/27/04
to
I have build some VB code that gets and puts messages off /on a queue.

I have run into a major obstacle . . .

I need to connect to 2 different MQ servers (reading from one, writing
to another).
I have read that since each MQ server connection must be in a seperate
thread, you cannot connect to 2 seperate MQ servers within VB (since
VB is single threaded).

Can anyone give me any advice on how to proceed because I need to
build an application where:

I will be reading off of one MQ (server 1)
and putting messages onto another MQ server.

Any advice would be greatly appreciated. ie Should i use another
language, is there a work around ??

thanks in advance,

Adam

anhnt

unread,
May 20, 2004, 10:42:56 PM5/20/04
to
Hi adam, Did you use ClientConnection Model? if that is true,I think in
VB.If use MQSERVER enviroment variable then You can't connect to 2
MQSERVER.but You can use MQCONX wich need 2 parameters
CHANNELNAME,CONNECTIONNAME.You can use example program named amqscnxb in
directory WebSphere\tools\vb.

anhnt

--
posted via MFF : http://www.MainFrameForum.com - USENET Gateway

Mike Surikov

unread,
Jun 18, 2004, 5:26:50 PM6/18/04
to
Adam,

I am sorry, but it is bad idea to have two connections to read messages from
one queue manager and write to another. Believe me, the first queue manager
can send your messages to the second one more better than you can.

So, you solution should be to connect to only one queue manager from which
you will read messages and send messages to the second queue manager through
the first one. You have to create a transmission queue and a sender channel
on the first queue manager and a receiver channel on the second queue
manager.

Regards,
Michael

"Adam" <akant...@hotmail.com> wrote in message
news:943cad29.04042...@posting.google.com...

palak salgotra

unread,
Sep 1, 2020, 12:59:51 AM9/1/20
to
Hi,

I have some code to get and put messages on single queue, but need to use different queues. Can you guys help like how to connect to
use different queues with common QM, Channel, etc, just publishing q and subscribing q are different. Need help onthat interconnection between two queues.

Thanks
Palak
Reply all
Reply to author
Forward
0 new messages