You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
PUBHandler by default will bind a socket to the given address while the builtin listener will connect to the address. This is fine insofar as usually PUB is bound and SUB is connected but there is nothing that requires this pattern. In fact I would like to use PUBHandler as an easy way for distributed workers to send log messages to a central manager. With the default behavior if more than one worker uses the same address then I get errors regarding the address already being in use. I can work around this by creating the socket myself like:
but then I have to write the listener logic myself since there is no way to have it bind rather than connect. Ideally we could have options that allow us to select bind vs. connect, something like:
PUBHandler
by default will bind a socket to the given address while the builtin listener will connect to the address. This is fine insofar as usuallyPUB
is bound andSUB
is connected but there is nothing that requires this pattern. In fact I would like to usePUBHandler
as an easy way for distributed workers to send log messages to a central manager. With the default behavior if more than one worker uses the same address then I get errors regarding the address already being in use. I can work around this by creating the socket myself like:but then I have to write the listener logic myself since there is no way to have it bind rather than connect. Ideally we could have options that allow us to select bind vs. connect, something like:
and
If there is openness to allow for toggling this I'm willing to open a PR.
The text was updated successfully, but these errors were encountered: