1

It's very straightforward on HTTP call between microservices to propagate exception to caller/front-end.

But how to propagate exception on event-driven/message queue (ie. RabbitMQ) microservice to the caller/front-end?

luthfianto
  • 1,746
  • 3
  • 22
  • 37
  • 2
    Similar to [Dealing with exceptions in an event-driven world](https://stackoverflow.com/q/49955554/697630) – Edwin Dalorzo Jun 05 '19 at 20:40
  • Please clarify your thoughts, as propagating an exception through HTTP or a queue is straightforward IMO in both cases – Adonis Jun 06 '19 at 22:39

1 Answers1

1

I would recommend Cadence Workflow which is much more powerful solution for microservice orchestration and provides exception handling propagation across long running operations out of the box.

It offers a lot of other advantages over using queues for your use case.

  • Built it exponential retries with unlimited expiration interval
  • Support for long running heartbeating operations
  • Ability to implement complex task dependencies. For example to implement chaining of calls or compensation logic in case of unrecoverble failures (SAGA)
  • Gives complete visibility into current state of the update. For example when using queues all you know if there are some messages in a queue and you need additional DB to track the overall progress. With Cadence every event is recorded.
  • Ability to cancel an update in flight.

See the presentation that goes over Cadence programming model.

Maxim Fateev
  • 6,458
  • 3
  • 20
  • 35