How can I cancel the execution of a Consume method of an IConsumer<>? I tried to create a cancellation token and use another thread to trigger the cancellation, and I can get a ConsumerCancelledException, but I could not handle the Fault<> message. E.g.
- I have a
MyDataConsumer: IConsumer<MyData>andMyDataFaultConsumer: IConsumer<Fault<MyData>>: IConsumer<Fault<MyData>> - The
IConsumer<MyData>throws anConsumerCancelledException - The failed message went into the
MyData_errorqueue, but it did not go to theMyDataFaultqueue
However, if I directly throw an exception in my MyDataConsumer, my fault consumer can get the data. It seems the ConsumerCancelledException is handled differently than other exceptions.