Skip to content

feat: support XSubSocket#236

Open
BugenZhao wants to merge 1 commit intozeromq:masterfrom
BugenZhao:bz/xsub
Open

feat: support XSubSocket#236
BugenZhao wants to merge 1 commit intozeromq:masterfrom
BugenZhao:bz/xsub

Conversation

@BugenZhao
Copy link
Copy Markdown
Contributor

@BugenZhao BugenZhao commented Apr 9, 2026

This adds a public XSubSocket implementation to match the existing SocketType::XSUB support.

The implementation supports bind/connect, recv/send, subscribe/unsubscribe, and reconnect with subscription replay. As part of this, the shared subscription and reconnect logic used by SUB and XSUB is moved into a common backend while keeping SubSocket behavior unchanged. Subscription state is stored as raw bytes so non-UTF8 subscriptions are preserved correctly across unsubscribe and reconnect replay.

The change also adds coverage for basic XSUB <-> XPUB behavior, arbitrary XSUB -> XPUB sends, fanout, reconnect, proxying, and minimal cross-implementation tests against libzmq.

This should address #40.

Signed-off-by: Bugen Zhao <i@bugenzhao.com>
@Alexei-Kornienko
Copy link
Copy Markdown
Collaborator

Thanks for the PR. I will take a closer look on this on the weekend

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants