Skip to content

Commit 2647096

Browse files
committed
Only bind non-predeclared queues.
1 parent 3bf898f commit 2647096

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

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

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -299,13 +299,13 @@ public List<String> configureQueues(Connection connection, String id) throws IOE
299299
false,
300300
autoDelete,
301301
queueArguments).getQueue();
302-
// skipping binding to default exchange,
303-
// as it's not possible to explicitly bind to it.
304-
if (!"".equals(exchangeName) && !"amq.default".equals(exchangeName)) {
305-
channel.queueBind(qName, exchangeName, id);
306-
}
307302
}
308303
generatedQueueNames.add(qName);
304+
// skipping binding to default exchange,
305+
// as it's not possible to explicitly bind to it.
306+
if (!predeclared && !"".equals(exchangeName) && !"amq.default".equals(exchangeName)) {
307+
channel.queueBind(qName, exchangeName, id);
308+
}
309309
}
310310
channel.abort();
311311

0 commit comments

Comments
 (0)