Correct placement for exception catching
See original GitHub issueWe are experiencing a bit of trouble when using the consumer in particular. Mainly because exceptions doesn’t seem to bubble-up.
Say we create a Consumer from a subscription that doesn’t exist (could be anything that causes FaulAction.Rethrow
or ThrowException
). No exceptions will present themselves.
Where, or rather when are they actually thrown?
The only feasibly hook ive found (on the consumer) is to call IsFinalState
or use a Monitor (although throwing in the monitor also does not bubble-up anywhere), but if we are already awaiting messages or receiving, checking final state is not feasible (unless implementing fast cancellationtoken cancels and retrying or something).
So my questions are;
- Where are we expected to catch exceptions? (Monitor, ExceptionHandler, usage of consumer?)
- What is the proper pattern for handling faulted state? (re-create the consumer/producer?)
In my tests neither Receieve
nor Messages
throw, like the (somewhat) idiomatic equivalent on the producer side (Send
).
No exceptions seems to bubble up for the Consumer.
Issue Analytics
- State:
- Created 8 months ago
- Comments:9 (5 by maintainers)
Top GitHub Comments
Version 2.10.0 (just released) fixes this 😃
Thanks, I will look into it 😃