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
{{ message }}
Repository navigation
NetMQ: first messages lost before subscribers connect (slow joiner) #102
The NetMQ transport tests (Obvs.NetMQ.Tests, Category=Explicit) pass locally (10 of 11 runs on a Mac) but often fail on GitHub Actions runners. They were tried in the CI broker step in #82 and taken out again:
TestPublishSubscribe: TestMessage1 1 not received. The first message published is lost.
TestServiceBusWithNetMq: assertion TestCommand1 fails. The first command never reaches the service.
Likely cause: ZeroMQ's "slow joiner" behaviour. MessagePublisher creates and binds its socket lazily on the first publish, then sends immediately, before subscribers have finished connecting. PUB/SUB drops messages sent before a subscription is established. Slower runners make it more likely.
This affects real users too: in Obvs.NetMQ, the first messages published after startup can be silently dropped.
Possible fixes:
In the library: create and bind publisher sockets when the endpoint is created rather than on first publish. Optionally wait briefly, or use a handshake, before reporting ready.
In the tests: wait until subscribers are connected (for example, publish until one message is received) before asserting.
Done when the NetMQ tests pass reliably in CI and are added to the "Test transports against brokers" step.
Activity