watermill icon indicating copy to clipboard operation
watermill copied to clipboard

message subscriber BulkRead idle timeout or receive timeout

Open kevpie opened this issue 5 years ago • 1 comments

I've created a PR to describe what looks like an unintended side affect. What I'm proposing is to illustrate what I think is wrong. It may not be the correct solution.

https://github.com/kevpie/watermill/pull/1

This PR is mainly for discussion regarding the intended behavior.

Not sure if the intention of timeout to function as an idle timeout or a collection timeout. It currently behaves as an idle timeout with the bound of taking up to timeout * limit in length if each message takes almost > timeout to arrive. Should it collect messages for up to timeout and then return?

kevpie avatar Oct 26 '20 18:10 kevpie

Hello @kevpie, yeah, it's a good point that it should probably work in the way how you implemented that...but it will break backward compatibility :(

If you think that it may be useful for you, you can separate a new function in your PR that will work in that way. We can also create two functions (one working in the old and the new working in a new way) and deprecate the old one.

roblaszczak avatar Dec 30 '20 12:12 roblaszczak