Reactor now has middleware support

As some of you know, I have been working on a tight integration between Ash and Reactor which has triggered a few small bug fixes in Spark and some improvements in Reactor.

One of those improvements is what we’re calling Reactor.Middleware which adds callback hooks to modify the Reactor context at key parts of it’s run, replace results and errors and receive detailed events about step invocation. This feature was added to support transaction-like batching of Ash notifications and Ash’s tracing system but I can see it being very useful in the future for other projects also.

Some of the use cases for Reactor middlewares are:

  • Emitting telemetry events.
  • Detailed logging output.
  • Execution visualisation.

The more I work on Reactor the more excited I get about it’s graph-based asynchronous execution engine and how it makes saga flows declarative and performant.

Middleware support is released on version 0.6.0 of Reactor. Grab it and give it a spin!

12 Likes