qpid-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Robert Godfrey <rob.j.godf...@gmail.com>
Subject Re: How to know when a message could not be enqueued?
Date Thu, 01 Oct 2009 21:19:11 GMT
According to the AMQP 0-10 spec, if you set the accept-mode for the message
transfer as explicit and do not set the discard-unroutable property on the
message delivery-properties on the message being transferred ... then the
broker should send the client a reject command if the message cannot be
enqueued.

Is this implemented by the C++ broker?  And if so could this be used to
detect the condition being described?

-- Rob

2009/10/1 Jonathan Robie <jonathan.robie@redhat.com>

> One way is to create a "dead letter queue" that receives messages that
> could not be delivered, and bind it to a "dead letter exchange".
> session.exchangeDeclare(arg::exchange="deadletter.exchange",
> arg::type="fanout");
> session.queueDeclare(arg::queue="deadletter_queue");
> session.exchangeBind(arg::exchange="deadletter.exchange",
> arg::queue="deadletter.queue");
>
> Now declare the exchange you will publish to, using the alternateExchange
> property to specify a dead letter exchange:
>
> session.exchangeDeclare(arg::exchange="my.topic", arg::type="topic",
> arg::alternatExchange="deadletter.exchange");
>
> If an alternate exchange is specified, messages that can not be delivered
> to any queue are sent to the alternate exchange.
>
> Jonathan
>
> Acácio Centeno wrote:
>
>> Hi,
>>
>>
>>                How do a producer app knows when a message could not be
>> delivered? I post a message to a queue that does not exist, and the QPid
>> log
>> states:
>>
>>
>> 2009-oct-01 14:00:35 info DirectExchange amq.direct could not route
>> message
>> with key bridge.account.usage; no matching binding found
>>
>>
>>                But the application receives no indication about the
>> problem.
>>
>> Thanks,
>>
>> Acácio.
>>
>>
>>
>>
>
>
> ---------------------------------------------------------------------
> Apache Qpid - AMQP Messaging Implementation
> Project:      http://qpid.apache.org
> Use/Interact: mailto:users-subscribe@qpid.apache.org
>
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message