activemq-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Timothy Bish (JIRA)" <>
Subject [jira] [Commented] (ARTEMIS-1206) [Core JMS Client] Violates JMS Specification - allows two active connections with same clientid
Date Mon, 05 Jun 2017 16:02:04 GMT


Timothy Bish commented on ARTEMIS-1206:

Client identifier
The preferred way to assign a client’s client identifier is for it to be
configured in a client-specific ConnectionFactory and transparently
assigned to the connection it creates. Alternatively, a client can set a
connection’s client identifier using a provider-specific value. The facility
to explicitly set a connection’s client identifier is not a mechanism for
overriding the identifier that has been administratively configured. It is
provided for the case where no administratively specified identifier exists.
If one does exist, an attempt to change it by setting it must throw an
IllegalStateException .
An application may explicitly set a connection's client identifier by calling
the setClientID method on the Connection , JMSContext ,
QueueConnection or TopicConnection object.
If a client explicitly sets a connection's client identifier it must do so
immediately after creating the Connection , JMSContext ,
QueueConnection or TopicConnection and before any other action on
Java Message Service Version 2.0 revision athis object taken. After this point, setting the
client identifier is a
programming error that should throw an IllegalStateException .
The purpose of client identifier is to associate a connection and its objects
with a state maintained on behalf of the client by a provider. By definition,
the client state identified by a client identifier can be ‘in use’ by only one
client at a time. A JMS provider must prevent concurrently executing
clients from using it.
This prevention may take the form of a JMSException being thrown
when such use is attempted; it may result in the offending client being
blocked; or some other solution. A JMS provider must ensure that such
attempted ‘sharing’ of an individual client state does not result in
messages being lost or doubly processed.
The only use of a client identifier defined by JMS is its mandatory use in
identifying an unshared durable subscription or its optional use in
identifying a shared durable or non-durable subscription.

> [Core JMS Client] Violates JMS Specification - allows two active connections with same
> -----------------------------------------------------------------------------------------------
>                 Key: ARTEMIS-1206
>                 URL:
>             Project: ActiveMQ Artemis
>          Issue Type: Bug
>            Reporter: Michael Andre Pearce
>         Attachments:
> Currently it is possible to make two completely separate client connections to the broker,
with the same client id.
> This was found/raised as a possible bug in Core Client on looking at differing behaviours
between the Core JMS Client and the Qpid AMQP Client.
> Attached is a test case, where by the Qpid Client errors, and the Core Client does not,
executing the same client code.

This message was sent by Atlassian JIRA

View raw message