You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@qpid.apache.org by Jan Rinze <ja...@gmail.com> on 2015/07/09 16:25:38 UTC

What's the equivalent of the JMS mandatory_topic flag in C++?

What's the equivalent of the JMS mandatory_topic flag in C++?

Sending a message to an direct exchange that has no alternative exchange
setup and no binding for the specified key will always silently drop the
message. There seems to be no documentation on how to receive an exception
in C++ like in the JMS implementation.

Best regards,
Jan Rinze.

>From the documentation of the JMS API:
------------------------------
Mandatory Messages
With this feature, publishing a message with a routing key for which no
binding exists on the exchange will result in the message being returned to
the publisher's connection.

The Message is returned to the application in an asynchronous fashion via
the Connection's ExceptionListener. When a message is returned, it will be
invoked with a JMSException whose linked exception is an
AMQNoRouteException. The returned message is available to the application by
calling AMQNoRouteException#getUndeliveredMessage(). The ExceptionListener
will be invoked exactly once for each returned message.

The mandatory message feature is turned on by default for Queue destinations
and off for Topic destinations. This can be overridden using system
properties qpid.default_mandatory and qpid.default_mandatory_topic for
Queues and Topics respectively.

Note

Please note, according to AMQP specifications the mandatory flag on a
message tells the server how to react if the message cannot be routed to a
queue. If this flag is set, the server will return an unroutable message
with a Return method. If this flag is zero, the server silently drops the
message. Please, refer AMQP specifications for more details.
--------------------------------




--
View this message in context: http://qpid.2158936.n2.nabble.com/What-s-the-equivalent-of-the-JMS-mandatory-topic-flag-in-C-tp7627939.html
Sent from the Apache Qpid users mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@qpid.apache.org
For additional commands, e-mail: users-help@qpid.apache.org


Re: What's the equivalent of the JMS mandatory_topic flag in C++?

Posted by Gordon Sim <gs...@redhat.com>.
On 07/09/2015 03:25 PM, Jan Rinze wrote:
> What's the equivalent of the JMS mandatory_topic flag in C++?
>
> Sending a message to an direct exchange that has no alternative exchange
> setup and no binding for the specified key will always silently drop the
> message. There seems to be no documentation on how to receive an exception
> in C++ like in the JMS implementation.
>
> Best regards,
> Jan Rinze.
>
>  From the documentation of the JMS API:
> ------------------------------
> Mandatory Messages
> With this feature, publishing a message with a routing key for which no
> binding exists on the exchange will result in the message being returned to
> the publisher's connection.

The mandatory flag was a feature of the 0-8/0-9/0-9-1 protocols which 
aren't supported by any of the c++ APIs from Qpid.

In AMQP 0-10 the discard-unroutable and immediate delivery properties 
are defined to give similar (though not identical) behaviour. 
Unfortunately are not currently settable through qpid::messaging (the 
c++ API for which there is 0-10 support). (They aren't supported by the 
c++ broker either).

For AMQP 1.0 there is no equivalent defined in the specification.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@qpid.apache.org
For additional commands, e-mail: users-help@qpid.apache.org