Author |
Message
|
kmidderigh |
Posted: Tue Apr 21, 2009 6:39 am Post subject: Does .Net MQ support put to remote QM via an existing conn? |
|
|
Apprentice
Joined: 21 Apr 2009 Posts: 26
|
I'm trying to get a C# .NET 2.0 program to connect to one queue manager (A) and then send a message to another (B) via the connection to the first.
i.e. use queue manager A's channel connections and xmit queues to send a message to a queue on B.
I know that in general MQ will support this but i'm not sure about the .Net classes.
When I try using PUT on the MQQueueManager object I get a 2087 error - which kind of makes sense seeing as i havent set any of the parameters that this error refers to as I cant find them in the .Net classes!
i.e. RemoteQMgrName, XmitQName etc..
For reference the code works fine if i'm writing back to the queue manager i'm connected to or if the MQ tab file contains a reference to the
remote queue manager i'm targetting.
Of course I could put the remote queue manager in the tab file but in the environment i'm working in that isnt really an option and I dont want to create a client connection to the remote queue manager.
My fallback position would be to create remote queues on queue manager A to direct messages to Queue Manager B but dont want to have to do this unless i need to as its not very dynamic!
Is this possible in .Net MQ classes ?
am I missing something in the options setup?
Any confirmation of functionality or advise appreciated.
Thanks,
Kevin. |
|
Back to top |
|
 |
Vitor |
Posted: Tue Apr 21, 2009 6:45 am Post subject: Re: Does .Net MQ support put to remote QM via an existing co |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
kmidderigh wrote: |
Is this possible in .Net MQ classes ? |
kmidderigh wrote: |
am I missing something in the options setup? |
You're missing something in the configuration of queue manager A.
To put a message onto a queue hosted by queue manager B, there must be some way for qm A to find qm B. This is achieved by giving the xmitq the same name as the qmgr it points to, or using a queue manager alias to direct the message.
This is described in the Intercommunication manual, as is why there's nothing about Remote queues or remote queue managers in the .NET classes. There's nothing in the standard MQI either.
 _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
kmidderigh |
Posted: Tue Apr 21, 2009 7:00 am Post subject: |
|
|
Apprentice
Joined: 21 Apr 2009 Posts: 26
|
I have the required channels - and xmit queues with the same name as queue manager B defined on queue manager A.
Will read the intercommuniction manual.
Ta.
K. |
|
Back to top |
|
 |
Vitor |
Posted: Tue Apr 21, 2009 7:05 am Post subject: |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
kmidderigh wrote: |
I have the required channels - and xmit queues with the same name as queue manager B defined on queue manager A. |
Then you need to investigate (via the .NET manual possibly) why it's not finding the xmitq called B (yielding your 2087).
It's an obvious thing, but be sure your app is specifying B not b as the queue manager name, and in all respects the target queue manager name in your app = xmitq or alias = actual target queue manager name. Also be sure you're not accidently specifying A as the "remote" target (see that done before now!) _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
kmidderigh |
Posted: Tue Apr 21, 2009 7:31 am Post subject: |
|
|
Apprentice
Joined: 21 Apr 2009 Posts: 26
|
on yet another review of testing environment and code looks like I might have a combination of the possible problems you have mentioned..
sorting now...  |
|
Back to top |
|
 |
kmidderigh |
Posted: Wed Apr 22, 2009 1:25 am Post subject: |
|
|
Apprentice
Joined: 21 Apr 2009 Posts: 26
|
All working now.
Problem due to a number of factors :
in one test environment had the correct QM setup and a coding error
and in a second test environment had correct code and incorrect QM setup.
you live and learn!
Thanks |
|
Back to top |
|
 |
|