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 » Reply from MQ ?

Post new topic  Reply to topic
 Reply from MQ ? « View previous topic :: View next topic » 
Author Message
lover91
PostPosted: Mon May 04, 2009 1:12 am    Post subject: Reply from MQ ? Reply with quote

Newbie

Joined: 15 Dec 2008
Posts: 6

I used this to send message to MQ
Code:
MQQueueManager qMgr = new MQQueueManager(qManager);
            int openOptions = MQC.MQOO_INPUT_AS_Q_DEF | MQC.MQOO_OUTPUT;
            MQQueue queue = qMgr.accessQueue(qName, openOptions);
            MQMessage msg = new MQMessage();
            msg.writeUTF(message);
            MQPutMessageOptions pmo = new MQPutMessageOptions();
            queue.put(msg, pmo);
            queue.close();
            qMgr.disconnect();


The message put in MQ queue successfully via server Channel and TCP/IP

But how can I get reply from the MQ ?
and this need to do some thing in MQ in the server side ??
Back to top
View user's profile Send private message
Vitor
PostPosted: Mon May 04, 2009 1:17 am    Post subject: Re: Reply from MQ ? Reply with quote

Grand High Poobah

Joined: 11 Nov 2005
Posts: 26093
Location: Texas, USA

lover91 wrote:
But how can I get reply from the MQ ?


If you mean "how do I get a reply from MQ to prove the message was successfully put", then enclose the put in a try/catch block. If the client code doesn't throw an exception then the message is in the queue.

If you mean "how do I get a reply to my message", then you need an application somewhere to reply to it.
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
lover91
PostPosted: Mon May 04, 2009 1:22 am    Post subject: Reply with quote

Newbie

Joined: 15 Dec 2008
Posts: 6

Thanks
Thanks
Back to top
View user's profile Send private message
zpat
PostPosted: Mon May 04, 2009 10:11 am    Post subject: Reply with quote

Jedi Council

Joined: 19 May 2001
Posts: 5866
Location: UK

Don't open output queues for input. It prevents the use of remote queues for one thing.
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 » Reply from MQ ?
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.