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 » CorrelId change after Getting Messages

Post new topic  Reply to topic
 CorrelId change after Getting Messages « View previous topic :: View next topic » 
Author Message
bvasanth
PostPosted: Tue Aug 24, 2004 7:38 am    Post subject: CorrelId change after Getting Messages Reply with quote

Apprentice

Joined: 03 May 2004
Posts: 27
Location: Chennai, India

I am trying to put a message into reply queue with Correl id set from msg id of prev reply message.

Code:
requestMessage.correlationId = <msg id of prev reply message>;
print("Prev Req CorrelId :" + requestMessage.correlationId );
pmo.options = MQC.MQPMO_SET_IDENTITY_CONTEXT;
requestQueue.put(requestMessage, pmo);      
print("After Req CorrelId :" + requestMessage.correlationId );

But the correlId change before and after putting message into queue. Please let me know the reason.
output
Code:
Prev Req CorrelId :[B@2d2f21c3
After Req CorrelId :[B@41e0a1c3



Similarly I am trying to get a message using Correl id from reply queue

Code:

replyMessage.correlationId = requestMessage.messageId;
gmo.options = MQC.MQGMO_WAIT;
gmo.waitInterval = 15000;
print("Prev GetReplycorrelId;"+ replyMessage.correlationId);
replyQueue.get(replyMessage,gmo);
print("After GetReplycorrelId;"+ replyMessage.correlationId);


The successfully get reply message. But the correlId change after receiving the reply message. Is that correct?, and why?

Here is output
Code:
Prev GetReplycorrelId;[B@8ec1f38
After GetReplycorrelId;[B@38ca9f38

Thanks,
Vasanth
Back to top
View user's profile Send private message
bob_buxton
PostPosted: Wed Aug 25, 2004 6:37 am    Post subject: Reply with quote

Master

Joined: 23 Aug 2001
Posts: 266
Location: England

I am not a Java programmer but I don't think you can just assign a msgid to a correlid. In C you would use memcpy, I believe the Java is System.arraycopy
_________________
Bob Buxton
Ex-Websphere MQ Development
Back to top
View user's profile Send private message
gunter
PostPosted: Wed Aug 25, 2004 7:37 am    Post subject: Reply with quote

Partisan

Joined: 21 Jan 2004
Posts: 307
Location: Germany, Frankfurt

Code:
print("Prev Req CorrelId :" + requestMessage.correlationId );

The correlationid is a byte[] and toString() will show you the hex representation of this object and not the content.
_________________
Gunter Jeschawitz
IBM Certified System Administrator - Websphere MQ, 5.3
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 » CorrelId change after Getting Messages
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.