qpid-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Rajith Attapattu <rajit...@gmail.com>
Subject Re: Question about createQueue JMS method
Date Wed, 11 Mar 2009 19:21:50 GMT
On Wed, Mar 11, 2009 at 12:47 PM, ffrenchm <ffrench.mathilde@gmail.com> wrote:
> Hello,
> If I want to send message on non existing queue "Q1" without any consumer on
> this queue, I notice that no queue "Q1" are created. I would like to know :
> 1) why queue are created when creating JMS consumer and not JMS producer ?
The JMS producer does not create and bind any queues.

> 2) where are pushed the messages sended by my sender ? Is there a dead
> letter queue in QPID ? Why do I not have an exception which tell me the
> queue doesn't exist ?

As per the AMQP spec the following is the define behaviour.
If the immediate flag on the delivery properties is not set then the
message will be silently dropped.
If the immediate flag is set and there are no active consumers ready
to take the message then the message is considered unroutable.

The treatment of unroutable messages is dependent on the value of the
discard-unroutable flag
If this flag is set it will be discarded. If not set, an unroutable
message should be handled by reject (which will results in an
exception on the sender side) when accept-mode is explicit; or by
routing to the alternate-exchange if defined when accept-mode is none.

However a couple of things are not implemented yet.
The c++ broker does not implement the functionality for immediate or
The JMS client has no way to set the discard-unroutable or immediate flags.

We intend to fix this behaviour and I will create JIRA's for these items.

Here is a reasonable workaround.
When you declare the exchange you could specify an alternative
exchange. Currently the c++ broker will try the alternative exchange
if the current exchange cannot route the message (before dropping the
message). In your alternative exchange you can setup a queue to
collect these unroutable messages (sort of like a DLQ).

You could use qpid-config to setup the alternative exchange.



> Thanks for all
> --
> View this message in context: http://n2.nabble.com/Question-about-createQueue-JMS-method-tp2462420p2462420.html
> Sent from the Apache Qpid users mailing list archive at Nabble.com.
> ---------------------------------------------------------------------
> Apache Qpid - AMQP Messaging Implementation
> Project:      http://qpid.apache.org
> Use/Interact: mailto:users-subscribe@qpid.apache.org


Rajith Attapattu
Red Hat

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

View raw message