Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

why pub socket does not reconnect #914

Open
huogan opened this issue Jun 13, 2022 · 1 comment
Open

why pub socket does not reconnect #914

huogan opened this issue Jun 13, 2022 · 1 comment

Comments

@huogan
Copy link

huogan commented Jun 13, 2022

Pub socket and Sub socket lose connection at the same time, but SUB will reconnect, pub does not reconnect,
Sub socket can receive messages, but others cannot receive the messages my Pub socket send.

			ZContext context = new ZContext();

			ZMQ.Socket publisher = this.context.createSocket(SocketType.PUB);

			publisher.setTCPKeepAlive(1);
			publisher.setTCPKeepAliveIdle(20);
			publisher.setTCPKeepAliveInterval(10);
			publisher.setHeartbeatIvl(2*1000);
			publisher.setHeartbeatTimeout(5*1000);
			publisher.setHeartbeatTtl(10*1000);
			publisher.setReconnectIVLMax(2000);
			publisher.setReconnectIVL(3*1000);
			publisher.setReconnectIVLMax(10*1000);

			publisher.connect(this.pubURL);
@huogan
Copy link
Author

huogan commented Jul 7, 2022

I used tcpdump to capture packets found that the socket connection was norma, but the message is not sent, and no data is found in the buffer queried by netstat on Linux

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

No branches or pull requests

1 participant