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 IBM MQ Support » MessageId and CorrelationId failing.........

Post new topic  Reply to topic
 MessageId and CorrelationId failing......... « View previous topic :: View next topic » 
Author Message
rajmq
PostPosted: Fri Jan 10, 2003 4:52 am    Post subject: MessageId and CorrelationId failing......... Reply with quote

Partisan

Joined: 29 Sep 2002
Posts: 331
Location: USA

Hi All,

Client application generate the request message, puts the message on the queue and message ID is stored and it is waiting for reply.
Server application which receives the messages, would process the request and generate reply message by copying message ID of the request message into Correlation ID of the reply message.

I tried using the above concept i am getting message to reply queue. But my client program not able to read that reply message(due to the correlationId mismatch).The same program without checking of msgId and CorrelationId it is working fine.

can anyone give some examples programs for concept.

thanks
raj
Back to top
View user's profile Send private message
pgorak
PostPosted: Fri Jan 10, 2003 5:31 am    Post subject: Reply with quote

Disciple

Joined: 15 Jul 2002
Posts: 158
Location: Cracow, Poland

From what you say I think the following GMO settings are needed in your client application:

MatchOptions = MQMO_MATCH_CORREL_ID
Options = MQGMO_WAIT
WaitInterval = put a reasonable time here, in milliseconds

Piotr
Back to top
View user's profile Send private message
oz1ccg
PostPosted: Fri Jan 10, 2003 5:32 am    Post subject: Reply with quote

Yatiri

Joined: 10 Feb 2002
Posts: 628
Location: Denmark

Hi Raj,

have you remembered to initialize MSGID after setting the CORRID before you issue the MQGET ????

and with Piotr's options aswell.

This is the typical error number one for Client application programmers.

Just my $0.02
_________________
Regards, Jørgen
Home of BlockIP2, the last free MQ Security exit ver. 3.00
Cert. on WMQ, WBIMB, SWIFT.
Back to top
View user's profile Send private message Send e-mail Visit poster's website MSN Messenger
rajmq
PostPosted: Fri Jan 10, 2003 11:23 pm    Post subject: Reply with quote

Partisan

Joined: 29 Sep 2002
Posts: 331
Location: USA

Hi


Thansk to all

But i checked all ur pts.it is ok
Here i copied my code also

ServerCode(Response)

Once i got request msg, i am assiging the request msg messagId to reply msg.
try{
MQQueue queue = _queueManager.accessQueue ("TESTINGMSGID1", openOptions, null, null,null);
BufferedReader d = new BufferedReader(new InputStreamReader(System.in));
sendmsg = new MQMessage();
MQPutMessageOptions pmo = new MQPutMessageOptions();
while ((line = d.readLine()) != null) {
sendmsg.clearMessage();
sendmsg.messageId = MQC.MQMI_NONE;
sendmsg.correlationId =message.messageId; //Here request msgId is assigned******
sendmsg.writeString(line);
queue.put(sendmsg, pmo);
}
Client Prg(Request)

Once i got reply back i am checking below options,But i am not able to read this message.

MQQueue queue = _queueManager.accessQueue("TESTINGMSGID1", openOptions, null, null,null);
MQGetMessageOptions getOptions = new MQGetMessageOptions();
getOptions.options = MQC.MQGMO_FAIL_IF_QUIESCING + MQC.MQGMO_CONVERT;
getOptions.matchOptions = MQC.MQMO_MATCH_CORREL_ID;
getOptions.options = MQC.MQGMO_WAIT;
while(true){
MQMessage message = new MQMessage();
message.correlationId =sendmsg.messageId;//i am checking here**
try{
queue.get(message, getOptions);
byte[] b = new byte[message.getMessageLength()];
message.readFully(b);
System.out.println(new String(b));
}
}

thanks
raj
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 » General IBM MQ Support » MessageId and CorrelationId failing.........
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.