You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@qpid.apache.org by Jason Jones <ja...@verizon.net> on 2010/01/12 04:47:22 UTC

Sending a message to a non-existent exchange

I have a question about sending messages.  I found that if I attempt to 
send a message to a non-existent exchange from a session the session 
throws an exception and I am then unable to send any other messages 
through the same session, even if I am sending to another exchange that 
does exist.  What I'd like to know is whether this is normal?  Is there 
something I can do so that the session can somehow recover from this?  
This isn't necessarily a problem as I discovered it when I had mistyped 
an exchange name but I was curious if this was normal behavior or a bug.

-Jason

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


Re: Sending a message to a non-existent exchange

Posted by Rajith Attapattu <ra...@gmail.com>.
On Mon, Jan 18, 2010 at 12:15 PM, Jon Watte <jw...@gmail.com> wrote:
>>
>> If you are concerned about deliberately mis-behaved clients then
>> authentication is the way to go.
>
>
> I don't understand why. Authentication just means that someone is who they
> say they are. It doesn't mean that the "someone" is guaranteed to not
> mis-behave. Note that when I say "client," I mean any random customer of my
> service across the wider internet, not just a small, tightly-coupled set of
> trusted hosts.

Authentication + ACL will do this for you.
This will ensure the client will fail if it tries to do something it
isn't allowed.

Rajith

>
> Sincerely,
>
> jw
>
>
> --
> Americans might object: there is no way we would sacrifice our living
> standards for the benefit of people in the rest of the world. Nevertheless,
> whether we get there willingly or not, we shall soon have lower consumption
> rates, because our present rates are unsustainable.
>
>
>
> On Mon, Jan 18, 2010 at 1:48 AM, Gordon Sim <gs...@redhat.com> wrote:
>
>> On 01/16/2010 05:19 PM, Jon Watte wrote:
>>
>>> In the case of dynamically adding and removing exchanges, doesn't this
>>> mean
>>> that there is a race condition between an exchange being removed, and all
>>> clients knowing about it?
>>>
>>
>> Yes. If you remove an exchange that clients may be using without any
>> coordination with them, they will likely get an exception.
>>
>>
>>  If you required all clients to have to acknowledge an exchanged-removed
>>> message on some other queue before you could actually remove the exchange,
>>> then wouldn't you open yourself up to denial attacks by mis-behaved
>>> clients?
>>>
>>
>> If you are concerned about deliberately mis-behaved clients then
>> authentication is the way to go.
>>
>>
>> ---------------------------------------------------------------------
>> Apache Qpid - AMQP Messaging Implementation
>> Project:      http://qpid.apache.org
>> Use/Interact: mailto:users-subscribe@qpid.apache.org
>>
>>
>



-- 
Regards,

Rajith Attapattu
Red Hat
http://rajith.2rlabs.com/

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


Re: Sending a message to a non-existent exchange

Posted by Jon Watte <jw...@gmail.com>.
>
> If you are concerned about deliberately mis-behaved clients then
> authentication is the way to go.


I don't understand why. Authentication just means that someone is who they
say they are. It doesn't mean that the "someone" is guaranteed to not
mis-behave. Note that when I say "client," I mean any random customer of my
service across the wider internet, not just a small, tightly-coupled set of
trusted hosts.

Sincerely,

jw


--
Americans might object: there is no way we would sacrifice our living
standards for the benefit of people in the rest of the world. Nevertheless,
whether we get there willingly or not, we shall soon have lower consumption
rates, because our present rates are unsustainable.



On Mon, Jan 18, 2010 at 1:48 AM, Gordon Sim <gs...@redhat.com> wrote:

> On 01/16/2010 05:19 PM, Jon Watte wrote:
>
>> In the case of dynamically adding and removing exchanges, doesn't this
>> mean
>> that there is a race condition between an exchange being removed, and all
>> clients knowing about it?
>>
>
> Yes. If you remove an exchange that clients may be using without any
> coordination with them, they will likely get an exception.
>
>
>  If you required all clients to have to acknowledge an exchanged-removed
>> message on some other queue before you could actually remove the exchange,
>> then wouldn't you open yourself up to denial attacks by mis-behaved
>> clients?
>>
>
> If you are concerned about deliberately mis-behaved clients then
> authentication is the way to go.
>
>
> ---------------------------------------------------------------------
> Apache Qpid - AMQP Messaging Implementation
> Project:      http://qpid.apache.org
> Use/Interact: mailto:users-subscribe@qpid.apache.org
>
>

Re: Sending a message to a non-existent exchange

Posted by Gordon Sim <gs...@redhat.com>.
On 01/16/2010 05:19 PM, Jon Watte wrote:
> In the case of dynamically adding and removing exchanges, doesn't this mean
> that there is a race condition between an exchange being removed, and all
> clients knowing about it?

Yes. If you remove an exchange that clients may be using without any 
coordination with them, they will likely get an exception.

> If you required all clients to have to acknowledge an exchanged-removed
> message on some other queue before you could actually remove the exchange,
> then wouldn't you open yourself up to denial attacks by mis-behaved clients?

If you are concerned about deliberately mis-behaved clients then 
authentication is the way to go.

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


Re: Sending a message to a non-existent exchange

Posted by Jon Watte <jw...@gmail.com>.
In the case of dynamically adding and removing exchanges, doesn't this mean
that there is a race condition between an exchange being removed, and all
clients knowing about it?
If you required all clients to have to acknowledge an exchanged-removed
message on some other queue before you could actually remove the exchange,
then wouldn't you open yourself up to denial attacks by mis-behaved clients?

Sincerely,

jw


--
Americans might object: there is no way we would sacrifice our living
standards for the benefit of people in the rest of the world. Nevertheless,
whether we get there willingly or not, we shall soon have lower consumption
rates, because our present rates are unsustainable.



On Tue, Jan 12, 2010 at 12:15 AM, Gordon Sim <gs...@redhat.com> wrote:

> On 01/12/2010 03:47 AM, Jason Jones wrote:
>
>> I have a question about sending messages.  I found that if I attempt to
>> send a message to a non-existent exchange from a session the session
>> throws an exception and I am then unable to send any other messages
>> through the same session, even if I am sending to another exchange that
>> does exist. What I'd like to know is whether this is normal? Is there
>> something I can do so that the session can somehow recover from this?
>> This isn't necessarily a problem as I discovered it when I had mistyped
>> an exchange name but I was curious if this was normal behavior or a bug.
>>
>
> It is 'normal' behaviour in that it is what the AMQP specification
> requires.
>
>
> ---------------------------------------------------------------------
> Apache Qpid - AMQP Messaging Implementation
> Project:      http://qpid.apache.org
> Use/Interact: mailto:users-subscribe@qpid.apache.org
>
>

Re: Sending a message to a non-existent exchange

Posted by Gordon Sim <gs...@redhat.com>.
On 01/12/2010 03:47 AM, Jason Jones wrote:
> I have a question about sending messages.  I found that if I attempt to
> send a message to a non-existent exchange from a session the session
> throws an exception and I am then unable to send any other messages
> through the same session, even if I am sending to another exchange that
> does exist. What I'd like to know is whether this is normal? Is there
> something I can do so that the session can somehow recover from this?
> This isn't necessarily a problem as I discovered it when I had mistyped
> an exchange name but I was curious if this was normal behavior or a bug.

It is 'normal' behaviour in that it is what the AMQP specification requires.

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