You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@activemq.apache.org by jo...@offilive.com on 2018/06/08 21:15:35 UTC

Setting ClientID in Artemis Core and Artemis JMS Client

Hi,

I am using a server-side Artemis plugin that reads the clientID from the remoteConnection. While it seems to be possible to set a client ID via AMQP1.0 with QPid JMS Client, setting the client ID in the JMS Client seems to have not any effect. remoteConnection.getClientID() in that case returns null on the server side.

The Core client only has a setClientID on the remote connection via clientSessionFactory.getConnection().setClientID() but setting a value there also has no effect.

So my question is, is it possible at all to set a ClientID in the Artemis Core and/or Artemis JMS Client that is transfered to the server and if so how.

Thanks,
Jo

Re: Setting ClientID in Artemis Core and Artemis JMS Client

Posted by Justin Bertram <jb...@apache.org>.
It is certainly possible to set the JMS client ID via the core JMS client.
Simply invoke javax.jms.Connection.setClientID(String) on the client and
that will be set in the metadata on the corresponding
org.apache.activemq.artemis.core.server.ServerSession on the broker using
the key "jms-client-id".


Justin

On Fri, Jun 8, 2018 at 4:15 PM, <jo...@offilive.com> wrote:

> Hi,
>
> I am using a server-side Artemis plugin that reads the clientID from the
> remoteConnection. While it seems to be possible to set a client ID via
> AMQP1.0 with QPid JMS Client, setting the client ID in the JMS Client seems
> to have not any effect. remoteConnection.getClientID() in that case returns
> null on the server side.
>
> The Core client only has a setClientID on the remote connection via
> clientSessionFactory.getConnection().setClientID() but setting a value
> there also has no effect.
>
> So my question is, is it possible at all to set a ClientID in the Artemis
> Core and/or Artemis JMS Client that is transfered to the server and if so
> how.
>
> Thanks,
> Jo
>