ASG
IBM
Zystems
Cressida
Icon
Netflexity
 
  MQSeries.net
Search  Search       Tech Exchange      Education      Certifications      Library      Info Center      SupportPacs      LinkedIn  Search  Search                                                                   FAQ  FAQ   Usergroups  Usergroups
 
Register  ::  Log in Log in to check your private messages
 
RSS Feed - WebSphere MQ Support RSS Feed - Message Broker Support

MQSeries.net Forum Index » General Discussion » Multiple Message Types in single queue.

Post new topic  Reply to topic
 Multiple Message Types in single queue. « View previous topic :: View next topic » 
Author Message
rickffields
PostPosted: Mon Sep 22, 2008 12:58 pm    Post subject: Multiple Message Types in single queue. Reply with quote

Newbie

Joined: 22 Sep 2008
Posts: 1

We would like to send multiple messages to a single queue. It would be from a mainframe application to a webMethods server. We would like to use the MQ Headers to determine the message type. Can we use the MSGID and CORRELATION ID's on the PUT and have the get program pull all messages and route them accordingly.
Back to top
View user's profile Send private message
fjb_saper
PostPosted: Mon Sep 22, 2008 2:46 pm    Post subject: Reply with quote

Grand High Poobah

Joined: 18 Nov 2003
Posts: 20697
Location: LI,NY

Bad design.
MessageId and CorrelationId should be set by MQ and used in an anonymous identifier pattern. They should not contain any hidden business meaning!

Go back to the drawing board. If you need to set up content that way use the RFH header.

Enjoy
_________________
MQ & Broker admin
Back to top
View user's profile Send private message Send e-mail
gbaddeley
PostPosted: Mon Sep 22, 2008 7:23 pm    Post subject: Reply with quote

Jedi

Joined: 25 Mar 2003
Posts: 2498
Location: Melbourne, Australia

You can use CorrelId (24 bytes of binary data) for this purpose, but if you store text (EBCDIC) in that field on the mainframe, it will not be converted when WebMethods (ASCII Unix?) gets the message.

You can use the MessageType field of the MQMD, as this is an integer that has a reserved range for application specific purposes.

You can also add an RFH header to the data, or use Properties in MQ V7, but this is adding to the message data payload, which the ultimate receiving application may not be able to handle.
_________________
Glenn
Back to top
View user's profile Send private message
fjb_saper
PostPosted: Mon Sep 22, 2008 7:58 pm    Post subject: Reply with quote

Grand High Poobah

Joined: 18 Nov 2003
Posts: 20697
Location: LI,NY

gbaddeley wrote:

You can also add an RFH header to the data, or use Properties in MQ V7, but this is adding to the message data payload, which the ultimate receiving application may not be able to handle.

As per the original post:
rickffields wrote:
from a mainframe application to a webMethods server

I would have thought the webMethods server to be a J2EE environment and as such there should be no problem reading the RFH header / message Properties.

What you end up writing is a dispatcher application that retrieves the MQ message and routes it to the correct consumer depending on the message type.... Message brokers do this very well...(content based routing) however not without a cost...($$$).

Enjoy
_________________
MQ & Broker admin
Back to top
View user's profile Send private message Send e-mail
RogerLacroix
PostPosted: Thu Sep 25, 2008 8:11 am    Post subject: Re: Multiple Message Types in single queue. Reply with quote

Jedi Knight

Joined: 15 May 2001
Posts: 3254
Location: London, ON Canada

rickffields wrote:
We would like to send multiple messages to a single queue. It would be from a mainframe application to a webMethods server. We would like to use the MQ Headers to determine the message type. Can we use the MSGID and CORRELATION ID's on the PUT and have the get program pull all messages and route them accordingly.

I perfer to have a queue per "application function". Do not use MsgId field. Also, I would not use the CorrelID as it is not converted between platforms (EBCDIC to ASCII).

I would use MQMD's ApplIdentityData field. Here's a snippet from the WMQ APR manual:
IBM wrote:
ApplIdentityData is information that is defined by the application suite, and can be used to provide additional information about the message or its originator. The queue manager treats this information as character data, but does not define the format of it. When the queue manager generates this information, it is entirely blank.

The nice thing about the ApplIdentityData field is it WILL be converted between different platforms.

Regards,
Roger Lacroix
Capitalware Inc.
_________________
Capitalware: Transforming tomorrow into today.
Connected to MQ!
Twitter
Back to top
View user's profile Send private message Visit poster's website
omhopper
PostPosted: Thu Sep 25, 2008 12:54 pm    Post subject: Reply with quote

Novice

Joined: 08 Jun 2007
Posts: 17

Is there a way to set the ApplIdentityData using a JMS program though? I can't find that referenced in the Using Java manual section for header mapping?

EDIT -- Never mind. A quick search on this site shows that it's not possible. It's too bad that between JMSType (for JMS) and ApplIdentityData (when using MQ libs) can't work together to allow for routing based on header data.
_________________
Thanks.
Back to top
View user's profile Send private message
RogerLacroix
PostPosted: Thu Sep 25, 2008 1:47 pm    Post subject: Reply with quote

Jedi Knight

Joined: 15 May 2001
Posts: 3254
Location: London, ON Canada

omhopper wrote:
Is there a way to set the ApplIdentityData using a JMS program though?

No. You have to write an MQ send or receive exit in Java to handle this issue.

I've done it. I've got pieces to another product but their doesn't seem to be any interest.

Regards,
Roger Lacroix
Capitalware Inc.
_________________
Capitalware: Transforming tomorrow into today.
Connected to MQ!
Twitter
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » General Discussion » Multiple Message Types in single queue.
Jump to:  



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
Protected by Anti-Spam ACP
 
 


Theme by Dustin Baccetti
Powered by phpBB © 2001, 2002 phpBB Group

Copyright © MQSeries.net. All rights reserved.