Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is there a way to get the origin IP address from a JMS message?

Tags:

jms

I have a system in which different server processes are handling requests passed as JMS messages from various clients via a JMS broker.

I am trying to identify the source of the messages. Is there a way to get the IP or some identifying information about the origin ?

Clarification: I already have the client deployed by unknown users, so I'm trying to avoid changing message classes...

like image 512
Uri Avatar asked Nov 06 '08 23:11

Uri


2 Answers

There is an optional JMS header mentioned in the JMS specification called JMSXUserID which which identifies the user sending a message (which the broker validates and ensures is correct to avoid spoofing) which some JMS providers support.

For example here is how to enable it in Apache ActiveMQ

like image 138
James Strachan Avatar answered Nov 09 '22 10:11

James Strachan


I do not believe so. At least I was not able to find a way.

If you need to send a reply back to the source of the message, you can have the sender set the "JMSReplyTo" property and reply back to that destination.

Or, you could change your messaging schema slightly and embed the source information message itself. The sender would identify himself in the message and the receive could read it from there.

like image 24
svlists Avatar answered Nov 09 '22 09:11

svlists