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 » General Discussion » Putting Messages into REMOTE QUEUE using C#

Post new topic  Reply to topic
 Putting Messages into REMOTE QUEUE using C# « View previous topic :: View next topic » 
Author Message
DeeptiChand
PostPosted: Fri Nov 12, 2004 10:27 am    Post subject: Putting Messages into REMOTE QUEUE using C# Reply with quote

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
View user's profile Send private message
jefflowrey
PostPosted: Fri Nov 12, 2004 10:40 am    Post subject: Reply with quote

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
View user's profile Send private message
kirani
PostPosted: Fri Nov 12, 2004 11:11 am    Post subject: Reply with quote

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
View user's profile Send private message Visit poster's website
DeeptiChand
PostPosted: Fri Nov 12, 2004 12:36 pm    Post subject: Solution Reply with quote

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
View user's profile Send private message
vennela
PostPosted: Sat Nov 13, 2004 8:51 am    Post subject: Reply with quote

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
View user's profile Send private message Send e-mail Visit poster's website
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » General Discussion » Putting Messages into REMOTE QUEUE using C#
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.