Moving beforeMarshall back to the store implementations because we don't
want all store implementations to marshall (such as memory store)
This reverts commit b9b98a45ce.
Reverting the change to move clearMarshalledState into the callback
listener as beforeMarshall is now called before the async message add
Revert 75990ef14a
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.
Refactor the iterator implementation in the PrioritizedPendingList to
not copy elements and instead use the level iterators. Add some
additional tests.
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.
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.
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.
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.
Slight refactoring to make the WildcardFinder class use a static method
so that we don't have to allocate throw away objects that will
immediately be garbage collected.
- 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
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.
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.
The JavaRuntimeConfigurationBroker can now apply a subset of policy
properties retrospectively to existing destinations versus applying
all properties of the policy update.