You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@qpid.apache.org by bryand <br...@bldixon.net> on 2018/02/16 20:25:27 UTC

sole-connection-enforcement-policy with apache-qpid-jms-0.29.0

I'm using apache-qpid-broker-j-7.0.1 and have been doing some development
with client apache-qpid-jms-0-x-6.3.0.   That has been working fine so far
in early development.  

However, I have an app that I can use the newer client
apache-qpid-jms-0.29.0 and its fine when I  create one connection.  However
as soon as I try to create a second connection (I'm using the same user
account for all connections), the connection can't be created - the qpid
client code just loops with this log message:

WARN  AmqpResourceBuilder            - Open of resource:(JmsConnectionInfo {
ID:ecf41e07-9797-4aaa-88e4-db3cb3111293:2, configuredURI =
failover:(amqp://spgappdevmutil:5672?amqp.vhost=spgqpiddev,amqp://appprd02:5672?amqp.vhost=spgqpiddev,amqp://appprd02:5682?amqp.vhost=spgqpiddev)?failover.maxReconnectAttempts=20,
connectedURI = null }) failed: Connection closed due to
sole-connection-enforcement-policy 'refuse-connection' [condition =
amqp:invalid-field]

I found this in the C++ wiki that seems related:
command line switch '--connection-limit-per-user' 

but I can't find anything like that with broker-j.



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

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@qpid.apache.org
For additional commands, e-mail: users-help@qpid.apache.org


Re: sole-connection-enforcement-policy with apache-qpid-jms-0.29.0

Posted by Rob Godfrey <ro...@gmail.com>.
The JMS specification defines that an attempt to create more than one
connection with the same "clientID" should result in failure (see for
example:
https://docs.oracle.com/javaee/7/api/javax/jms/Connection.html#setClientID-java.lang.String-
).

Qpid Broker-J is simply enforcing this requirement of JMS using the
mechanism defined by this proposed extension to AMQP:
https://www.oasis-open.org/committees/download.php/61724/amqp-soleconn-v1.0-wd03.pdf

To allow for multiple connections you must either not set the clientID or
use a different clientID on each connection.

Hope this helps,
Rob

On 16 February 2018 at 21:25, bryand <br...@bldixon.net> wrote:

> I'm using apache-qpid-broker-j-7.0.1 and have been doing some development
> with client apache-qpid-jms-0-x-6.3.0.   That has been working fine so far
> in early development.
>
> However, I have an app that I can use the newer client
> apache-qpid-jms-0.29.0 and its fine when I  create one connection.  However
> as soon as I try to create a second connection (I'm using the same user
> account for all connections), the connection can't be created - the qpid
> client code just loops with this log message:
>
> WARN  AmqpResourceBuilder            - Open of resource:(JmsConnectionInfo
> {
> ID:ecf41e07-9797-4aaa-88e4-db3cb3111293:2, configuredURI =
> failover:(amqp://spgappdevmutil:5672?amqp.vhost=spgqpiddev,amqp://
> appprd02:5672?amqp.vhost=spgqpiddev,amqp://appprd02:
> 5682?amqp.vhost=spgqpiddev)?failover.maxReconnectAttempts=20,
> connectedURI = null }) failed: Connection closed due to
> sole-connection-enforcement-policy 'refuse-connection' [condition =
> amqp:invalid-field]
>
> I found this in the C++ wiki that seems related:
> command line switch '--connection-limit-per-user'
>
> but I can't find anything like that with broker-j.
>
>
>
> --
> Sent from: http://qpid.2158936.n2.nabble.com/Apache-Qpid-users-
> f2158936.html
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@qpid.apache.org
> For additional commands, e-mail: users-help@qpid.apache.org
>
>