|
RSS Feed - WebSphere MQ Support
|
RSS Feed - Message Broker Support
|
 |
|
What is the difference/use of a message type vs. a message |
« View previous topic :: View next topic » |
Author |
Message
|
mmarq |
Posted: Tue Sep 24, 2002 10:50 am Post subject: What is the difference/use of a message type vs. a message |
|
|
Acolyte
Joined: 19 Sep 2002 Posts: 74 Location: Newton, MA
|
I have a message type that I created as a message. When do I use the message type and when is it appropriate to use the message?
Thanks in advance,
Melissa _________________ M Marquis |
|
Back to top |
|
 |
bduncan |
Posted: Tue Sep 24, 2002 11:25 am Post subject: |
|
|
Padawan
Joined: 11 Apr 2001 Posts: 1554 Location: Silicon Valley
|
Melissa,
MsgType is just another way of differentiating your messages, much like CorrelId, MsgId, etc. However, you cannot match against MsgType when retrieving messages from a queue like you can with CorrelId. In other words, MsgType is only useful to the getting application once it retrieves the message from the queue. At this point, the getting application can process the message in different ways depending on the MsgType. For instance, we used MsgType in a logging application. All of our servers would log information in the form of MQ messages rather than to a local file. These messages would all be routed to a single "logger" machine, which would allow us to monitor all the servers from a central location. The contents of the message would simply be an english message. It would be inefficient for the logger application to parse these messages to figure out the significance of the message, so we would assign each type of log message it's own MsgType value. So in a way it acted a lot like the Reason Code does in the MQ API. My message might say "Couldn't find the file called foo." And it's MsgType would be "1081" which indicated a file not found error message. That's just one example. I've used MsgType in several other applications as well. _________________ Brandon Duncan
IBM Certified MQSeries Specialist
MQSeries.net forum moderator |
|
Back to top |
|
 |
kirani |
Posted: Tue Sep 24, 2002 12:03 pm Post subject: |
|
|
Jedi Knight
Joined: 05 Sep 2001 Posts: 3779 Location: Torrance, CA, USA
|
Melissa,
Not sure if Brandon answered your question. I will answer to it from WMQI MRM perspective.
MRM Message: A message definition is a representation of the information that your application wants to exchange (the actual message). A message is made up of Elements and Types that represent diferent kind of business info.
MRM Message Type: There are two kind of types, simple type and compound type.
Simple types: These are predefined as BINARY, BOOLEAN, STRING, ...
Compound Types: These types are defined by you. These contains a group of elements. A compound type can also contain other compound type.
For more information, please have a look at Chapter 3 of Working with Messages manual. _________________ Kiran
IBM Cert. Solution Designer & System Administrator - WBIMB V5
IBM Cert. Solutions Expert - WMQI
IBM Cert. Specialist - WMQI, MQSeries
IBM Cert. Developer - MQSeries
|
|
Back to top |
|
 |
bduncan |
Posted: Tue Sep 24, 2002 2:08 pm Post subject: |
|
|
Padawan
Joined: 11 Apr 2001 Posts: 1554 Location: Silicon Valley
|
Kiran,
Thanks for the clarification, I didn't notice this message was in the WMQI forum!
I thought Melissa was referring to the MsgType field in the MQMD header. Whoops! _________________ Brandon Duncan
IBM Certified MQSeries Specialist
MQSeries.net forum moderator |
|
Back to top |
|
 |
kirani |
Posted: Tue Sep 24, 2002 2:21 pm Post subject: |
|
|
Jedi Knight
Joined: 05 Sep 2001 Posts: 3779 Location: Torrance, CA, USA
|
Hi Brandon,
You post was very helpful! I liked your idea of using MQMD.MessageType field to log messages! _________________ Kiran
IBM Cert. Solution Designer & System Administrator - WBIMB V5
IBM Cert. Solutions Expert - WMQI
IBM Cert. Specialist - WMQI, MQSeries
IBM Cert. Developer - MQSeries
|
|
Back to top |
|
 |
|
|
 |
|
Page 1 of 1 |
|
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
|
|
|
|