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.
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.
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
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
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
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.
Enabling will allow dispatch to continue even when end to some consumer queues
fail due to resource constraints.
The existing systemUsage sendFailIfNoSpace and sendFailIfNoSpaceAfterTimeout are
promoted to destination policy options allowing selective destinations to fail a
send with an exception. The global system usage options are still in place.
When dropOnResourceLimit=true dispatch will continue in the event that any
subscription queue throws a resource limit exception on send failure.
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.
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.