Skip to content

Commit 332bed3

Browse files
author
Matthew Sackman
committed
Persistent transactions should be in durable queues
1 parent 1f83d67 commit 332bed3

File tree

2 files changed

+12
-6
lines changed

2 files changed

+12
-6
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 {

0 commit comments

Comments
 (0)