On 2/4/21 2:09 PM, jxz024000 wrote:
Hi,

In Javadoc of JmsConnectionFactory.setClientID(), it has a note "NOTE: A
clientID can only be used by one Connection at a time, so setting it here
will restrict the ConnectionFactory to creating a single open Connection at
a time. It is possible to set the clientID on the Connection itself
immediately after
creation if no value has been set via the factory that created it, which
will allow the factory to create multiple open connections at a time.".

For our project, we have a cluster of clients across multiple JVMs all
listen to the same Azure Service Bus queue. This means we will have more
than one connections created in multiple JVMs. Does this mean we shouldn't
set a client id and should let qpid to create a unique client id for us when
create connection? Currently this is exactly what we have done and it works
fine. But I just noticed in Microsoft springboot service bus sample project,
they are setting client id using the Service Bus subscription id. So I'm
wondering if we have done it wrong.

You can set a client Id if you so choose but it should be unique per each client you create otherwise the clients would be rejected upon connection as a JMS client which sets a client Id must use a unique one.  If your clients are connecting in order to consume from a Queue there isn't a strong motivation to set a client ID value other than fro tracking purposes as the client Id is mainly used for clients which are going to create a non-shared durable topic subscription.


Thanks,




--
Sent from: http://qpid.2158936.n2.nabble.com/Apache-Qpid-users-f2158936.html

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]


--
Tim Bish


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to