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 » (imp) message not received

Post new topic  Reply to topic
 (imp) message not received « View previous topic :: View next topic » 
Author Message
alfia_786
PostPosted: Wed Nov 14, 2007 8:54 am    Post subject: (imp) message not received Reply with quote

Novice

Joined: 13 Nov 2007
Posts: 12

Hi,
Plz somebody help me

I am trying a very simple send and receive program which is not working,it gives a 2033 reason code and if i try to write a program to just print the contents of the reply queue it does not have the message that was sent recently.If I dont get the message that I am sending ,does that mean the message was not sent,but the put method is called and no exceptions are thrown..plz help..here is my code:

this is for sending :
--------------------------------------------------------------
qMgr = new MQQueueManager(qManager);
int openOptions = MQC.MQOO_INPUT_AS_Q_DEF | MQC.MQOO_OUTPUT
| MQC.MQOO_INQUIRE ;
MQQueue sendQueue = qMgr.accessQueue(queuename, openOptions);
MQPutMessageOptions pmo = new MQPutMessageOptions();
MQMessage regrenewal = new MQMessage();
regrenewal.format = MQC.MQFMT_STRING;
regrenewal.replyToQueueName = replyq;
regrenewal.writeString("sending data");
sendQueue.put(regrenewal, pmo);
out.println("msg put the message id is"+regrenewal.messageId);
qMgr.commit();
sendQueue.close();
----------------------------------------------------------------------

this is for receiving

-----------------------------------------------------------------------
qMgr = new MQQueueManager(qManager);
int openOptions = MQC.MQOO_OUTPUT
| // for put access
MQC.MQOO_INQUIRE
| // check q depth
MQC.MQOO_INPUT_AS_Q_DEF
| // for get access
MQC.MQOO_FAIL_IF_QUIESCING
|
MQC.MQOO_BROWSE;
MQQueue outQ = qMgr.accessQueue(replyq,openOptions);
int curDepth = outQ.getCurrentDepth();
int maxLength = outQ.getMaximumMessageLength();
out.println("Current depth: " + curDepth);
MQMessage myMessage = new MQMessage();
myMessage.format = MQC.MQFMT_STRING;
MQGetMessageOptions gmo = new MQGetMessageOptions();
gmo.options = MQC.MQGMO_BROWSE_FIRST;
outQ.get(myMessage, gmo);
out.println(" about to read msg");
tring msgText = myMessage.readString(myMessage.getMessageLength());
out.println("The message is: " + msgText);
qMgr.commit();
outQ.close();
qMgr.disconnect();
Back to top
View user's profile Send private message
jefflowrey
PostPosted: Wed Nov 14, 2007 9:01 am    Post subject: Reply with quote

Grand Poobah

Joined: 16 Oct 2002
Posts: 19981

Don't bother with the qdepth.

Check the queue using something else after the PUT, and before you start the receiver.
_________________
I am *not* the model of the modern major general.
Back to top
View user's profile Send private message
alfia_786
PostPosted: Wed Nov 14, 2007 9:08 am    Post subject: Reply with quote

Novice

Joined: 13 Nov 2007
Posts: 12

what shoulld i check it with?I tried using the methods/fields in MQQueue class and also MQputMessageOptions like knownDestCount etc but nothing works
Back to top
View user's profile Send private message
Vitor
PostPosted: Wed Nov 14, 2007 9:10 am    Post subject: Reply with quote

Grand High Poobah

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

alfia_786 wrote:
what shoulld i check it with?


amqsget - to determine that the message has really been put & the problem's the receiver not the sender.
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
jefflowrey
PostPosted: Wed Nov 14, 2007 9:14 am    Post subject: Reply with quote

Grand Poobah

Joined: 16 Oct 2002
Posts: 19981

amqsget
amqsbcg

mqexplorer

runmqsc

....
....
_________________
I am *not* the model of the modern major general.
Back to top
View user's profile Send private message
alfia_786
PostPosted: Wed Nov 14, 2007 9:46 am    Post subject: runmqsc command Reply with quote

Novice

Joined: 13 Nov 2007
Posts: 12

This might sound stupid but I have never worked on Websphere before,so please help me:

The mQ client is installed on the linux server and i thinks its under the directory /opt/mqm ,so should i go to this directory to run the runmqsc or mqexplorer or amqsget
amqsbcg commands
Back to top
View user's profile Send private message
Vitor
PostPosted: Wed Nov 14, 2007 12:12 pm    Post subject: Re: runmqsc command Reply with quote

Grand High Poobah

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

alfia_786 wrote:
This might sound stupid but I have never worked on Websphere before,so please help me:


I urge you to seek professional training. WMQ is not a straightforward thing, and this forum is not an ideal training resource.

Explorer is the GUI, use it if you have it
runmqsc is the admin interface, the display command is what you want
amqsget/amqsbcg are sample programs, probably in /opt/mqm/samp/bin
_________________
Honesty is the best policy.
Insanity is the best defence.
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 » (imp) message not received
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.