def consume_message_with_notify(<EOL>notifier_uri_getter):
def consume_message_with_notify_decorator(<EOL>method):<EOL><INDENT>@consume_message<EOL>def wrapper(<EOL>self,<EOL>data):<EOL><INDENT>notifier_uri = notifier_uri_getter(self)<EOL>client_id = data["<STR_LIT>"]<EOL>try:<EOL><INDENT>method(self, data)<EOL>notify_client(notifier_uri, client_id, <NUM_LIT:200>)<EOL><DEDENT>except Exception as exception:<EOL><INDENT>notify_client(notifier_uri, client_id, <NUM_LIT>, str(exception))<EOL>raise<EOL><DEDENT><DEDENT>return wrapper<EOL><DEDENT>return consume_message_with_notify_decorator<EOL>
Decorator for methods handling requests from RabbitMQ

This decorator builds on the :py:func:`consume_message` decorator. It extents
it by logic for notifying a client of the result of handling the
request.

The *notifier_uri_getter* argument must be a callable which accepts
*self* and returns the uri of the notifier service.