You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@qpid.apache.org by Martin Ritchie <ri...@apache.org> on 2010/05/07 17:24:40 UTC

QPID-2576 : Queue ownership in Java Broker

Hi,

I've been adding the ability to detect slow consumers in the Java
broker with the view to disconnecting them if they hit a threshold.

However, in the process of adding this functionality and ensuring that
it worked across all the supported protocol versions in the Java
broker I noticed that we do not have a consistent view of who a queue
Owner is.

In 0-8/0-9/0-91 we use the client ID but in 0-10 we use the
authenticated username. Clearly this posses an interoperability issue.
The question is which one is 'right' or which one should we use.

As usual our friendly JMS Spec is nice a vague offering this advice
for the use of client id:
Section 4.3.2 (of the JMS Spec)
"The purpose of the 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
...
The only individual client state identified by JMS is that required to support
durable subscriptions."

Now we use the Queue Owner to perform exclusivity on a queue, or
rather I believe that is our intent. I have tidied the code up to use
the Owner value previously it was using Owner and Principal
interchangeably the question is what value should we use for Owner.

Client ID or Authenticated Username?

Cheers

Martin
-- 
Martin Ritchie

---------------------------------------------------------------------
Apache Qpid - AMQP Messaging Implementation
Project:      http://qpid.apache.org
Use/Interact: mailto:dev-subscribe@qpid.apache.org