Skip to content

Commit e1758d2

Browse files
committed
allow setting of heartbeat interval in MulticastMain
1 parent e937aa9 commit e1758d2

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

test/src/com/rabbitmq/examples/MulticastMain.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,7 @@ public static void main(String[] args) {
8787
int timeLimit = intArg(cmd, 'z', 0);
8888
List flags = lstArg(cmd, 'f');
8989
int frameMax = intArg(cmd, 'M', 0);
90+
int heartbeat = intArg(cmd, 'b', 0);
9091

9192
//setup
9293
String id = UUID.randomUUID().toString();
@@ -95,6 +96,7 @@ public static void main(String[] args) {
9596
factory.setHost(hostName);
9697
factory.setPort(portNumber);
9798
factory.setRequestedFrameMax(frameMax);
99+
factory.setRequestedHeartbeat(heartbeat);
98100

99101
Thread[] consumerThreads = new Thread[consumerCount];
100102
Connection[] consumerConnections = new Connection[consumerCount];
@@ -181,6 +183,7 @@ private static Options getOptions() {
181183
flag.setArgs(Option.UNLIMITED_VALUES);
182184
options.addOption(flag);
183185
options.addOption(new Option("M", "framemax", true, "frame max"));
186+
options.addOption(new Option("b", "heartbeat", true, "heartbeat interval"));
184187
return options;
185188
}
186189

0 commit comments

Comments
 (0)