Skip to content

Commit 0de0088

Browse files
Don't predeclare any queues when --predeclared and -y 0 are combined
See #25 for reasoning. Per discussion with @liwang-pivotal. Fixes #25.
1 parent 581de31 commit 0de0088

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/main/java/com/rabbitmq/perf/MulticastParams.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -251,7 +251,9 @@ public Consumer createConsumer(Connection connection, Stats stats, String id) th
251251
}
252252

253253
public boolean shouldConfigureQueues() {
254-
return consumerCount == 0 && !(queueNames.size() == 0);
254+
// don't declare any queues when --predeclared is passed,
255+
// otherwise unwanted server-named queues without consumers will pile up. MK.
256+
return consumerCount == 0 && !predeclared && !(queueNames.size() == 0);
255257
}
256258

257259
public List<String> configureQueues(Connection connection, String id) throws IOException {

0 commit comments

Comments
 (0)