Skip to content

Commit 66b139b

Browse files
authored
Merge pull request #134 from ningning-chen/zmqsocket
zmqsocket reconnect
2 parents 4b83e7f + 2259d38 commit 66b139b

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/main/java/com/cisco/trex/stateless/TRexTransport.java

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,11 @@ public TRexTransport(String host, String port, int timeout, IDataCompressor data
4040
int actualTimeout = timeout <= 0 ? DEFAULT_TIMEOUT : timeout;
4141
zmqSocket.setReceiveTimeOut(actualTimeout);
4242
zmqSocket.setSendTimeOut(actualTimeout);
43+
zmqSocket.setHeartbeatIvl(10 * 60 * 1000);
44+
zmqSocket.setHeartbeatTimeout(60000);
45+
zmqSocket.setReconnectIVL(20);
46+
zmqSocket.setReconnectIVLMax(500);
47+
zmqSocket.setTCPKeepAlive(1);
4348
this.connectionString = PROTOCOL + "://" + this.host + ":" + this.port;
4449
zmqSocket.connect(connectionString);
4550
this.dataCompressor = dataCompressor;

0 commit comments

Comments
 (0)