Thanks. Can the client use a user-defined header which can identify the client uniquely (for example, the username that was used to connect)? Will this header be passed on to the receiver by the broker? -PC
On Tue, Aug 14, 2012 at 10:50 AM, Raul Kripalani <r...@fusesource.com>wrote: > Yes, but it requires using the ActiveMQ JMS implementation classes rather > than the pure JMS interfaces. > > If you cast the javax.jms.Message to an > org.apache.activemq.command.ActiveMQMessage, > you can use the getProducerId() method to obtain the ProducerId. What I'm > not sure is how useful that will be, because AFAIK it is generated at > random. But maybe the ID embeds the hostname or something. > > You can also try ProducerId.getConnectionId() to see if you get something > useful. > > Hope that helps, > > *Raúl Kripalani* > *Principal Consultant | FuseSource Corp. > r...@fusesource.com | fusesource.com <http://www.fusesource.com/> > skype: raul.fuse | twitter: @raulvk <http://twitter.com/raulvk>, > @fusenews<http://twitter.com/fusenews> > * > blog: F3 - Flashes From the > Field< > http://blog.raulkr.net/?utm_source=fusesourceemail&utm_medium=email&utm_campaign=fusesourcemail > > > | aboutme: http://about.me/raulkripalani > > <http://twitter.com/fusenews> > > On 14 August 2012 17:44, Paddy Carman <paddy.car...@gmail.com> wrote: > > > Hi - > > Is it possible to determine (at the receiver), the client that > > originated the message that was sent to a queue or a topic? Would this > > require adding custom header fields? Has there been some work in this > > direction that someone can point me to? Basically I'm looking for > something > > like a "from" field in XMPP. > > Appreciate the help! > > Thanks, > > PC > > >