Author |
Message
|
kun.leeing |
Posted: Wed May 12, 2010 11:40 pm Post subject: About Message Parsing |
|
|
 Disciple
Joined: 27 Sep 2008 Posts: 171
|
Hi, experts.
How can I get the source address of a Message? Like client IP and Port where the message from, etc.
Thanks. |
|
Back to top |
|
 |
zpat |
Posted: Wed May 12, 2010 11:52 pm Post subject: |
|
|
 Jedi Council
Joined: 19 May 2001 Posts: 5866 Location: UK
|
You can't.
The MQMD fields have some infomation about the application but not IP address.
The userid in the MQMD should give you a clue though. Use MO71 or similar to inspect the MQMD. |
|
Back to top |
|
 |
gbaddeley |
Posted: Thu May 13, 2010 3:09 pm Post subject: |
|
|
 Jedi Knight
Joined: 25 Mar 2003 Posts: 2538 Location: Melbourne, Australia
|
MQMD fields ReplyToQMgr, PutApplName and PutApplType usually give some good clues of where the message came from. _________________ Glenn |
|
Back to top |
|
 |
Vitor |
Posted: Thu May 13, 2010 5:57 pm Post subject: Re: About Message Parsing |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
kun.leeing wrote: |
How can I get the source address of a Message? Like client IP and Port where the message from, etc. |
Given that one of the advantages of WMQ is to decouple applications, why would you want such information? There may be other ways to achieve your ends. _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
mvic |
Posted: Fri May 14, 2010 7:58 am Post subject: Re: About Message Parsing |
|
|
 Jedi
Joined: 09 Mar 2004 Posts: 2080
|
kun.leeing wrote: |
How can I get the source address of a Message? Like client IP and Port where the message from, etc. |
As others have said, only a little metadata about the putter goes into the message descriptor.
IMHO, if you want that information to flow from putter to getter, add some code to the putter to include it in the message. |
|
Back to top |
|
 |
PeterPotkay |
Posted: Fri May 14, 2010 12:05 pm Post subject: Re: About Message Parsing |
|
|
 Poobah
Joined: 15 May 2001 Posts: 7722
|
Vitor wrote: |
kun.leeing wrote: |
How can I get the source address of a Message? Like client IP and Port where the message from, etc. |
Given that one of the advantages of WMQ is to decouple applications, why would you want such information? There may be other ways to achieve your ends. |
I can think of a lot, mainly around problem resolution time. But for day to day normal activity, not really. _________________ Peter Potkay
Keep Calm and MQ On |
|
Back to top |
|
 |
kun.leeing |
Posted: Tue May 18, 2010 5:43 pm Post subject: |
|
|
 Disciple
Joined: 27 Sep 2008 Posts: 171
|
My problem is there seems some clients have continually been sending garbage messages in system. But I can not recognize them.
I check MQExplorer, but it can not give me a clue.
How can I resolve it?
Thanks in advance.[/quote] |
|
Back to top |
|
 |
Vitor |
Posted: Tue May 18, 2010 6:43 pm Post subject: |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
kun.leeing wrote: |
My problem is there seems some clients have continually been sending garbage messages in system. But I can not recognize them. |
Well you have a number of options. Clearly you have the putting application name, the user id & the reply to queue manager which should be if not unique then distinctive (or should be). The clients will be using different svrconn channels (or should be). You have the date & time of the message. If the messages are continuous then you have a stream to follow.
Problem solving (as I'm sure you're aware) has a large amount of detective work involved. _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
kun.leeing |
Posted: Tue May 18, 2010 10:46 pm Post subject: |
|
|
 Disciple
Joined: 27 Sep 2008 Posts: 171
|
Quote: |
Problem solving (as I'm sure you're aware) has a large amount of detective work involved. |
Yeah, it is.
Quote: |
Well you have a number of options. Clearly you have the putting application name, the user id & the reply to queue manager which should be if not unique then distinctive (or should be). The clients will be using different svrconn channels (or should be). You have the date & time of the message. If the messages are continuous then you have a stream to follow. |
But my client apps were built by Java, so I can not recognize it by application name on MQ Explorer.
How can I get the user ID from MQMD by Jms? And can I tell which is the app? Does the user id information contains the key info ? 'Cause I use ND subscribe, I think I just can get the user id parsing from the duplicate message by creating a new app. Is it right?
Thanks.[/quote] |
|
Back to top |
|
 |
Vitor |
Posted: Wed May 19, 2010 5:06 am Post subject: |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
kun.leeing wrote: |
But my client apps were built by Java, so I can not recognize it by application name on MQ Explorer. |
Urgh. Java. And Java doing publish/subscribe. Boy have you got problems.....
kun.leeing wrote: |
How can I get the user ID from MQMD by Jms? And can I tell which is the app? Does the user id information contains the key info ? 'Cause I use ND subscribe, I think I just can get the user id parsing from the duplicate message by creating a new app. Is it right? |
Well in terms of being any use to you the wheels just came off my waggon; a Java person will be along in a minute.
Moving to more general terms the user id in the MQMD should still be visible even if the app is generated by JMS (though I accept it's potentially of less use) and you should be able to determine who the publisher is.
You also refer here to "duplicate" message where previously you called them "garbage". Are these properly formed but duplicate messages, or unexpected messages containing rubbish? If the former, is it possible these are artifacts of a code bug in the ND subscribers? _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
RogerLacroix |
Posted: Wed May 19, 2010 7:55 am Post subject: |
|
|
 Jedi Knight
Joined: 15 May 2001 Posts: 3264 Location: London, ON Canada
|
Hi,
This is the good & bad of MQ. By default, there is no security, so it is very easy to get applications to connect to a queue manager. The bad is that it is hard to track who is doing what.
You should seriously look into implementing a security solution. Hence, each application would have its own UserID. Therefore, it would take you 1 minute to track down which application is the "bad app".
Regards,
Roger Lacroix
Capitalware Inc. _________________ Capitalware: Transforming tomorrow into today.
Connected to MQ!
Twitter |
|
Back to top |
|
 |
|