Commit Graph

855 Commits

Author SHA1 Message Date
gtully c1e7dbd53b AMQ-6707 - fix trace log reporting in error 2018-05-09 12:17:29 +01:00
gtully ea70e827c0 AMQ-6707 - JDBC XA recovery and completion.
ensure pending transactions are visible for recovery without restart
sync store and cursor size during and after completion
ensure pending messages are not visible to browsers
retain transaction state on jdbc error
a bunch of new tests around xa completion
2018-04-26 14:58:48 +01:00
Christopher L. Shannon (cshannon) 1d2226e6cf Revert "AMQ-6947 - Make sure counters are updated correct on message drop"
This reverts commit 021c82859c.
2018-04-18 12:34:18 -04:00
Christopher L. Shannon (cshannon) 7123534e1b Revert "AMQ-6947 - Update Queue metrics on expiration"
This reverts commit 6e468b4540.
2018-04-18 12:34:07 -04:00
Christopher L. Shannon (cshannon) 6e468b4540 AMQ-6947 - Update Queue metrics on expiration
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.
2018-04-18 09:04:11 -04:00
Christopher L. Shannon (cshannon) 021c82859c AMQ-6947 - Make sure counters are updated correct on message drop
Only update metrics counters when message is removed from the
pagedInMessages list which is important to check in case of duplicates
2018-04-17 08:25:08 -04:00
Christopher L. Shannon (cshannon) 65b0f2ad0d AMQ-6940 - Add flag to disable TopicSubscription in flight stats
To save memory usage in some use cases add a new flag to PolicyEntry
called useTopicSubscriptionInflightStats to allow disabling the
inflight stats
2018-03-29 13:25:36 -04:00
Christopher L. Shannon (cshannon) f69fd6f002 AMQ-6940 - Reduce memory footprint for inflight statistics
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.
2018-03-29 09:00:26 -04:00
Christopher L. Shannon (cshannon) 5e2adc0ed7 AMQ-6924 - Fix StoreDurableSubscriberCursor non-persistent message add
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
2018-03-09 07:41:09 -05:00
gtully 060817552d [AMQ-4261] use WARN level for producer flow control events, DEBUG if blockedProducerWarningInterval=0 2018-03-02 12:17:24 +00:00
gtully 82c9f9531e [AMQ-6907] add selectorAware option to conditionalNetworkBridgeFilterFactory such that replay back to origin can happen if there are no matching local consumers 2018-02-28 16:07:52 +00:00
gtully efaf9cd77e [AMQ-6906] jdbc store; ensure rolled back prepared ack messages are recovered asap 2018-02-28 13:31:12 +00:00
gtully dd2572bcb1 [AMQ-6891] test and fix non tx variant of this leak 2018-01-30 10:51:30 +00:00
Christopher L. Shannon (cshannon) e5de25f4fc NO-JIRA: Add missing license headers 2018-01-29 08:10:50 -05:00
gtully f96a20e831 [AMQ-6891] apply fix and test from Radek Kraus with thanks. Pending cursor adds are now dropped on rollback 2018-01-26 13:18:00 +00:00
gtully 8c77e9553e [AMQ-6880] fix filter match logic when transport connector updateClusterFilter is in play 2018-01-03 16:07:06 +00:00
Łukasz Dywicki a8a032af09 AMQ-6861 Allow customisation of network bridge creation logic. 2017-12-20 22:00:54 -05:00
Christopher L. Shannon (cshannon) 56baba96c6 AMQ-6875 - Use the correct destination for Virtual destination consumers
when using Virtual Topics
2017-12-14 16:01:10 -05:00
gtully 9d98ee253f sync code default with config default to use jvm mbean server 2017-11-24 10:36:52 +00:00
gtully 151e17abfe [AMQ-6854] - periodic log warn on store limits reached in the same way 2017-11-21 14:56:02 +00:00
Christopher L. Shannon (cshannon) 08aa5118ff (AMQ-6858) - add extra precautionary check for demand subs
also remove test that intermittently fails with timing issues
2017-11-16 07:44:33 -05:00
Christopher L. Shannon (cshannon) 6013441a9a AMQ-6858 - handle resync of network proxy durables after restart
We need to properly handle the re-addition of network proxy durables
after the brokers are restarted so removal is done properly
2017-11-15 08:56:43 -05:00
Christopher L. Shannon (cshannon) 3ca439cada AMQ-6858 - Allow configuration of the client Id token in network bridge
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
2017-11-14 15:23:26 -05:00
Christopher L. Shannon 41211c78d1 AMQ-6858 - reworking durable subscription propagation fix
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
2017-11-13 11:07:43 -05:00
Christopher L. Shannon (cshannon) 96ce14b278 AMQ-6858 - Fix several durable subscription bridge propagation issues
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.
2017-11-09 11:21:18 -05:00
gtully b29ccf3488 [AMQ-6854] log warn if page in is blocked on usage preventing dispatch. Reuse blockedProducerWarningInterval to tweak reporting 2017-11-02 16:04:30 +00:00
gtully 03b19b9da4 [AMQ-6847] limit the retry loop to one iteration overa all pending messages such that new additions are not replayed to avoid duplicates 2017-11-01 11:26:36 +00:00
gtully 2ea5d1420b [AMQ-6847] pause dispatch for message move to avoid redelivery with pending ack/remove/audit rollback 2017-10-27 11:40:06 +01:00
gtully 8e576be1d9 [AMQ-6849] - fix sendFailIfNoSpaceAfterTimeout policy entry default value 2017-10-26 11:36:03 +01:00
gtully 6da08b245e [AMQ-6849] provide a virtualTopic dropOnResourceLimit attribute, default to false.
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.
2017-10-25 14:53:20 +01:00
gtully 41a100766c [AMQ-6824] - fix up prefetchExtension growth on transaction completion and delivered ack and tie in boolean usePrefetchExtension 2017-09-26 11:30:18 +01:00
Erik Wramner c691124d32 AMQ-6808 preserve destination for browsed scheduled messages 2017-09-15 09:02:36 -04:00
Dejan Bosanac 5e656d394c https://issues.apache.org/jira/browse/AMQ-6799 - stop the jmx server connector properly 2017-09-01 13:02:53 +02:00
Christopher L. Shannon (cshannon) 35bd3ad938 AMQ-6798 - Clean up store usage object on Queue stop
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.
2017-08-24 09:24:36 -04:00
Dejan Bosanac c7291f1ecf https://issues.apache.org/jira/browse/AMQ-6799 - IOExceptionHandler during the startup 2017-08-24 14:04:36 +02:00
gtully 63f0b7e20d [AMQ-6792] fire the failover exception handler before stop to ensure blocked write does not block stop request 2017-08-11 12:58:51 +01:00
Christian Schneider 8646bb1010 [AMQ-6788] Explain how to fix the problem in the exception 2017-08-08 20:55:56 +02:00
gtully a67c75a9e1 [AMQ-6643] refine fix to allow wildcard subs to non wildcard subscription queues, enable simple wildcard sub to drain all subscription queues 2017-08-08 16:38:11 +01:00
gtully a15626193c [AMQ-6787] release securty context on failure to addConnection subsequent to auth, resolve leak. fix and test 2017-08-04 13:46:16 +01:00
gtully ddfa96028c [AMQ-6778] fix and test - no longer gate firing advisory on broker start flag b/c consumers may be present once transport connectors have started 2017-07-25 13:02:13 +01:00
gtully d7f70837b7 [AMQ-6764] add logging of exit of jmx ops such that overlaps and delays are visible in the audit. fix and test 2017-07-10 14:10:05 +01:00
Christopher L. Shannon (cshannon) a9fe4e33c3 [maven-release-plugin] prepare for next development iteration 2017-06-27 13:41:28 -04:00
Christopher L. Shannon (cshannon) 5f0d6943cb [maven-release-plugin] prepare release activemq-5.15.0 2017-06-27 13:41:01 -04:00
Christopher L. Shannon (cshannon) 2311749aa2 AMQ-6706 - Protecting preShutdownHooks with an AtomicBoolean 2017-06-20 11:05:29 -04:00
Zoran Regvart 155461a0ba
AMQ-6706 Allow for hooks before broker stop occurs
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.
2017-06-19 14:29:05 +02:00
gtully b07821ab64 [AMQ-6625] remove kahadbioexceptionhandler by pushing allowIOResumption into persistence adapter. This allows the lease locker to still be used with kahadb for stopStartConnectors support 2017-06-15 17:28:31 +01:00
gtully df3bd83c0d [AMQ-6703] check for enable audit false 2017-06-15 11:22:20 +01:00
gtully 99f3d4c505 [AMQ-6703] have jmx purge clear the audit such that messages can be copied back, fix and test 2017-06-15 10:46:23 +01:00
gtully b6cb0eacea [AMQ-6702] add maxProducersToAudit and maxAuditDepth to dead letter strategy to cofigure the audit, fix and test 2017-06-13 14:26:15 +01:00
Christopher L. Shannon (cshannon) 2a0b785a04 AMQ-6698 - Allow timeout of SSL handshake for auto+nio+ssl
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.
2017-06-08 12:34:15 -04:00
gtully 7413ee00e1 [AMQ-6696] zero out usage for forwarded messages such that the original target is no longer referenced. fix and test 2017-06-02 12:23:58 +01:00
gtully d2c0eddaad [AMQ-6691] allow dlq flag to be set via jmx to allow retry op after a restart - use destinations element for long term persistence 2017-05-31 12:39:48 +01:00
gtully 8023b9ee44 [AMQ-6690] do nothing for move/copy jmx ops that try to modify self 2017-05-31 11:26:46 +01:00
gtully 00ee9491d9 [AMQ-6678] sync destructive purge on queue view mbean (jmx) to prevent concurrent calls 2017-05-29 11:21:00 +01:00
gtully 25f112c5c9 [AMQ-6687] ensure transacted sends blocked on pfc do not resume after tx completion. AMQ-4467 refine the fix such that PFC kicks in such that the cache will accept messsages that push it over it's limit while it is still under the limit 2017-05-25 12:43:08 +01:00
gtully acab282d9c [AMQ-6678] sync destructive queue view mbean (jmx) operations such that concurrent calls see consistent state 2017-05-18 12:37:54 +01:00
gtully a0ba0bf4c6 [AMQ-6667] gate cursor cache enablement on a single pending send and tidy up setbatch to always check outstanding async future list. Fix and test 2017-05-03 11:36:06 +01:00
gtully 57795bafce [AMQ-6665] - check for peercerts is now on tcp transport such that the bridge connection info can have the correct context 2017-04-27 12:07:12 +01:00
gtully 0e74c52e8a [NO JIRA] tidy up MbeanInfo text in DestinationView 2017-04-26 12:10:24 +01:00
Christopher L. Shannon (cshannon) 808a4c5c17 AMQ-6661 - Fix Auto MQTT protocol detection
Protocol detection now takes into account the variable length header in
the CONNECT packet.
2017-04-25 08:47:08 -04:00
gtully 729766e492 [AMQ-6494] ensure vm transport propagates onCommand exceptions to peer 2017-04-04 14:17:27 +01:00
gtully 0f7561e85a Revert "AMQ-6494 Return ExceptionResponse during broker service shutdown"
the root cause seems to be in the vm transport iterator

