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 » How to Receive messages on remote Q using local QM?

Post new topic  Reply to topic
 How to Receive messages on remote Q using local QM? « View previous topic :: View next topic » 
Author Message
lenkite
PostPosted: Mon Dec 19, 2005 3:37 am    Post subject: How to Receive messages on remote Q using local QM? Reply with quote

Newbie

Joined: 19 Dec 2005
Posts: 3

Hi all,

MQ JMS Java allows a JMS application to connect to a local QM, and put a message which then can be sent to a remote QM. This is possible by :

    * Construct a sender channel on the local QM that uses a transmission queue.
    * Construct the corresponding receiver channel on the remote QM.
    * Connect to local QM in the standard JMS manner (using TCP transport type) and obtain a QueueSession say qSession.
    * Get an MQQueue: rQueue = qSession.createQueue(<remoteQueueName>)
    * Call rQueue.setBaseQueueManagerName(<remoteQMName>)
    * Create a QueueSender and send a message in the normal way.


However, this approach doesn't seem to work for the receive case. For the receive case, I have created a 'Requester' channel at the local QM side and a 'Server' channel at the remote QM side. Unfortunately, when I try to create a QueueReceiver I get this error:

"MQJMS1017: non-local MQ queue not valid for receiving or browsing"

I am confused here. I thought the very point of 'Requester' and 'Server' channel configurations was to enable queue-access in this manner.

All help much appreciated!


[/b]
Back to top
View user's profile Send private message
Mr Butcher
PostPosted: Mon Dec 19, 2005 3:40 am    Post subject: Reply with quote

Padawan

Joined: 23 May 2005
Posts: 1716

this is basic mq design. you can not read from a remotequeue definition.

messages are put to remotequeue definitions so mq knows about the destination of the message. the message is then routed by mq until it has reached its final destination (a local queue on a specific queuemanager).

you have to connect to that queuemanager and read from that local queue if you like to retrieve the messages.
_________________
Regards, Butcher
Back to top
View user's profile Send private message
jefflowrey
PostPosted: Mon Dec 19, 2005 4:35 am    Post subject: Reply with quote

Grand Poobah

Joined: 16 Oct 2002
Posts: 19981

Also, an application should never be aware of the nature of the channels that connect two queue managers. That would severely break the logical isolation between the two applications that MQ makes possible. An application should have no idea where or how the receivers of it's messages are connected to the MQ network - either locally, remotely, in parallel, in a cluster, or across unreliable WAN links.
_________________
I am *not* the model of the modern major general.
Back to top
View user's profile Send private message
lenkite
PostPosted: Mon Dec 19, 2005 11:51 pm    Post subject: I am already aware of that. Reply with quote

Newbie

Joined: 19 Dec 2005
Posts: 3

Hi,

Thanks for your responses. But I am already aware of the issues they address. In the first place, this is not a remote queue definition.

Secondly, I perfectly understand that a well-designed application mustn't be aware of the nature of channels - it should be separate from configuration details.

But unforutnately real-world legacy constraints dictate this approach. This is not an application I am coding, but an adapter that can be configured dynamically to handle dirty integration scenarios.

But thanks anyways..
Back to top
View user's profile Send private message
wschutz
PostPosted: Tue Dec 20, 2005 3:01 am    Post subject: Reply with quote

Jedi Knight

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

Quote:
the first place, this is not a remote queue definition.
You're correct, but it is still a "remote queue" (ie, a queue which is not local to the qmgr you are connected to) and you can't GET from anything other than a local queue).

Quote:
This is not an application I am coding, but an adapter that can be configured dynamically to handle dirty integration scenarios.
So can you configure it to use MQ client channels? Then you can get the message from the queue manager which hosts the queue.
_________________
-wayne
Back to top
View user's profile Send private message Send e-mail AIM Address
lenkite
PostPosted: Tue Dec 20, 2005 9:49 pm    Post subject: Reply with quote

Newbie

Joined: 19 Dec 2005
Posts: 3

Well, yes there is no workaround here. I just wanted to confirm that.

Thanks.
Back to top
View user's profile Send private message
bower5932
PostPosted: Wed Dec 21, 2005 7:08 am    Post subject: Reply with quote

Jedi Knight

Joined: 27 Aug 2001
Posts: 3023
Location: Dallas, TX, USA

lenkite wrote:
Well, yes there is no workaround here. I just wanted to confirm that.


I'd say that there is a workaround - use wschutz's suggestion of a client connection to the qmgr.
Back to top
View user's profile Send private message Send e-mail Visit poster's website AIM Address Yahoo Messenger
jefflowrey
PostPosted: Wed Dec 21, 2005 7:16 am    Post subject: Reply with quote

Grand Poobah

Joined: 16 Oct 2002
Posts: 19981

Or move the queue to the local queue manager...
_________________
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 Java / JMS » How to Receive messages on remote Q using local QM?
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.