Glad to hear you're enjoying examples.
Conceptually, events that are dispatched by a service can be handled by
many different services and success/failure of their processing is not a
concern of the service that dispatched the original event.
In nameko we have 3 distinct messaging patterns:
1. Request/Response with RPC or HTTP.
2. Dispatching Events, send by one service and handled by unknown amount of
other services (fire and forget)
3. Publishing Messages, send by from one service explicitly to be handled
by another but in fire and forget manner without waiting for the response.
Only first Request/Response pattern lands itself to where service
originating the message can handle outcome of the downstream service
processing. Handling of this exception between services is demonstrated in
examples with remote_error pattern
Otherwise if you're looking just to retry the event processing, you can
use nameko-amqp-retry library that provides you with capability to retry on
any entrypoint https://github.com/nameko/nameko-amqp-retry
On Wednesday, April 18, 2018 at 5:28:58 AM UTC+1, Chau Tran Anh Minh wrote:
Firstly, thanks very much for your effort in building nameko for
microservices. Especially, nameko-examples is really a great asset to me.
My project is mainly based on the example. However, I'm having some
troubles in propagating Exceptions from internal services back to Gateway
service when using a service to call event_dispatcher to another service.
In my case, a method of "orders" call event_dispatch to "products", and
then when a method of "products" throws an Exception (under event_handler
decorator), how can the method of "orders" catch the exception and
propagate back to Gateway service? I tried some params (options) in
event_handler such set requeue_on_error = True but it does not work. Anyone
can help me please? Thanks in advance.