This reverts commit dce2b61f87.
2017-04-04 14:15:00 +01:00
gtully 679db08db3 [AMQ-6643] ensure a wildcard virtual topic subscriber is restricted to the wildcard destination - avoid duplicate and spurious dispatch. fix and test 2017-04-04 10:16:48 +01:00
gtully 4ef1fc74cf [AMQ-6640] either broker dispatch to bridge or bridge dispatch to broker needs to be async - dispatchAsync network option is the trigger for the vm transport to be sync in line with the current defaults. original BacklogNetworkCrossTalkTest scenario exposed this. upshot is dispatchAsync=false is not compatible with duplicate subscription suppression which is fair. 2017-03-30 12:12:13 +01:00
gtully d84a58656c [AMQ-6640] allign use of sync vm transport usage on duplex end of networkconnector with initiator end. only duplexinbound for forwarding is async to allow thread for responses. vm transport options applied in one place and test more deterministic w.r.t the hang scenario 2017-03-29 23:50:47 +01:00
gtully 8e00c6c2bc [AMQ-6640] fix duplicate suppression sync request on responder end of duplex network connector only b/c that has the async local transport. Additional test. Ensure broker sync is conditional on the need for duplicate suppression which should only be necessary in ring topologies when properly configured 2017-03-28 14:49:23 +01:00
gtully c5a8b2c8b1 [AMQ-6625] ensure kahadb stops operation on the first IOException to facilitate auto recovery from partial writes 2017-03-13 13:49:41 +00:00
gtully 01b1f7f694 [AMQ-3233] respect policy entry blockedProducerWarningInterval for flow control warning, 0 disables and Xmillis makes it periodic, default period of 30s is not unlike the existing once behaviour. fix and tests 2017-03-03 11:23:23 +00:00
gtully e67d48680f [AMQ-6614] fix up jmx blockedSendsCount and producer view blocking flag for async send case. fix and test 2017-03-02 17:00:16 +00:00
gtully b6521e292b [AMQ-6414] additional logging that helped identify root cause 2017-02-27 17:01:16 +00:00
Christopher L. Shannon (cshannon) ef84db5e64 AMQ-6610: Fixing JDBC test
Durable destinations need to always be loaded on connector start
2017-02-27 07:34:22 -05:00
Christopher L. Shannon (cshannon) bab0887ed6 AMQ-6610 - Network connector mbean not registered on reload
On network connector add or update after broker start (such as the
runtime plugins) the mbean was not created.  There was also a couple of
other properties not set. Fixed the network connector start to be the
same for normal broker start and runtime reload.
2017-02-24 14:05:27 -05:00
gtully fad50812af [AMQ-6547] revert mod from AMQ-3143 such that waitForSpace respects child usage, fix test and validate mKahadb blocking send 2017-02-14 11:33:59 +00:00
gtully d86c98a687 [AMQ-6587] - fix root cause of deletion candidate seeing sub. contention between adding sub to dests and adding dests to sub, also removing sub from dests twice could leave dest stat negative allowing invalid candidate for gc 2017-02-10 11:38:03 +00:00
Timothy Bish c049d3c1f7 Add a simple IDERunner for testing
Adds a simple class to run a broker instance with a TCP transport
connector and no persistence enabled for quick tests.
2017-02-07 17:28:28 -05:00
gtully 0ee4f5b843 [AMQ-6587] additional contention window with new sub while gc is in progress - need to verify new sub is actually subscribed to the candidate for deletion. Fix and test 2017-02-07 13:53:40 +00:00
Timothy Bish 9b9e3d3678 https://issues.apache.org/jira/browse/AMQ-6588
Add more detail to log output for easier tracking
2017-02-01 16:15:11 -05:00
gtully e415d2921e [AMQ-6587] ensure subs added to new destination before destination is exposed in the destination map. sort gc contention with wildcard subs and anonymous publish. fix and test 2017-02-01 15:08:46 +00:00
Vasco Veloso 687badb4fd AMQ-6577: honour usePrefetchExtension in TopicSubscription.
AMQ-6577: move usePrefetchExtension flag to AbstractSubscription to promote reuse.
2017-01-30 11:13:57 -05:00
Christopher L. Shannon (cshannon) d0c95146c3 https://issues.apache.org/jira/browse/AMQ-6579
Remove incorrect dispatch counter increment on message expiration in
TopicSubscription when a pending limit strategy is set
2017-01-25 11:16:43 -05:00
Christopher L. Shannon (cshannon) 56bb079c82 https://issues.apache.org/jira/browse/AMQ-1940
Queue purge now acquires the sendLock to prevent new messages from
coming in while purging.  The statistics are no longer zeroed out as
they should properly decrement as messages are removed.  These changes
should prevent the statistics from going negative.
2017-01-24 08:46:15 -05:00
gtully 511b9b642a [AMQ-6562] - suppress warn of durable sub duplicate from the store on cache exhaustion - expected in the absense of ordered sequenceid and setBatch. Fix leak of duplicates pending processing on batch fill for the durable sub case and remove eager page in for prefetch=0 2017-01-13 11:06:05 +00:00
Christopher L. Shannon (cshannon) d9c74d7317 https://issues.apache.org/jira/browse/AMQ-6561
Stop connections on all connection attempt errors, not just security
exceptions, to prevent dangling open sockets.
2017-01-12 10:21:08 -05:00
Christopher L. Shannon (cshannon) bdec3f6ddb https://issues.apache.org/jira/browse/AMQ-6560
Converting flags in TransportConnection to AtomicBoolean to reduce
synchronization and improve thread safety
2017-01-12 07:36:50 -05:00
Christopher L. Shannon (cshannon) 2769298cf6 https://issues.apache.org/jira/browse/AMQ-6555
Fixing Scheduler so that a rescheduled task will first cancel the
existing task so it does not get orphaned from the task map.  Also
fixing Topic start so that it will only start once and not twice.
2017-01-10 10:25:15 -05:00
gtully c76f109692 https://issues.apache.org/jira/browse/AMQ-4467 - modify fix check full against shared limit and high water mark against local limit, additional test 2017-01-10 11:18:00 +00:00
Timothy Bish 56917c07ec https://issues.apache.org/jira/browse/AMQ-6549
Fix bad logger output
2017-01-03 09:57:13 -05:00
gtully 0ae90c0897 https://issues.apache.org/jira/browse/AMQ-6547 - add storeUsage attribute to mKahadb filtered adapter such that disk utilisation is available as a QOS 2016-12-20 14:47:22 +00:00
Christopher L. Shannon (cshannon) 25703fbd1f https://issues.apache.org/jira/browse/AMQ-6538
Fixing an issue with syncDurableSubs that cause a bridge failure when
adding multiple bridges between the same brokers
2016-12-13 11:58:57 -05:00
Christopher L. Shannon (cshannon) 27238b2dd7 https://issues.apache.org/jira/browse/AMQ-6535
Fixing the auto+nio+ssl transport so that the protocol detection task
will properly terminate on timeout and not continue to run. Also
lowered the default detection timeout to 15 seconds instead of 30
seconds to match the InactivityMonitor default.
2016-12-12 11:17:19 -05:00
Daniel Kulp 1a2e3eb0c7 [AMQ-6529] Make sure the LDAP ACL's are definitely loaded when needed. 2016-12-07 14:29:36 -05:00
gtully 8a28c06555 [AMQ-6441] add option to specify the hard limits on a usage such that spurious values from the file system can be overridden. this closes #202 thanks William Crowell for the patch with test 2016-12-07 18:09:34 +00:00
William Crowell 41bec0d658 Fixes AMQ-6441 where a negative value can be returned with large AWS EFS files systems when calling java.io.File.getTotalSpace() 2016-12-07 10:45:12 +00:00
Christopher L. Shannon (cshannon) 3f7ca8406d Revert AMQ-5659
Add safety measure against infinite loop when store exception prevents message removal. Thanks to metatechbe for the patch. This fixes #72."

This reverts commit 78492febc8.
2016-12-05 07:26:59 -05:00
Dejan Bosanac a73eb0eab5 https://issues.apache.org/jira/browse/AMQ-6435 - align jackson version used, with the rest of the project 2016-11-30 11:44:13 +01:00
Claus Ibsen 78492febc8 AMQ-5659: Add safety measure against infinite loop when store exception prevents message removal. Thanks to metatechbe for the patch. This fixes #72. 2016-11-29 18:58:17 +01:00
gtully cfdff4edc5 [AMQ-6518] - fix up aveMessageSize dest stat and test 2016-11-25 10:38:09 +00:00
gtully 7077d2b910 [AMQ-3166] init rollbackonly exception cause such that xaexception has meaning, thanks to james (jtahlborn) for the suggestion 2016-11-22 16:07:55 +00:00
Timothy Bish 2c828b23df https://issues.apache.org/jira/browse/AMQ-6504
Fix intermittent test failure
2016-11-21 12:37:52 -05:00
Timothy Bish e050519ff6 https://issues.apache.org/jira/browse/AMQ-6500
Better handle prefetch extension and pull consumers over Topics to avoid
the remote not receiving all the messages available based on the credit
it has issued.
2016-11-18 11:59:01 -05:00