Author |
Message
|
DeeptiChand |
Posted: Fri Nov 12, 2004 10:27 am Post subject: Putting Messages into REMOTE QUEUE using C# |
|
|
Novice
Joined: 02 Nov 2004 Posts: 10
|
I am trying to send a message on a remote queue RQ. I have BOX-1 and BOX-2 and i have defined the transmission queues and sender and receiver channels on appropriate boxes. ON BOX 2 I have a localQ(LQ) to which the RQ is mapped.
Can anybody help me how to put message on RQ (on windows box -1)by a program that would automatically transfer that message to LQ(on windows box-2) in C# .NET.
In the MQQueueManager() i have used MQEnvironment.HOSTNAME="BOX2";
MQEnvironment.Port= 1200;//box1 port;
MQEnivironment.Channel="Box1.Box2.00" //SENDER CHANNEL
myQM=new MQQueueManager("myQMANAGERNAME");//QM on BOX 1
queue = queueManager.AccessQueue( RQ, MQC.MQOO_OUTPUT + MQC.MQOO_FAIL_IF_QUIESCING );
IS specifying the SENDER CHANNEL here correct??? Basically i am trying to send a message to Remote Q on box 1 and MQ SERVER would automatically put the message into MQSERVER on box 2
Thank you very much . _________________ Deepti |
|
Back to top |
|
 |
jefflowrey |
Posted: Fri Nov 12, 2004 10:40 am Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
This isn't really a C# question.
It's really a basic MQ development question. You should spend some time reading the Application Programming Guide (available from the "documentation" button at the top of the screen).
Make your connection to the queue manager on BOX1, like you were going to open a local queue there.
Do everything the same as if you were opening a local queue EXCEPT, specify the name of the Remote queue instead of a local queue. _________________ I am *not* the model of the modern major general. |
|
Back to top |
|
 |
kirani |
Posted: Fri Nov 12, 2004 11:11 am Post subject: |
|
|
Jedi Knight
Joined: 05 Sep 2001 Posts: 3779 Location: Torrance, CA, USA
|
You can find some sample programs in <wmq_home>Tools\dotnet\samples\cs directory for C#. They have a program that puts message on a queue. _________________ Kiran
IBM Cert. Solution Designer & System Administrator - WBIMB V5
IBM Cert. Solutions Expert - WMQI
IBM Cert. Specialist - WMQI, MQSeries
IBM Cert. Developer - MQSeries
|
|
Back to top |
|
 |
DeeptiChand |
Posted: Fri Nov 12, 2004 12:36 pm Post subject: Solution |
|
|
Novice
Joined: 02 Nov 2004 Posts: 10
|
I figured out the mistake. It was a simple mistake. I was using the wrong CHANNEL. I was using Sender channel instead of server connection channel. Yes, its a basic question where i got struck cuz i was using the wrong type of channel.
Thanks for the post replies. _________________ Deepti |
|
Back to top |
|
 |
vennela |
Posted: Sat Nov 13, 2004 8:51 am Post subject: |
|
|
 Jedi Knight
Joined: 11 Aug 2002 Posts: 4055 Location: Hyderabad, India
|
I don't think you solved the problem. Atleast that is not what you should be doing. MQ didn't move the message from box-1 to box-2. You have directly put the message to box 2.
Read these lines carefully.
jefflowrey wrote: |
Make your connection to the queue manager on BOX1, like you were going to open a local queue there.
Do everything the same as if you were opening a local queue EXCEPT, specify the name of the Remote queue instead of a local queue. |
And for you run the program on Box-1, you don't need MQEnvironment variables. |
|
Back to top |
|
 |
|