This is an automated email from the ASF dual-hosted git repository.
jbertram pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/activemq-artemis.git
The following commit(s) were added to refs/heads/master by this push:
new efa48c9 ARTEMIS-2081 listConfiguredQueues returns only queues created
by config
new c41edf9 This closes #2542
efa48c9 is described below
commit efa48c9782d5e6b91dcdb59949d4ac58c8df1db8
Author: Michael André Pearce <[email protected]>
AuthorDate: Thu Feb 7 17:19:23 2019 +0000
ARTEMIS-2081 listConfiguredQueues returns only queues created by config
Move configuration managed in persister before consumer dispatch so then
the fix can be applied in 2.6.x branch safely.
---
.../impl/journal/codec/PersistentQueueBindingEncoding.java | 14 +++++++-------
1 file changed, 7 insertions(+), 7 deletions(-)
diff --git
a/artemis-server/src/main/java/org/apache/activemq/artemis/core/persistence/impl/journal/codec/PersistentQueueBindingEncoding.java
b/artemis-server/src/main/java/org/apache/activemq/artemis/core/persistence/impl/journal/codec/PersistentQueueBindingEncoding.java
index 570a7fc..0f974aa 100644
---
a/artemis-server/src/main/java/org/apache/activemq/artemis/core/persistence/impl/journal/codec/PersistentQueueBindingEncoding.java
+++
b/artemis-server/src/main/java/org/apache/activemq/artemis/core/persistence/impl/journal/codec/PersistentQueueBindingEncoding.java
@@ -327,6 +327,11 @@ public class PersistentQueueBindingEncoding implements
EncodingSupport, QueueBin
lastValue = ActiveMQDefaultConfiguration.getDefaultLastValue();
}
if (buffer.readableBytes() > 0) {
+ configurationManaged = buffer.readBoolean();
+ } else {
+ configurationManaged = false;
+ }
+ if (buffer.readableBytes() > 0) {
consumersBeforeDispatch = buffer.readInt();
} else {
consumersBeforeDispatch =
ActiveMQDefaultConfiguration.getDefaultConsumersBeforeDispatch();
@@ -337,11 +342,6 @@ public class PersistentQueueBindingEncoding implements
EncodingSupport, QueueBin
delayBeforeDispatch =
ActiveMQDefaultConfiguration.getDefaultDelayBeforeDispatch();
}
if (buffer.readableBytes() > 0) {
- configurationManaged = buffer.readBoolean();
- } else {
- configurationManaged = false;
- }
- if (buffer.readableBytes() > 0) {
lastValueKey = buffer.readNullableSimpleString();
} else {
lastValueKey = ActiveMQDefaultConfiguration.getDefaultLastValueKey();
@@ -365,9 +365,9 @@ public class PersistentQueueBindingEncoding implements
EncodingSupport, QueueBin
buffer.writeByte(routingType);
buffer.writeBoolean(exclusive);
buffer.writeBoolean(lastValue);
+ buffer.writeBoolean(configurationManaged);
buffer.writeInt(consumersBeforeDispatch);
buffer.writeLong(delayBeforeDispatch);
- buffer.writeBoolean(configurationManaged);
buffer.writeNullableSimpleString(lastValueKey);
buffer.writeBoolean(nonDestructive);
}
@@ -382,9 +382,9 @@ public class PersistentQueueBindingEncoding implements
EncodingSupport, QueueBin
DataConstants.SIZE_BYTE +
DataConstants.SIZE_BOOLEAN +
DataConstants.SIZE_BOOLEAN +
+ DataConstants.SIZE_BOOLEAN +
DataConstants.SIZE_INT +
DataConstants.SIZE_LONG +
- DataConstants.SIZE_BOOLEAN +
SimpleString.sizeofNullableString(lastValueKey) +
DataConstants.SIZE_BOOLEAN;
}