Disabling async queue message store when persistJMSRedelivered is turned
on for a destination. That flag will cause a sync update later on
dispatch which can cause a race condition if the original message add is
processed after the update. This can cause a duplicate message to be
stored.
(cherry picked from commit b2327db3b7)
Moving clearedMarshalledState execution to the async listener on an
async add to the message store. This is necessary to make sure this
logic doens't execute until after the message is marshalled for the
store.
(cherry picked from commit 75990ef14a)
Fixing the removal logic on virtual destination remove inside of
Advisory Broker to clean up virtual destination maps properly. Added a
test to verify. Also added new debug logging to help track down any
future issues.
(cherry picked from commit a2781e3966)
- recoverSubscription()
-- map is defined as LinkedHashMap<MessageId, Message>
-- msg is defined as <map> entry.getValue() so must be a Message
-- condition if (msg.getClass() == MessageId.class) could never be true
-- no need to cast at all when using generics
- recoverNextMessages()
-- basically same code copy/pasted so same fix
Removed 2 conditions from ServerSessionPoolImpl that would result in impossible casts. Conditions removed were trying to cast ActiveMQQueueSession and ActiveMQTopicSession to ActiveMQSession which is illegal.
Since it isn't obvious what to do if you get an ActiveMQQueueSession or ActiveMQTopicSession from getServerSession() I make it fall back to the else condition which raises an async exception. This is better than getting a ClassCastException at runtime.
Remove impossible cast in MemoryMessageStore
(cherry picked from commit 4a937def7d)
Ensure that a message sent to the store for the DLQ is rewritten so that
its updated values are written to prevent exirpation loops and loss of
reollback cause etc.
(cherry picked from commit 505a76a8bb)
AMQ-6122
Prevent messages on DLQ for looping back onto the same DLQ. Prevents
expired messages from bouncing back and duplicate messages from the
store from causing a deadlock.
(cherry picked from commit 66cfc7bab3)
The JavaRuntimeConfigurationBroker can now apply a subset of policy
properties retrospectively to existing destinations versus applying
all properties of the policy update.
(cherry picked from commit a253ad3c71)
Updated QueueBrowserSubscription to use a ConcurrentMap to avoid a
potential race condition when multiple queue browsers browse
multiple queues.
(cherry picked from commit d346a765e3)
Fixed contains method in PrioritizedPendinList which was not returning
correctly. This was causing messages to not be removed from the
dispatchPendingList when purge was called inside a Queue leading to an
eventual OOM error if enough messages were purged. This fix also
improves performance of the contains method.
(cherry picked from commit 8363c99b51)
Reverting commit because allowing 0 doesn't actually set the usage to
0 size. It ends up disabling the check all together which was the
opposite intention of the commit.
This reverts commit 3b658f8e1a.
Switching addMessageLast to tryAddMessageLast when messages are added
to a Queue pending cursor to allow a potential deadlock to be
avoided. There is more work to be done here but this will at least
prevent a deadlock from occurring.
Fix and test based off of a patch created by Timothy Bish.