Closed ryanking closed 7 years ago
I would have opened a PR but not sure your preference on the semantic change.
Not that this is not a hypothetical problem (if you follow the example, which I did). See here where I deployed my workaround:
Pretty clear that I was losing data.
should be fixed (defaulting to drain=true
as you suggested). Thanks for the report!
Example says:
Yet the
drain
param on the#close
method defaults to false, which means that when we get here the queue will not be drained but discarded.So, if you follow the example you have a race condidtion.
I would suggest that either
#drain
should default totrue
or there should be a separate method for draining vs closing.