Sending a message to a non-existent exchange

classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

Sending a message to a non-existent exchange

Jason Jones
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:[hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: Sending a message to a non-existent exchange

Gordon Sim
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:[hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: Sending a message to a non-existent exchange

Jon Watte-2
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 <[hidden email]> 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:[hidden email]
>
>
Reply | Threaded
Open this post in threaded view
|

Re: Sending a message to a non-existent exchange

Gordon Sim
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:[hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: Sending a message to a non-existent exchange

Jon Watte-2
>
> 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 <[hidden email]> 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:[hidden email]
>
>
Reply | Threaded
Open this post in threaded view
|

Re: Sending a message to a non-existent exchange

Rajith Muditha Attapattu
On Mon, Jan 18, 2010 at 12:15 PM, Jon Watte <[hidden email]> 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 <[hidden email]> 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:[hidden email]
>>
>>
>



--
Regards,

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

---------------------------------------------------------------------
Apache Qpid - AMQP Messaging Implementation
Project:      http://qpid.apache.org
Use/Interact: mailto:[hidden email]