resolves#123
This commit resolves an issue where unmatched acknowledgement
messages could be received when running a MDB consumer and
sending messages with a short TTL. The expiration logic when
receiveing an expired Message Ack will now only expire messages
in dispatch relating to the received ack, not all expired messages
in the dispatch list.
Use the latest openwire version marshallers in the KahaDB store when
starting from a clean install, drop back to the version used in the
existing store if one is found.
Resolves an issue when using mKahaDB that caused a MessageStore
being used by more than one destination to be deleted even though
there was still at least 1 other destination using the store.
This commit adds an Inflight message size statistic to SubscriptionStatistics
so we can know the size of all the messages that are inflight, besides just the count.
Added a getMessageSize method to MessageStore to support retrieving the
total message size of all stored messages for a destination. Added a
new storeMessageSize statistic to DestinationStatistics.
Remove of a durable subscription when the keepDurableSubActive flag is
true (default) did not actually stop and cleanup the still active cursor
due to the fact that the cursor checks the flag of its subscription to
see if it should stay active when its stop method is called. The
subscription needs to disable that flag when the subscription is being
removed so that the cursor will correctly shutdown.
A QueueBrowser no longer checks expiry on messages to prevent a
browser from hanging in between the hasMoreElements check and actually
getting a message. This means that if messages were in the queue when
the browser started it will receive messages even if they are now
expired. Even though the browser will get the expired message, the
broker will still expire it to prevent future access to it.
Thanks to Henno Vermeulen for providing a test case.
The code that adds subscriptions for retroactive subscribers did not
account for the case where the last ack position in the ackLocations
table is used as a placeholder for the next incoming message and there
may not be an element in the messageReference tracker for that index
especially after restart when the index is reloaded. The code needed to
check this when it iterates of the existing message references to add a
value so to avoid the NPE.
Also cleaned up the MQTT tests such that they place their data dir in
./target so that old stores get removed on 'mvn clean'
This commit is based off a patch submitted by admin@int3solutions.com.
It fixes several locations in the code where there are potential resource leaks.
fix for incorrect logic in reconnect attempt limits and also fix a case
where an NPE could occur (saw in the tests). Based on patch provided
by Benoit Wiart
Clean up the MQTT over WebSocket code to allow for handling link
stealing and inactivity monitor. Ensures that the web socket instances
get cleaned up on errors and avoids leaks that might otherwise arise.
Adds new tests for MQTT over WebSocket.
Adds some missing license headers as well.
StompSocket and MQTTSocket will now return the appropriate web socket
remote address based on the HttpRequestServlet that initialized
the web socket connection.