[ 
https://issues.apache.org/jira/browse/AMQ-5210?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17294808#comment-17294808
 ] 

Matt Pavlovich commented on AMQ-5210:
-------------------------------------

I'm thinking this is 'Not a problem' for a couple reasons where this feature 
request ends up conflicting with other features.

1. Managing a singleton connection across a network of brokers only makes sense 
in the context where the brokers are sharing consumers. In a store-and-forward 
or replicated producing design (ie.. mulit-path, replication across zones, etc) 
the clientId's should _not_ be treated as duplicated.

2. The AllowLinkStealing feature allows a broker to hand the 'active' 
connection to the last connection that uses a clientId, instead of failing. 
This is a feature and would complicate implementing this request in a 
multi-broker use case.

3. In the MQTT case, using VirtualTopic based subscription strategy would allow 
for competing consumers across a network-of-brokers and this would be the 
desirable behavior-- and the exact opposite of the requested behavior.

I think the solution is to have clients use a list of broker URLs, so each 
connection using a clientId can leverage network of brokers for redundancy and 
scaling without having to deal with the errors. Additionally, clients can be 
partitioned so appGroupA uses broker1, broker2 and appGroupB uses broker2, 
broker1 in their URLs.



> Concurrent connections with same clientid to network of brokers
> ---------------------------------------------------------------
>
>                 Key: AMQ-5210
>                 URL: https://issues.apache.org/jira/browse/AMQ-5210
>             Project: ActiveMQ
>          Issue Type: New Feature
>          Components: Broker
>    Affects Versions: 5.9.1
>         Environment: Linux
>            Reporter: Paddy
>            Priority: Major
>
> Two brokers A and B connected to each other as networks of brokers setup.
> Connect a client with clientid C1 to broker A.
> Case1: When another client with same client id (C1) is connected to broker A, 
> it fails with exception ("already connected"), which is the expected behavior.
> Case2: When another client with same client id C1 is connected to broker B, 
> it does not fail. 
> Feature Request: Way to detect that there is an existing online connection 
> with the same clientid in the network bridge so that "already connected" 
> exception in Case2



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to