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...
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
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With