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 2007/04/12 12:25:29 UTC

[java] [client] Automatic creation and binding of JMS Queues with consumer in Java Client

Hello all,

I've just recently be going over the fact that we automatically
declare and bind queues when we create a new consumer. In a real world
system we wouldn't want to have client code automatically
creating/binding JMS Queues. In fact the broker should prevent this ..
but RBAC/ACLs already have a JIRA and I have a more pressing need to
prevent the client side creations.

I have augmented my local code to stop the active creation and
bindings by default and setting system property:

org.apache.qpid.client.declareJMSQueueWithConsumer = true

will restore the previous behaviour.

I just wondered if any of my fellow qpid-ians would have a problem
with this change in the java client until we re-layer and remove this
auto-creation code for queues completely.

-- 
Martin Ritchie

RE: [java] [client] Automatic creation and binding of JMS Queues with consumer in Java Client

Posted by Colin Crist <co...@hermesjms.com>.
Hi,

Having both makes sense as some applications rely on an error when a queue
is not present. ActiveMQ for exmaple creates queues server side on the fly
when you use the session to create them client side and it can be a pain.

Not posted here for ages, will give the M2 build a spin when its out with
Hermes.

Regards,

Colin.
http://hermesjms.com

> -----Original Message-----
> From: Robert Greig [mailto:robert.j.greig@gmail.com] 
> Sent: 12 April 2007 12:35
> To: qpid-dev@incubator.apache.org
> Subject: Re: [java] [client] Automatic creation and binding 
> of JMS Queues with consumer in Java Client
> 
> On 12/04/07, Martin Ritchie <ri...@apache.org> wrote:
> 
> > I've just recently be going over the fact that we automatically 
> > declare and bind queues when we create a new consumer. In a 
> real world 
> > system we wouldn't want to have client code automatically 
> > creating/binding JMS Queues.
> 
> Well, we may not want to have that enabled by default but it 
> can be useful functionality.
> 
> > I just wondered if any of my fellow qpid-ians would have a problem 
> > with this change in the java client until we re-layer and 
> remove this 
> > auto-creation code for queues completely.
> 
> I think it's sensible that the default is that queues cannot 
> be created on the fly but we currently have at least one 
> application in production that relies on this behaviour so 
> any future solution must support this in some form.
> 
> RG
> 



Re: [java] [client] Automatic creation and binding of JMS Queues with consumer in Java Client

Posted by Robert Greig <ro...@gmail.com>.
On 12/04/07, Martin Ritchie <ri...@apache.org> wrote:

> I've just recently be going over the fact that we automatically
> declare and bind queues when we create a new consumer. In a real world
> system we wouldn't want to have client code automatically
> creating/binding JMS Queues.

Well, we may not want to have that enabled by default but it can be
useful functionality.

> I just wondered if any of my fellow qpid-ians would have a problem
> with this change in the java client until we re-layer and remove this
> auto-creation code for queues completely.

I think it's sensible that the default is that queues cannot be
created on the fly but we currently have at least one application in
production that relies on this behaviour so any future solution must
support this in some form.

RG

Re: [java] [client] Automatic creation and binding of JMS Queues with consumer in Java Client

Posted by Gordon Sim <gs...@redhat.com>.
Martin Ritchie wrote:
> Hello all,
> 
> I've just recently be going over the fact that we automatically
> declare and bind queues when we create a new consumer. In a real world
> system we wouldn't want to have client code automatically
> creating/binding JMS Queues. In fact the broker should prevent this ..
> but RBAC/ACLs already have a JIRA and I have a more pressing need to
> prevent the client side creations.

Though the first (non-passive) declare will create a queue, in general 
declare doesn't always imply create (and the passive flag can prevent 
creation). The aim of the declare is to assert that a queue exists. How 
valuable that actually is depends on the use I suspect. It does seem 
worth declaring a queue before sending (setting the passive flag where 
we don't want it to be created on the fly, but want to rely on it being 
statically configured). As an attempt to consume from a non-existent 
queue results in the same error as passively declaring that queue, it 
seems like there is less value there.

> I have augmented my local code to stop the active creation and
> bindings by default and setting system property:
> 
> org.apache.qpid.client.declareJMSQueueWithConsumer = true
> 
> will restore the previous behaviour.
> 
> I just wondered if any of my fellow qpid-ians would have a problem
> with this change in the java client until we re-layer and remove this
> auto-creation code for queues completely.

I quite like the ability to dynamically configure the queues needed for 
an application. I do agree that you want tight control over that as it 
may not be appropriate in many deployments.