[rabbitmq-discuss] Spying on "mandatory" messages
videlalvaro at gmail.com
Thu Mar 24 15:16:20 GMT 2011
For spying messages on an RPC setup I'm working on an implementation of the Smart Proxy messaging pattern: http://www.eaipatterns.com/SmartProxy.html perhaps you could implement that too.
This is what I've done so far: http://vimeo.com/20966661 which is at early stage of development and very alpha.
Also take a look at the Wire Tap messaging pattern: http://www.eaipatterns.com/WireTap.html
I guess most of the patterns from that book can be implemented with RabbitMQ, and some of them are already there but with different nomenclature.
Hope this helps,
On Mar 24, 2011, at 4:05 PM, Matthew Sackman wrote:
> Hi Charly,
> On Thu, Mar 24, 2011 at 03:35:35PM +0100, Charly Hamy wrote:
>> For the req/res scenario, I'm using the mandatory flag on my messages, so
>> that sending a request message to a disconnected component (no corresponding
>> queue declared on the broker) returns an error to the sender. This works as
> Well... you're using mandatory as a poor-man's form of resource
>> But now, I would want to plug new components to spy on those flows of
>> requests and responses, without interfering with the ongoing
>> communications... which is not by default compatible with my use of the
>> mandatory flag : when a "spy" component is monitorng request/response
>> messages, those messages end-up in its queue, then even if the actual target
>> component for those messages is not present on the broker (no queue), no
>> error is returned to the sender.
> Indeed, which is why mandatory is probably a mis-feature and should not
> be used. Basically, AMQP does not really provide any sort of sane
> resource monitoring. We've added in the 2.4.0 release consumer-death
> notifications, but that's not going to help you here. You really have a
> choice: make the queue non-exclusive and non-autodelete. Thus it always
> stays there and will always receive messages. Then, you have your
> clients just consume from it. The queue will do round-robining between
> the consumers and all should be well, but you might have reasons why you
> want the queue to be exclusive or autodelete. The other option is to use
> some other tool to do monitoring of your consumers and to address that
> problem outside of AMQP/RabbitMQ.
> Best wishes,
> rabbitmq-discuss mailing list
> rabbitmq-discuss at lists.rabbitmq.com
More information about the rabbitmq-discuss