Consumer Filtering
We have a scenario were we use the same queue for multiple message types. There is a header on the message to define which messageType it is.
It would be useful to filter consumers based on header values. For example
cbb.Consume<MyMessageType>(x => x
.Queue("some-queue")
.Filter(x => x.Header.ResourceType == nameof(MyMessageType))
.WithConsumer<MyMessageTypeConsumer>()
cbb.Consume<MyMessageType2>(x => x
.Queue("some-queue")
.Filter(x => x.Header.ResourceType == nameof(MyMessageType2))
.WithConsumer<MyMessageType2Consumer>()
Would the filtering be based on haders alawys in your case? What transport are you using?
Yes just the headers we would be filtering upon and its SQS for this scenario.
I could make it happen. Is there any urgency on this? Also, happy to accept a PR in case you want to help.
Its not urgent, we have worked around it for the moment, its just an observation/potential improvement
Morning: added a proposal PR for this.
Closed via #447