Author |
Message
|
EagleStar |
Posted: Wed Jun 20, 2007 6:42 am Post subject: MSQI: Transform JMS message |
|
|
Newbie
Joined: 20 Jun 2007 Posts: 6
|
Hi there,
I am upgrading our web app to use jms messages instead of mq messages. Do I need to make any changes to the MQSI code to process jms messages? When I debug the message at the input node on MQSI the payload is in BLOB format and this is causing errors. Previously the payload was in XML format (when using MQ messages).
Any help would be appreciated.
Thanks,
Fiona. |
|
Back to top |
|
 |
marcin.kasinski |
Posted: Wed Jun 20, 2007 6:46 am Post subject: Re: MSQI: Transform JMS message |
|
|
Sentinel
Joined: 21 Dec 2004 Posts: 850 Location: Poland / Warsaw
|
What king of errors is it ?
Have you checked content of message ? Is it XML ? _________________ Marcin |
|
Back to top |
|
 |
EagleStar |
Posted: Wed Jun 20, 2007 6:52 am Post subject: MSQI: Transform JMS message |
|
|
Newbie
Joined: 20 Jun 2007 Posts: 6
|
I've checked the message using rfhutil and the content is XML. Don't get any errors on MQSI, the message is just put on the request failure queue. |
|
Back to top |
|
 |
jefflowrey |
Posted: Wed Jun 20, 2007 7:05 am Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
I really hope you aren't actually using MQSI, and are really using WMB.
Likely you are not building your JMS message using a TextMessage. _________________ I am *not* the model of the modern major general. |
|
Back to top |
|
 |
EagleStar |
Posted: Wed Jun 20, 2007 7:10 am Post subject: MQSI: Transform JMS message |
|
|
Newbie
Joined: 20 Jun 2007 Posts: 6
|
Actually we are using MQSI (version 2.1). Can you explain further about the text message? I'm doing the following:
Code: |
TextMessage message = session.createTextMessage();
|
|
|
Back to top |
|
 |
jefflowrey |
Posted: Wed Jun 20, 2007 7:12 am Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
Well, okay.
You should be upgrading to v6 real soon now, as 2.1 is not at all supported and will likely not meet most of your business needs - especially in the realm of XML and Web Services.
I guess that is what I meant by TextMessage. So if you're doing that, then it's not clear what the problem is. What does the message look like on the queue? What are the properties on the MQInput node? What is in the MQRFH2? _________________ I am *not* the model of the modern major general. |
|
Back to top |
|
 |
EagleStar |
Posted: Wed Jun 20, 2007 7:40 am Post subject: MQSI: Transform JMS message |
|
|
Newbie
Joined: 20 Jun 2007 Posts: 6
|
When I examine the message using rfhutil the body is in XML format. However when I debug the message on MQSI the body is in BLOB format. The properties on the input queue are all set to default values. The message structure looks as follows:
Code: |
MQMD
MQRFH2
MCD
JMS
USR
BLOB
|
Previously the last part of the message was XML.
In control centre looking at the Input node the tabs have the following:
Code: |
Node type: MQInput
Basic: queue name of IE.ESLI.BGSW.REQUEST.INPUT
Default: nothing entered
Advanced: transaction mode of YES & order mode DEFAULT
Validation: validate master: NONE, validateFailureAction: exception, timing:deferred
|
|
|
Back to top |
|
 |
jefflowrey |
Posted: Wed Jun 20, 2007 8:13 am Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
I guess the MCD doesn't indicate that the Message Domain is XML, and since you don't have a Default domain set on the MQInput node, then it's using BLOB. _________________ I am *not* the model of the modern major general. |
|
Back to top |
|
 |
EagleStar |
Posted: Wed Jun 20, 2007 8:17 am Post subject: MQSI: Transform JMS message |
|
|
Newbie
Joined: 20 Jun 2007 Posts: 6
|
I tried setting the message domain using message.setJMSType("XML") but it set the msg type instead. Should I change the settings on the input queue? |
|
Back to top |
|
 |
jefflowrey |
Posted: Wed Jun 20, 2007 8:27 am Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
Not the queue, the MQInput node.
There should be a JMS property that matches the Message Domain, but I don't know what it is off the top of my head. _________________ I am *not* the model of the modern major general. |
|
Back to top |
|
 |
fjb_saper |
Posted: Wed Jun 20, 2007 3:11 pm Post subject: |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
jefflowrey wrote: |
Not the queue, the MQInput node.
There should be a JMS property that matches the Message Domain, but I don't know what it is off the top of my head. |
The property setting the domain on the Flow is in the same field as the jms_text information in the RFH2.
You are telling us that you used to use java base.
The easiest way to fix this is to set your JNDI for the target queue (broker flow input queue) to be MQ and not JMS. (uri form : "queue://QMGR/QUEUE?targetClient=1")
Enjoy  _________________ MQ & Broker admin |
|
Back to top |
|
 |
jefflowrey |
Posted: Wed Jun 20, 2007 5:28 pm Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
fjb_saper wrote: |
The easiest way to fix this is to set your JNDI for the target queue (broker flow input queue) to be MQ and not JMS. (uri form : "queue://QMGR/QUEUE?targetClient=1") |
Um.
That would cause the message to arrive with no RFH2 on it at all. Which would also cause it to parsed according to the default values on the MQInput node. Which are set to nothing at all...
Which... okay. Would cause Broker to inspect the data and decide that it was XML and could be processed as self-defining XML data. _________________ I am *not* the model of the modern major general. |
|
Back to top |
|
 |
EagleStar |
Posted: Fri Jun 22, 2007 8:07 am Post subject: MQSI: Transform JMS message |
|
|
Newbie
Joined: 20 Jun 2007 Posts: 6
|
Set the Message Domain on the Input Node to be XML. Works a treat now, thanks! |
|
Back to top |
|
 |
|