Skip to content

Commit b42f848

Browse files
author
Matthew Sackman
committed
Merging bug22892 onto default
2 parents 1ab4163 + 58cb100 commit b42f848

File tree

3 files changed

+15
-8
lines changed

3 files changed

+15
-8
lines changed

test/src/com/rabbitmq/client/test/functional/PersistentTransactions.java

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -34,13 +34,15 @@
3434
import com.rabbitmq.client.MessageProperties;
3535
import com.rabbitmq.client.AMQP.BasicProperties;
3636

37-
public class PersistentTransactions
38-
extends TransactionsBase
39-
{
37+
public class PersistentTransactions extends TransactionsBase {
4038

41-
protected BasicProperties getMessageProperties()
42-
{
39+
protected BasicProperties getMessageProperties() {
4340
return MessageProperties.PERSISTENT_TEXT_PLAIN;
4441
}
4542

43+
@Override
44+
protected boolean declareDurableQueues() {
45+
return true;
46+
}
47+
4648
}

test/src/com/rabbitmq/client/test/functional/TransactionsBase.java

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,11 @@ protected void setUp()
5555
}
5656

5757
protected void createResources() throws IOException {
58-
channel.queueDeclare(Q, false, false, false, null);
58+
channel.queueDeclare(Q, declareDurableQueues(), false, false, null);
59+
}
60+
61+
protected boolean declareDurableQueues() {
62+
return false;
5963
}
6064

6165
protected void releaseResources() throws IOException {

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

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -105,8 +105,9 @@ 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 =
109+
channel.queueDeclare("", flags.contains("persistent"),
110+
true, false, null).getQueue();
110111
QueueingConsumer consumer = new QueueingConsumer(channel);
111112
if (prefetchCount > 0) channel.basicQos(prefetchCount);
112113
channel.basicConsume(queueName, autoAck, consumer);

0 commit comments

Comments
 (0)