Preventing a divide by 0 error by taking a local reference to the
prefetch size to guarantee that the value doesn't change after the > 0
check
(cherry picked from commit 42dabb7a7a)
Fixing PList size tracking by moving the null assignment on removal to
after the onRemoval method is called to make sure that the decrement is
done properly.
(cherry picked from commit d635a36940)
Fixing an issue that caused statistics for a transactional temporary
queue to be updated twice by mistake. Moved the statistics update into
tryOrderedCursorAdd so that the update is called immediately only if
not inside a transaction.
(cherry picked from commit 903dec615c)
Checking for leading wildcard in the prefix for a virtualtopic,
modifying the behavior of shouldDispatch in the VirtualTopicInterceptor.
(cherry picked from commit 6bf5987921)
Added two new properties for configuration to a network bridge,
advisoryPrefetchSize and advisoryAckPercentage. By default
advisoryPrefetchSize is set to 0, which is disabled, and will use the
prefetchSize value unless otherwise set. Also added validation to
prefetchSize to make sure it is greater than 0 as 0 is not allowed.
(cherry picked from commit 297eadf746)
Moving beforeMarshall back to the store implementations because we don't
want all store implementations to marshall (such as memory store)
This reverts commit 32913408a6.
Reverting the change to move clearMarshalledState into the callback
listener as beforeMarshall is now called before the async message add
Revert 7f5c09f2d7
Update for some added thread safety. Adds method healthStatus that will
regenrate the status from the healthList data which is more intuitive
than the getCurrentStatus which doesn't update state and requires
periodic calls to healthList to capture current metrics.
(cherry picked from commit 19fd084a83)
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)