The updated dropMessage method only decrements the destination metrics
if a message is removed from the pagedInMessages list to prevent
duplicate updates. There is also a case where we still need to update
metrics if the message never makes it into the pagedInMessages list in
the first place and that is on expiration so this patch fixes that. A
couple existing tests found this issue.
(cherry picked from commit 6e468b4540)
Only update metrics counters when message is removed from the
pagedInMessages list which is important to check in case of duplicates
(cherry picked from commit 021c82859c)
To save memory usage in some use cases add a new flag to PolicyEntry
called useTopicSubscriptionInflightStats to allow disabling the
inflight stats
(cherry picked from commit 65b0f2ad0d)
For the TopicSubscription case we can reduce the inflight statistics
memory footprint by not storing the entire message reference for in
flight messages and instead just a subset of the information needed.
(cherry picked from commit f69fd6f002)
StoreDurableSubscriberCursor now properly uses a timeout value when
attempting to add to the temporary store for non-persistent messages to
prevent an indefinite wait on free space
(cherry picked from commit 5e2adc0ed7)
We need to properly handle the re-addition of network proxy durables
after the brokers are restarted so removal is done properly
(cherry picked from commit 6013441a9a)
The client id token that is used to separate parts of a generated local
client id in a network bridge should be configurable so bridge names and
broker names can contain underscores if desired
(cherry picked from commit 3ca439cada)
Significantly reworking previous fix so that the client id is properly
changed when tracking network proxy subscriptions. This makes it so
removal is done properly
(cherry picked from commit 41211c78d1)
Durable network proxy subs will now be properly created across multiple
bridges when 3 or more brokers are used. Demand will be properly synced
and removed.
(cherry picked from commit 96ce14b278)
When queues are stopped the StoreUsage object needs to be stopped so it
will be removed from the parent StoreUsage. This allows the object to
be garbage collected and prevents a memory leak.
(cherry picked from commit 35bd3ad938)
When Camel is run embedded within ActiveMQ it's shutdown is called at
the point the broker is already stopped, this can lead to data loss as
there could be exchanges that have not ended.
This adds the ability to specify preStopHook(s) that can be invoked
during ActiveMQ shutdown but before the broker is shutdown.
With this Camel can gracefully shutdown while the broker is still
started.