NsqSharp icon indicating copy to clipboard operation
NsqSharp copied to clipboard

Incoming message mutator

Open judwhite opened this issue 8 years ago • 0 comments

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

judwhite avatar Aug 10 '16 22:08 judwhite