This repo serves as a reproducible example of a bug (or not?)
where the ConsumeContext<T> scoped filter isn't called when receiving
a response from a request using IRequestClient<T>.
This has been tested with the in-memory provider and with the RabbitMQ provider.
Your goal will be to make SlicePizzaFilter work, so received pizzas are sliced
correctly and make the client happy. Without touching DeliverPizzaConsumer
because that's just cheating.
- .NET 6 SDK
Program.cscontains all the service registrations, and a dumb simple API to call theIRequestClient<T>using Minimal APIs.DeliverPizza.cscontains theDeliverPizzarequest, thePizzaDeliveredresponse and theDeliverPizzaConsumerwhich processes the request.SlicePizzaFilter.cscontains the filter that is supposed to slice the pizza when receiving it, it's registered as a scoped filter forConsumeContext<T>.