tulip.pkg.wmiddleware module exports the
wmiddleware package. It enables app-level worker middleware (as opposed to queue-specific worker middleware) in the order specified in the configuration. This means that messages will go through those middleware handlers in that order.
Registering this package provides the following method and field extensions.
Sets up the
__call metamethod on the App's metatable so
that it can be used as initial middleware.
f = App:lookup_wmiddleware(name)
Returns the wmiddleware registered for that name, or nil if none.
Registers the wmiddleware mw for name. If there is already a registered wmiddleware for name, throws an error.
Resolves the wmiddleware identified by a string in the array mws to their actual function (or callable table).
App.wmiddleware: array of string|function
The list of wmiddleware to apply to worker messages. When the App is called as initial middleware, it triggers that chain of middleware next, in sequence.