Class: MicroQ::Middleware::Chain
- Inherits:
-
Object
- Object
- MicroQ::Middleware::Chain
- Defined in:
- lib/micro_q/middleware/chain.rb
Overview
An Array wrapper that holds the class name of middlewares to call around the execution of messages. The most basic middleware must yield to the given block to allow the message to be invoked. Not yielding causes the message to be dropped and not invoked.
A minimal middleware: class MyFunMiddleware
def call(worker, )
# Do something fun here ...
yield
# More fun goes here ...
end
end
Defined Under Namespace
Instance Method Summary collapse
-
#client ⇒ Object
Middleware chain that is run around message push.
-
#server ⇒ Object
Middleware chain that is run around execution of messages.