Author |
Message
|
AkankshA |
Posted: Thu Apr 10, 2008 11:06 pm Post subject: MQ weblogic biding : correlation id |
|
|
 Grand Master
Joined: 12 Jan 2006 Posts: 1494 Location: Singapore
|
|
Back to top |
|
 |
marcin.kasinski |
Posted: Fri Apr 11, 2008 1:17 am Post subject: Re: MQ weblogic biding : correlation id |
|
|
Sentinel
Joined: 21 Dec 2004 Posts: 850 Location: Poland / Warsaw
|
AkankshA wrote: |
do i nee to explicitly do this in my MDB code ??? |
Yes.
In you MDB you have to copy msgid of request to correlid of reply. _________________ Marcin |
|
Back to top |
|
 |
AkankshA |
Posted: Fri Apr 11, 2008 1:21 am Post subject: |
|
|
 Grand Master
Joined: 12 Jan 2006 Posts: 1494 Location: Singapore
|
i do not want msg id in correl id
i want correl id in correl id
but as far as i know the entire MQMD header(rest of props) is created using JMS header properties... why different for correl id _________________ Cheers |
|
Back to top |
|
 |
marcin.kasinski |
Posted: Fri Apr 11, 2008 1:32 am Post subject: |
|
|
Sentinel
Joined: 21 Dec 2004 Posts: 850 Location: Poland / Warsaw
|
AkankshA wrote: |
i do not want msg id in correl id
i want correl id in correl id
but as far as i know the entire MQMD header(rest of props) is created using JMS header properties... why different for correl id |
Can you explain what you are trying to do (maybe code example) ?
I don't want to read this entire article. _________________ Marcin |
|
Back to top |
|
 |
AkankshA |
Posted: Fri Apr 11, 2008 1:52 am Post subject: |
|
|
 Grand Master
Joined: 12 Jan 2006 Posts: 1494 Location: Singapore
|
i have MQ JMS file based binding for sending msgs from MQ queue to weblogic queue and vice versa.. using an mdb
I want to have the same correlation id as in JMS header and in MQMD
for that do i need to set it in mdb or not..
my guess is i shd not..
need confirmation _________________ Cheers |
|
Back to top |
|
 |
marcin.kasinski |
Posted: Fri Apr 11, 2008 2:42 am Post subject: |
|
|
Sentinel
Joined: 21 Dec 2004 Posts: 850 Location: Poland / Warsaw
|
AkankshA wrote: |
i have MQ JMS file based binding for sending msgs from MQ queue to weblogic queue and vice versa.. using an mdb
I want to have the same correlation id as in JMS header and in MQMD
for that do i need to set it in mdb or not..
my guess is i shd not..
need confirmation |
I still don't get it ?
JMS MQ header represents native MQMD header.
Are you talking about :
Code: |
replymessage.setJMSCorrelationID(requestmsg.getJMSCorrelationID()); |
_________________ Marcin |
|
Back to top |
|
 |
AkankshA |
Posted: Fri Apr 11, 2008 2:50 am Post subject: |
|
|
 Grand Master
Joined: 12 Jan 2006 Posts: 1494 Location: Singapore
|
My application is putting a message on weblogic queue, this message has JMSCorrelationID set
from there my mdb picks the message and using file based JNDI it puts it to MQ Queue..
now what should be the value of correlId in MQMD header of the message, on MQ.. ll it be same as JMSCorrelationID or ll it be blank... _________________ Cheers |
|
Back to top |
|
 |
marcin.kasinski |
Posted: Fri Apr 11, 2008 3:02 am Post subject: |
|
|
Sentinel
Joined: 21 Dec 2004 Posts: 850 Location: Poland / Warsaw
|
AkankshA wrote: |
My application is putting a message on weblogic queue, this message has JMSCorrelationID set
from there my mdb picks the message and using file based JNDI it puts it to MQ Queue..
now what should be the value of correlId in MQMD header of the message, on MQ.. ll it be same as JMSCorrelationID or ll it be blank... |
Why do you set JMSCorrelationID in your request ?
Basic request – response scenario is:
- request application sends request
- response application gets request message , process and sends reply by copying message id of request message to correlationid of reply message.
Is it file, LDAP, WAS or another JNDI it doesn’t matter.
Is it answer to your question or I still don’t get it  _________________ Marcin |
|
Back to top |
|
 |
fjb_saper |
Posted: Fri Apr 11, 2008 3:10 pm Post subject: Re: MQ weblogic biding : correlation id |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
In your MDB you should inspect the JMSCorrelIdAsBytes and compare it to the MQCI_NONE value.
I assume here that you are in a request response scenario.
Short from going to the IBM native properties which would tell you whether to use msgid or correl id you can use following rule:
if the correlid is initial (MQCI_NONE) set the message id. If the correlid is not initial set the correlid.
In any case it is your MDB's responsability to set the correlid field on the outgoing response message, and yes YOU need to code for it.
Enjoy  _________________ MQ & Broker admin |
|
Back to top |
|
 |
kevinQ |
Posted: Fri Apr 11, 2008 5:32 pm Post subject: |
|
|
Novice
Joined: 09 Apr 2008 Posts: 21
|
With my limited experience with JMS, I think the JMS correlation_id is in the RFH2 header of MQ message, cotained in <cid></cid>. It may or may not be the same as the MQ correlation_id in the MQMD.
CorrelationId in MQMD is 24 bytes long, but I don't think there is such a limitation with JMS correlation_id.
Are you using a non-JMS application to read the JMS message? If both side are JMS applications, setJMSCorrelationId and getJMSCorrelationId should work seamless together. I don't think I understand what you problem is. |
|
Back to top |
|
 |
|