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 » IBM MQ Java / JMS » About Message Parsing

Post new topic  Reply to topic
 About Message Parsing « View previous topic :: View next topic » 
Author Message
kun.leeing
PostPosted: Wed May 12, 2010 11:40 pm    Post subject: About Message Parsing Reply with quote

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
View user's profile Send private message Send e-mail
zpat
PostPosted: Wed May 12, 2010 11:52 pm    Post subject: Reply with quote

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
View user's profile Send private message
gbaddeley
PostPosted: Thu May 13, 2010 3:09 pm    Post subject: Reply with quote

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
View user's profile Send private message
Vitor
PostPosted: Thu May 13, 2010 5:57 pm    Post subject: Re: About Message Parsing Reply with quote

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
View user's profile Send private message
mvic
PostPosted: Fri May 14, 2010 7:58 am    Post subject: Re: About Message Parsing Reply with quote

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
View user's profile Send private message
PeterPotkay
PostPosted: Fri May 14, 2010 12:05 pm    Post subject: Re: About Message Parsing Reply with quote

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
View user's profile Send private message
kun.leeing
PostPosted: Tue May 18, 2010 5:43 pm    Post subject: Reply with quote

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
View user's profile Send private message Send e-mail
Vitor
PostPosted: Tue May 18, 2010 6:43 pm    Post subject: Reply with quote

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
View user's profile Send private message
kun.leeing
PostPosted: Tue May 18, 2010 10:46 pm    Post subject: Reply with quote

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
View user's profile Send private message Send e-mail
Vitor
PostPosted: Wed May 19, 2010 5:06 am    Post subject: Reply with quote

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
View user's profile Send private message
RogerLacroix
PostPosted: Wed May 19, 2010 7:55 am    Post subject: Reply with quote

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
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 » IBM MQ Java / JMS » About Message Parsing
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.