Skip to content

Commit ac47355

Browse files
author
Simon MacMullen
committed
Use a durable queue since we may be sending persistent messages.
1 parent 5c493e2 commit ac47355

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -105,8 +105,8 @@ public static void main(String[] args) {
105105
Channel channel = conn.createChannel();
106106
if (consumerTxSize > 0) channel.txSelect();
107107
channel.exchangeDeclare(exchangeName, exchangeType);
108-
Queue.DeclareOk res = channel.queueDeclare();
109-
String queueName = res.getQueue();
108+
String queueName = "consumer-" + i;
109+
channel.queueDeclare(queueName, true, false, false, null);
110110
QueueingConsumer consumer = new QueueingConsumer(channel);
111111
if (prefetchCount > 0) channel.basicQos(prefetchCount);
112112
channel.basicConsume(queueName, autoAck, consumer);

0 commit comments

Comments
 (0)