Skip to content

Commit e2db34d

Browse files
committed
Always make the consumermain/producermain queue durable.
1 parent f759a31 commit e2db34d

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ private void runIt() throws IOException {
110110
Channel channel = _connection.createChannel();
111111

112112
String queueName = "test queue";
113-
channel.queueDeclare(queueName);
113+
channel.queueDeclare(queueName, true);
114114

115115
String exchangeName = "test completion";
116116
channel.exchangeDeclare(exchangeName, "fanout", false, false, true, null);

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,7 @@ private void runIt() throws IOException {
150150
_channel = _connection.createChannel();
151151

152152
String queueName = "test queue";
153-
_channel.queueDeclare(queueName, shouldPersist());
153+
_channel.queueDeclare(queueName, true);
154154

155155
if (shouldCommit()) {
156156
_channel.txSelect();

0 commit comments

Comments
 (0)