You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@qpid.apache.org by RickW <ri...@in-deptheng.com> on 2009/04/14 23:23:15 UTC

REJECT Exception

In a publisher client I'd like to detect the condition where the broker rejects a message because (1) the target queue size has been reached and (2) I've selected the REJECT QueueSizePolicy. According to Red Hat's Messaging_User_Guide "The publisher of a message that exceeds the limit receives an exception". What exception will be thrown? (I assume catch(const exception& e) is too broad because there are other exceptions that may have to be handled differently.)
-- 
View this message in context: http://n2.nabble.com/REJECT-Exception-tp2635446p2635446.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


Re: REJECT Exception

Posted by Gordon Sim <gs...@redhat.com>.
RickW wrote:
> In a publisher client I'd like to detect the condition where the
> broker rejects a message because (1) the target queue size has been
> reached and (2) I've selected the REJECT QueueSizePolicy. According
> to Red Hat's Messaging_User_Guide "The publisher of a message that
> exceeds the limit receives an exception". What exception will be
> thrown? (I assume catch(const exception& e) is too broad because
> there are other exceptions that may have to be handled differently.)

A qpid::framing::ResourceLimitExceededException (which is a subclass of 
qpid::SessionException) will be thrown. It is defined in 
qpid/framing/reply_exceptions.h.

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