|
RSS Feed - WebSphere MQ Support
|
RSS Feed - Message Broker Support
|
 |
|
CorrelId change after Getting Messages |
« View previous topic :: View next topic » |
Author |
Message
|
bvasanth |
Posted: Tue Aug 24, 2004 7:38 am Post subject: CorrelId change after Getting Messages |
|
|
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 |
|
 |
bob_buxton |
Posted: Wed Aug 25, 2004 6:37 am Post subject: |
|
|
 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 |
|
 |
gunter |
Posted: Wed Aug 25, 2004 7:37 am Post subject: |
|
|
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 |
|
 |
|
|
 |
|
Page 1 of 1 |
|
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
|
|
|
|