Author |
Message
|
striker |
Posted: Sun Feb 06, 2011 8:17 pm Post subject: 2 different messages on 1 queue |
|
|
Newbie
Joined: 06 Feb 2011 Posts: 3
|
Hi,
I have a requirement where 2 different messages are dropped in the same queue.
I have a xsd based on which the 1st message is parsed but the 2nd message is basically a trigger for doing some other operations and i don't want to the use the same xsd as the first one or have a separate queue as the volume of second messages will be very low.Can i have 2 different schemas but then how do i tell the parser to use the new schema for the 2nd messages.Is there a way to accomplish this?
Thanks all for your time.
Thanks |
|
Back to top |
|
 |
santnmq |
Posted: Sun Feb 06, 2011 8:50 pm Post subject: |
|
|
Centurion
Joined: 11 Jan 2011 Posts: 125
|
It seems that you are using JAVA to send/process the message to queues. You have to devise a way so that the different messages are sent to the diffrent queues.
The parser will fail if it has the different format of the message while processing. |
|
Back to top |
|
 |
fjb_saper |
Posted: Sun Feb 06, 2011 9:39 pm Post subject: |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
You can also have a preprocessing flow that will route the messages according to content.
Have fun  _________________ MQ & Broker admin |
|
Back to top |
|
 |
mqjeff |
Posted: Mon Feb 07, 2011 2:25 am Post subject: |
|
|
Grand Master
Joined: 25 Jun 2008 Posts: 17447
|
|
Back to top |
|
 |
fatherjack |
Posted: Mon Feb 07, 2011 2:44 am Post subject: |
|
|
 Knight
Joined: 14 Apr 2010 Posts: 522 Location: Craggy Island
|
fjb_saper wrote: |
You can also have a preprocessing flow that will route the messages according to content. |
Are we to assume the OP is using WMB? He doesn't mention it anywhere. And this is posted in the Java/JMS forum. _________________ Never let the facts get in the way of a good theory. |
|
Back to top |
|
 |
santnmq |
Posted: Mon Feb 07, 2011 3:12 am Post subject: |
|
|
Centurion
Joined: 11 Jan 2011 Posts: 125
|
ya it seems that he is not using WMB, he is using JAVA. |
|
Back to top |
|
 |
striker |
Posted: Mon Feb 07, 2011 8:10 am Post subject: |
|
|
Newbie
Joined: 06 Feb 2011 Posts: 3
|
Hi All,
Thanks for the responses. Sorry if the post was not clear and let me know which forum to post if this posted wrongly here..Yes i am using Java and we parse the xml message from the MQ queue which was put to that queue by a DB trigger.
So one way i can do is have another queue and then parse the 2nd message but i wanted to avoid that approach and use the same queue.
Let me know if any details is required.
Thanks a lot. |
|
Back to top |
|
 |
mqjeff |
Posted: Mon Feb 07, 2011 10:12 am Post subject: |
|
|
Grand Master
Joined: 25 Jun 2008 Posts: 17447
|
Parse it using what parser?
Do you have to parse the full document before you can tell which message it is?
Can you put something in the Message Properties to indicate the message type? |
|
Back to top |
|
 |
striker |
Posted: Mon Feb 07, 2011 1:28 pm Post subject: |
|
|
Newbie
Joined: 06 Feb 2011 Posts: 3
|
Hi,
JAXB parser is being used and i want to find out how i can give message type or some other attribute and based on the attribute use a different schema.
Thanks
Ram |
|
Back to top |
|
 |
|