AMQMethodListener is a listener that receives notifications of AMQP methods. The methods are packaged as events in {@link AMQMethodEvent}.
An event listener may be associated with a particular context, usually an AMQP channel, and in addition to receiving method events will be notified of errors on that context. This enables listeners to perform any clean up that they need to do before the context is closed or retried.
CRC Card Responsibilities |
---|
Accept notification of AMQP method events. | {@link AMQMethodEvent} |
Accept notification of errors on the event context. |
@todo Document why the exception is passed to the error method. Is it so that the exception can be passedfrom the event handling thread to another thread and rethown from there? It is unusual to pass exceptions as method arguments, because they have their own mechanism for propagating through the call stack, so some explanation ought to be provided.