Author |
Message
|
rootkiit |
Posted: Mon Apr 20, 2015 11:23 pm Post subject: Message selector in IBM BPM 8.5 Using IBM MQ 7.0 |
|
|
Newbie
Joined: 20 Apr 2015 Posts: 3
|
My requirement is to read the messages from the queue with JMSCorrelationID as "xyz" via message selector in Activation Spec. This is configured under in my admin panel under: Resources->JMS->Activation specifications. Here I have set Message Selector as: JMSCorrelationID='xyz'
I am using RFHUtil 7.0.2 to post messages to the queue. I am setting JMS Correlation ID in the input message as "xyz". For this I am going to the RFH tab checking "Include RFH V2 Header" and then "jms". Under jms tab, I am setting Correlation ID as xyz
The problem is messages are not getting read by the activation spec. Please let me know if I am correct in referring to the correlation ID as "JMSCorrelationID" in my Message selector.
Thanks in advance. |
|
Back to top |
|
 |
Gaya3 |
Posted: Tue Apr 21, 2015 4:08 am Post subject: |
|
|
 Jedi
Joined: 12 Sep 2006 Posts: 2493 Location: Boston, US
|
are you sure there are no connection established to the queue ?
please check the connection handles on the queue, _________________ Regards
Gayathri
-----------------------------------------------
Do Something Before you Die |
|
Back to top |
|
 |
fjb_saper |
Posted: Tue Apr 21, 2015 4:33 am Post subject: |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
The correlation Id in RFHUtil gets only checked if the length of the correlation ID is > 24 Bytes. For any length below make sure that the correlation ID is also set in the corresponding MQMD field. This is a bytes field and will be x00 padded. So when checking for the correlation ID you might want to check for "ID:xxxx" where xxx is the hex value of the byte array. If you set the correlationID to "xyz" make sure you read the JMSCorrelationID after the put as the value will look completely different...
Have fun  _________________ MQ & Broker admin |
|
Back to top |
|
 |
rootkiit |
Posted: Wed Apr 22, 2015 3:45 am Post subject: |
|
|
Newbie
Joined: 20 Apr 2015 Posts: 3
|
fjb_saper wrote: |
The correlation Id in RFHUtil gets only checked if the length of the correlation ID is > 24 Bytes. For any length below make sure that the correlation ID is also set in the corresponding MQMD field. This is a bytes field and will be x00 padded. So when checking for the correlation ID you might want to check for "ID:xxxx" where xxx is the hex value of the byte array. If you set the correlationID to "xyz" make sure you read the JMSCorrelationID after the put as the value will look completely different...
Have fun  |
Hi. Thank you for your guidance.
When I am putting JMSCorrelationID, the message is coming as below after putting into this queue.
Code: |
****Message descriptor****
StrucId : 'MD ' Version : 2
Report : 0 MsgType : 8
Expiry : -1 Feedback : 0
Encoding : 546 CodedCharSetId : 437
Format : 'MQHRF2 '
Priority : 0 Persistence : 0
MsgId : X'414D5120514D5F4120202020202020207405255520097B05'
CorrelId : X'000000000000000000000000000000000000000000000000'
BackoutCount : 0
ReplyToQ : ' '
ReplyToQMgr : 'QM_A '
**** Message ****
length - 24776 bytes
00000000: 5246 4820 0200 0000 4400 0000 2202 0000 'RFH ....D..."...'
00000010: B501 0000 2020 2020 2020 2020 0000 0000 '.... ....'
00000020: B804 0000 1C00 0000 3C6A 6D73 3E3C 4369 '........<jms><Ci'
00000030: 643E 7879 7A3C 2F43 6964 3E3C 2F6A 6D73 'd>xyz</Cid></jms'
00000040: 3E20 2020 3C3F 786D 6C20 7665 7273 696F '> <?xml versio'
00000050: 6E3D 2231 2E30 2220 656E 636F 6469 6E67 'n="1.0" encoding'
|
My message selector is: JMSCorrelationID=xyz
The message isnt getting picked. Am I correctly doing it? |
|
Back to top |
|
 |
rootkiit |
Posted: Wed Apr 22, 2015 3:54 am Post subject: |
|
|
Newbie
Joined: 20 Apr 2015 Posts: 3
|
Gaya3 wrote: |
are you sure there are no connection established to the queue ?
please check the connection handles on the queue, |
Yes. In MQ Explorer, the Open Input Count is 2. That means, RFHUtil and My application(which is deployed on WPS) are listening to it. |
|
Back to top |
|
 |
fjb_saper |
Posted: Wed Apr 22, 2015 4:22 am Post subject: |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
No you are not doing it correctly. As you can see from the MQMD your correlationID is MQCI_NONE.
Change the view of the MQMD correlation ID to ascii, set the value and change it back to hex.
You will now see the value to put into your correlationID selector;
Your selector should say something like "ID:78797A000000000000000000000000000000000000000000"
and the jms folder field was set to "xyz"
If you really want to know what the actual correlation ID is going to be, you need to create a javax.jms.Message, set the correlationID to "xyz", then read it back as getJMSCorrelationID(). This will give you the correct content of the CorrelationID to look for. (Note the content of the JMS folder correlationID is only relevant if the correlationID > 24 bytes, and even then I would query the correlationID on the message before using it as selector...)
Have fun  _________________ MQ & Broker admin |
|
Back to top |
|
 |
|