Open hugegreenbug opened 7 years ago
Should we perhaps unsubscribe explicitly in the shutdown method so that the block is terminated cleanly.
Or at least return before parsing the payload to save CPU cycles?
Do you always see this error ?
I'm concerned that this implementation will result in message loss during shutdown as the message will have been consumed off the broker, and as we dont use ack'd message handling if the router.nil? is fired it'd silently drop the event (andperhaps others if there are other circumstances where router is nil...
Perhaps shutting down the broker connection before the router can become nil, or implementing a brief nack/ack handler for the router.emit might be solve that?
Fix for NoMethodError: undefined method `emit' for nil:NilClass errors with bunny 2.6.4 when exiting fluentd