NsqSharp
NsqSharp copied to clipboard
Incoming message mutator
Similar to how a message mutator can be used to modify payloads before publishing to nsqd, we may want to expose the messaging pipeline to allow incoming messages to be mutated. For example, a common lookup on a field.
Today subscribing to a topic/channel is implicit through implementing IHandleMessages<>
. A global incoming message mutator would be the easiest thing to do, but we may not want to pay that penalty for each message received, execute the type-checking code, or even have such logic in a central place.
When using the more primitive Consumer class it would be possible to implement this as part of the pipeline with an IHandler
implementation.
Need to think about if a pipeline hook or a global incoming mutator is more appropriate.
/cc @crazybert