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 6e468b4540754cad5cd30de373cadc026c998669)
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 021c82859cf4361eb31b21fdbac17655ae9e368d)
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 65b0f2ad0d48845ad54681ac0eff832de122e2a9)
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 f69fd6f0020290752a7424479821c22d94f9b8b7)
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 5e2adc0ed7dfe2e827bdef878f1c8cde12ff5773)
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 6013441a9a7c4a13f7412d6d72638de0f420e6a3)
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 3ca439cadaa8c40f506aa1ef683b36624d216254)
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 41211c78d19b545a2352584d3598346aa3705be4)
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 96ce14b278fef9e5f428f1c3c07ce5c09fd8f9a8)
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 35bd3ad938f5c378b17a34980d2f3480bf3bbfc3)
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.
The handshake now takes place inside of the async task that timesout so
that if the SSL handshake takes too long the connection attempt will
honor protocolDetectionTimeout and actually timeout. Also, change the
default of protocolDetectionTimeout to 30 seconds so it matches the rest
of the broker's default connection timeout settings.