Commit Graph

1035 Commits

Author SHA1 Message Date
Jean-Baptiste Onofré 2c193ea01d
Merge pull request #840 from zisding/logrefine
[AMQ-8601] Refine the logging messages
2022-08-17 07:48:37 +02:00
Lucas Tétreault 7b3f13feda Clean up remaining Xalan references
Empty
2022-08-05 00:43:02 -07:00
Lucas Tétreault e550748b4c [AMQ-9005] remove xalan dependency due to it being end of life 2022-07-30 22:45:48 -07:00
Matt Pavlovich 680717cb95
[AMQ-8976] Add maxConnectionExceededCount metric for connectors (#850) 2022-07-18 16:20:25 -05:00
Zishuo Ding f2c9a6c718 Refine the logging messages 2022-05-11 14:46:31 -04:00
Christopher L. Shannon (cshannon) ae30dce4e2 AMQ-8520: Log4j2 test fixes
Also fixes Log4jConfigView
2022-03-03 15:24:38 -06:00
Christopher L. Shannon (cshannon) 00253b3219 NO-JIRA: Updating next development version to 5.18.0-SNAPSHOT 2022-03-01 09:36:34 -05:00
Jean-Baptiste Onofré e597017200
Merge pull request #662 from jbonofre/AMQ-7426
[AMQ-7426] Upgrade to log4j2
2022-02-27 13:23:53 +01:00
Matt Pavlovich 9956dd602a
[AMQ-8440] Set sendDuplicateFromStoreToDLQ to 'false' by default (#773) 2022-02-24 08:45:35 -06:00
jbonofre 472dcf8497 [AMQ-7426] Upgrade to log4j2 2022-02-24 15:20:51 +01:00
Christopher L. Shannon (cshannon) df354fa023 AMQ-8509: Update TempStore Usage test to verify cleanup
Add a unit test to the previous tests added in AMQ-7085 to verify
TempUsage is cleaned up and stopped on Queue.stop()
2022-02-23 07:41:24 -05:00
Artur Pedroso d1e9ba68b3 AMQ-8509: Fix TempUsage memory leak
If you have an application that creates lots of queues it will eventually
fail with OOM because TempUsage is started on Queue#start but never stopped.

The `systemUsage.getTempUsage().start()` used on the Queue#start
adds elements on a List from TempUsage parent and these elements
are never removed.

To reproduce this issue you need to leave an application
running for a long time creating different queues.

The only way to avoid the leak right now is to stop the BrokerService,
which isn't a solution.
2022-02-23 07:38:58 -05:00
Endre Stølsvik 9167a79b79 StatisticsBrokerPlugin: Add feat: request destination firstMessageTimestamp
Adding a feature (STATS_FIRST_MESSAGE_TIMESTAMP) to the
StatisticsBrokerPlugin's destination-statistics for getting the
timestamp of the first message in the destination(s) being requested: If
you on the query-message set the property
StatisticsBroker.STATS_FIRST_MESSAGE_TIMESTAMP to anything (e.g. boolean
true), a long value "firstMessageTimestamp" will be added to the
statistics reply message(s). Since the reply message has JMSTimestamp
set, which is the broker's now-timestamp, you may also on the query side
calculate the age of the first message in milliseconds. The key name was
chosen since that is the name of the corresponding feature in Artemis.

This extension of the existing feature is implemented to be as
non-intrusive as possible, adding very little runtime cost if not
requested. It also seems like the runtime cost for enabling this
feature, thus finding and adding the firstMessageTimestamp, is small.

While at it, also slightly improving an existing feature
(STATS_DENOTE_END_LIST) where a reply to a destination query can be
"null terminated": After sending the relevant replies, the
StatisticsBroker also sends an empty message. This feature is relevant
if the query is a wildcard query, thus returning multiple messages: The
empty message denotes the end of the replies. However, to activate this
feature, a somewhat complicated query destination had to be constructed.
Adopting the solution for the other StatisticsBroker feature where you
may reset the broker statistics by adding a property to the query
message, this null-termination feature now /also/ checks for the
presence of this query modifier STATS_DENOTE_END_LIST as a property.
(This property based solution was thus also adopted for the present
'firstMessageTimestamp' solution, as it was found much more intuitive).

Added tests for both the STATS_FIRST_MESSAGE_TIMESTAMP query modifier,
and the improved STATS_DENOTE_END_LIST property-based query modifier.

Had to make the Topic.doBrowse(List browseList, int max) public - the
corresponding method for Queue was already public.

Made the evaluation of whether this is a StatisticsBroker-relevant
message a microscopic bit more performant (exiting faster if not
relevant): To the initial test of whether the message is relevant, which
only checked for replyTo being set, a check for 'destination.
startsWith("ActiveMQ.Statistics")' was added. Only if so, the rest of
the evaluations kick in. Also using 'string.startsWith(..)' instead of
the verbose 'string.regionMatches(..)'.

Removed an unused import on PartitionBrokerTest.java, as IntelliJ
complained about not finding it.
2022-01-25 09:45:48 +01:00
Matt Pavlovich 6a944a05d9 [AMQ-8462] Remove double call to listConnectionStates during connection close 2022-01-24 09:21:19 -06:00
Jean-Baptiste Onofré 3d2fb2b609
Merge pull request #707 from AlexejTimonin/sendTextMessageWithProperties-delimiter
[AMQ-8372] Allow custom delimiter when sending TextMessages via MBean
2022-01-22 17:14:03 +01:00
Jean-Baptiste Onofré 0508c22481
Merge pull request #742 from mattrpav/AMQ-8053
[AMQ-8053] Do not override JMSXUserID over network connections
2022-01-15 06:47:48 +01:00
Jean-Baptiste Onofré 2f96b4a60c [AMQ-8252] Introduce stackTraceEnabled flag on transport connector to define if the stack trace should be displayed or not in case of WARN messages 2022-01-14 11:37:44 +01:00
Matt Pavlovich bec734a133 [AMQ-8043] Do not override JMSXUserID when message comes across network connector 2022-01-12 09:00:20 -06:00
Matt Pavlovich 05426d637c
[AMQ-8397] Add a destination option to sendDuplicateFromStoreToDLQ (#724)
- Default 'true' to match existing behavior
 - Added counter to DestinationView
2021-12-20 08:38:32 -06:00
Matt Pavlovich b196e9a88a
[AMQ-8400] Add synchronization handling for Transaction to prevent CME (#720) 2021-12-20 08:37:56 -06:00
Matt Pavlovich ee768a28d6
[AMQ-8413] Add remoteUserName and remotePassword config fields to network connector (#725) 2021-12-20 08:36:56 -06:00
Matt Pavlovich 67256c61b1
[AMQ-7309] Update to jakarta.jms/jakarta.jms-api:2.0.3 (#682)
- API update only
 - Throw UnsupportedOperationException
 - Disable activemq-camel from build
 - Formatting fixes
 - Use geronimo-jms for osgi-related artifacts
 - Fix features.xml invalid xml header
 - Add a unit test to confirm JMS 2.0 methods for phase 1 (throw UnsupportedOperationException)
 - Add deliveryTime field to Message
 - Minor formatting fixes
2021-11-10 11:56:04 -06:00
Romain Manni-Bucau 6fea79d1a9 Ensure to not depend on sun.rmi.registry.RegistryImpl 2021-10-26 17:40:59 +02:00
Jean-Baptiste Onofré f74992c105 [AMQ-8395] Avoid possible NPE when sending advisory message 2021-10-04 10:14:32 +02:00
Alexej Timonin 7c63227003 Allow custom delimiter when sending TextMessages via MBean
This enables possibility to send messages containing commas in the body
with tools such as jconsole.
Example simple text as body: body=Hello, world!
Example json as body: body={"a":"b","c":"d"}
2021-09-04 22:31:22 +02:00
Christopher L. Shannon (cshannon) 8b99596eeb AMQ-8349 - Ensure virtual destination consumer advisories are only
replayed to new advisory consumers and not existing
2021-08-05 09:58:37 -04:00
Jean-Baptiste Onofré ceaeaa986b [AMQ-8252] Doesn't display warn stack trace for stomp (regression compared to 5.15.x) 2021-08-04 07:48:10 +02:00
Matt Pavlovich c0d5399635
[AMQ-8285] Add 'slow' metrics to PersistenceAdapterStatistics (#664) 2021-06-04 06:19:54 +02:00
Jean-Baptiste Onofré ae777e9571
Merge pull request #665 from mattrpav/AMQ-8282
[AMQ-8282] Migrate from deprecated .newInstance() calls to .getConstr…
2021-06-04 06:18:27 +02:00
Colm O hEigeartaigh 7ca7118a95 AMQ-8117 - Allow java.util arrays for deserialization 2021-06-03 14:42:42 +01:00
Christopher L. Shannon (cshannon) 2fcf2fd75f AMQ-8287 - fix NIOSSLTransport deadlock with serviceRead lock
This narrows the lock that was added to serviceRead() to secureRead()
which prevents processing commands while locked which should solve the
deadlock issues
2021-06-02 09:47:24 -04:00
Matt Pavlovich 950a140455 [AMQ-8282] Migrate from deprecated .newInstance() calls to .getConstructors().newInstance 2021-06-02 08:30:36 -05:00
Matt Pavlovich 2cc17a2fa0 [AMQ-8279] Compiler warning cleanups
- Remove unsused imports (exept for generated classes)
 - Convert to T.valueOf on boxed primitives from new T()
2021-05-25 09:34:35 -05:00
Jean-Baptiste Onofré fc80b86ac6
[AMQ-7442] Support JDK11 full build and code style (#647) 2021-05-25 06:55:39 +02:00
kimmking b6ab868f94
ClientIdFilterDispatchPolicy dispatches messages in a topic to a given client. Then the message with a PTP_CLIENTID property, can be received by a mqtt client with the same clientId. (#238) 2021-03-22 16:22:01 +01:00
jbonofre 1a2de52c5f Fix slf4j logger use 2021-03-20 10:58:07 +01:00
Christopher L. Shannon (cshannon) 2cf3decd8e AMQ-8184 - Re-enable NIO tests
Re-enable the nio transport tests in activemq-unit-tests by default to
catch transport errors. Also fix broken tests
2021-03-11 11:16:29 -05:00
Christopher L. Shannon (cshannon) 2712464b78 AMQ-8183 - apply maxFrameSize high cpu usage fix to Auto nio transport
also
2021-03-11 11:13:35 -05:00
Christopher L. Shannon (cshannon) 1654e6c79c AMQ-8169: Synchronize on serviceRead inside NIOSSLTransport
This is needed to prevent concurrent access to the SSLEngine during
initialization. This is a regression from when auto+nio+ssl was added.
2021-03-08 11:28:33 -05:00
Jean-Baptiste Onofré 4dc6903c18
Merge pull request #610 from jbonofre/AMQ-7443
[AMQ-7443] Add connection remote addr in the prefetch warn log message
2021-01-14 06:05:37 +01:00
Jean-Baptiste Onofré d9febc0977
Merge pull request #609 from jbonofre/AMQ-7246
[AMQ-7246] Add scheduledMessageCount and delayedMessageCount attributes on the JobSchedulerViewMBean
2021-01-13 18:49:11 +01:00
jbonofre cbc1baa07a [AMQ-8097] Deal with deserialization with xstream unmarshal poison ack 2021-01-13 16:13:25 +01:00
jbonofre 7339e0516c [AMQ-7443] Add connection remote addr in the prefetch warn log message 2021-01-13 06:23:28 +01:00
jbonofre f01e35f7d9 [AMQ-7246] Add scheduledMessageCount attribute on the JobSchedulerView MBean 2021-01-12 18:58:34 +01:00
jbonofre 0146d5eb3e [AMQ-8060] Re add allowLinkStealing on transport connector for backward compatibility 2021-01-07 12:28:26 +01:00
Roman Nevezhyn 651c5ff2cf - Tests AMQ-8104
- Fixes AMQ-8104
2020-12-16 12:54:03 -08:00
jbonofre 2bc87c2c5f [AMQ-8068] Fix topic memory leak on message eviction using UniquePropertyMessageEvictionStrategy 2020-11-23 06:26:37 +01:00
Jean-Baptiste Onofré fbdb302968
Merge pull request #571 from dhmgit/durable-sub-message-expiration
Adding an option which allows messages to expire on active durable subscriptions
2020-11-22 07:10:43 +01:00
murali.mogalayapalli 55914d3ac1 [AMQ-8028] Add sendWhenNotMatched option to composite destination filter 2020-11-21 14:20:08 +01:00
jbonofre 43af228f2a Improve stability of KahaDB tests 2020-11-18 09:02:25 +01:00
dhmgit 2f2fe6855f adding an option which allows messages to expire on active durable subscriptions 2020-11-10 10:22:32 -05:00
Benjamin Graf a2e718f259 AMQ-8055 - rename posion to correct poison 2020-10-23 09:50:18 +02:00
gtully 5c8086961f AMQ-8023 - rework fix to deal with addSub interleaved with removeDestination advisory processing, serialise add/remove dest such that add is not lost and new sub resubscribes ok, extra verifications in the test 2020-08-27 16:31:50 +01:00
gtully c0e6d47121 AMQ-8023 - retain sync add call, duplicate sub suppression depends on it, regression in AMQ3274Test 2020-08-26 14:39:43 +01:00
gtully 0e2b24be36 AMQ-8023 - serialize sub add with destination removal advisory processing to avoid resub blocking a necessary purge via removal, fix and test via mqtt clean session scenario 2020-08-25 16:56:50 +01:00
Jean-Baptiste Onofré 213f381c95
Merge pull request #550 from coheigea/AMQ-7512
AMQ-7512 - Consolidate XBean byte parsing
2020-08-11 09:47:49 +02:00
Jean-Baptiste Onofré d2851888bf
Merge pull request #551 from coheigea/AMQ-7513
AMQ-7513 - Fix http://activemq.org links
2020-08-11 09:42:43 +02:00
Colm O hEigeartaigh e3e2fda509 AMQ-8020 - Replace toLowerCase().equals() with equalsIgnoreCase 2020-08-10 16:01:08 +01:00
Christopher Shannon 0a189f833e AMQ-8012 - Move synchronized block after null check 2020-07-24 16:22:24 -04:00
Christopher L. Shannon (cshannon) 62f5576fe5 AMQ-8012 - Improve thread safety of SubQueueSelectorCacheBroker
When returning a copy of the set of selectors we need to synchronize
2020-07-24 14:15:57 -04:00
Christopher L. Shannon (cshannon) 1dcc7d4b2c Merge branch 'AMQ-8012'
This closes #553
2020-07-24 14:13:45 -04:00
Matt Pavlovich 083acb9691 [AMQ-8012] Fix for ConcurrentModificationException in SubQueueSelectorCacheBroker
- Remove non-thread-safe method getSelectors()
 - Update all references to use the thread-safe getSelectorsForDestination() method
2020-07-24 12:22:12 -05:00
Christopher L. Shannon (cshannon) 17defa79d4 NO-JIRA: Update branch to 5.17.0-SNAPSHOT after release 2020-07-14 07:27:43 -04:00
Colm O hEigeartaigh fca3b615eb AMQ-7513 - Fix http://activemq.org links 2020-07-10 17:29:01 +01:00
Colm O hEigeartaigh 930b18df65 AMQ-7512 - Consolidate XBean byte parsing 2020-07-10 17:22:09 +01:00
Jean-Baptiste Onofré 334476ac63 [maven-release-plugin] prepare for next development iteration 2020-06-25 07:26:41 +02:00
Jean-Baptiste Onofré 86dd78b1aa [maven-release-plugin] prepare release activemq-5.16.0 2020-06-25 07:26:13 +02:00
Jean-Baptiste Onofré 6908749c2f Fix version 2020-06-25 07:13:04 +02:00
Jean-Baptiste Onofré ff2dae82f3 [maven-release-plugin] prepare release activemq-5.16.0 2020-06-24 21:56:52 +02:00
jbonofre 4ed2ba22a9 Cancel 5.16.0 release 2020-06-24 15:19:34 +02:00
Jean-Baptiste Onofré cd1e9f8697 [maven-release-plugin] prepare for next development iteration 2020-06-23 17:40:26 +02:00
Jean-Baptiste Onofré 2e890c6224 [maven-release-plugin] prepare release activemq-5.16.0 2020-06-23 17:39:53 +02:00
jbonofre 4e1df1979b [AMQ-7493] Fix RejectedExecutionException in the BrokerService 2020-06-22 16:24:29 +02:00
Christopher L. Shannon (cshannon) cc0bcdd5dc AMQ-7496 - Properly decrement inflight message size on message
expiration

Also clean up some of the handling of inflight metrics in Prefetch
subscription
2020-06-10 11:36:34 -04:00
Jean-Baptiste Onofré ef5975b1b7
Merge pull request #538 from PascalSchumacher/fix_some_javadoc_parameter_warnings_2
Fix javadoc warnings related to non-existing parameter names.
2020-05-23 06:38:40 +02:00
Colm O hEigeartaigh aa8900ca70 AMQ-7490 - Fix JMX regression 2020-05-22 09:56:59 +01:00
Pascal Schumacher efcca7d062 Fix javadoc warnings related to non-existing parameter names. 2020-05-22 10:49:39 +02:00
Pascal Schumacher 67e06c82f7 Fix some javadoc warnings releated to non-existing parameter names. 2020-05-17 11:38:05 +02:00
Jean-Baptiste Onofré 0444dd96b2
Merge pull request #505 from PascalSchumacher/potential_overflow_in_int_multiplication
Avoid potential overflow in int multiplication before it is converted…
2020-05-16 07:17:13 +02:00
Jean-Baptiste Onofré 41bef94293
Merge pull request #521 from coheigea/AMQ-7458
AMQ-7458 - Implement bounds checking on the message scheduling proper…
2020-05-15 15:52:23 +02:00
jbonofre e9caa75b1a [AMQ-7473] Add stopOnError configuration to stop the broker when locker has an exception 2020-05-13 07:53:00 +02:00
Jean-Baptiste Onofré 1f914bba65
Merge pull request #502 from coheigea/AMQ-7438
AMQ-7438 - Harden deserialization
2020-05-12 08:01:37 +02:00
Colm O hEigeartaigh 24aaa4698c AMQ-7458 - Implement bounds checking on the message scheduling properties 2020-03-27 12:14:03 +00:00
jbonofre 05c43fe347 [AMQ-7301] Fix typo (double from) 2020-03-12 10:21:35 +01:00
jbonofre d800f1bdb4 [AMQ-7301] Remove guava dependency to implement own getRootCause() method 2020-03-11 18:47:19 +01:00
jbonofre 960bc24d17 [AMQ-7301] Fix build and using a single log message 2020-03-11 17:21:01 +01:00
Christopher L. Shannon (cshannon) ee61ed69f8 AMQ-7301 - TransportConnector errors should log the root cause
(cherry picked from commit 57a1a77abb)
2020-03-11 06:49:35 -04:00
jbonofre 1550ae42f7 Revert "[AMQ-7314] Fix counter increment when lastDelivereSeqId > BrokerSequenceId"
This reverts commit df1750fe01.
2020-03-10 06:29:34 +01:00
Pascal Schumacher b43f5b8cf2 Avoid potential overflow in int multiplication before it is converted to long. 2020-03-08 11:50:21 +01:00
Colm O hEigeartaigh a73a85e6c2 AMQ-7438 - Harden deserialization 2020-03-06 17:22:07 +00:00
jbonofre b60efeaad8 [AMQ-7301] Improve logging when initialize Stomp NIO SSL connection 2020-03-05 15:00:53 +01:00
Jean-Baptiste Onofré c0e7949468
Merge pull request #500 from jbonofre/AMQ-7303
[AMQ-7303] Improve logging in case of security exception on transport connection
2020-03-04 21:44:37 +01:00
Jean-Baptiste Onofré 7435d7b058
Merge pull request #499 from jbonofre/AMQ-7346
[AMQ-7346] Improve logging of the network connector
2020-03-04 21:42:37 +01:00
jbonofre 945cd6b7de [AMQ-7303] Improve logging in case of security exception on transport connection 2020-03-04 18:57:02 +01:00
jbonofre 3c4a644f3d [AMQ-7346] Improve logging of the network connector 2020-03-04 17:54:37 +01:00
jbonofre 3c302dce33 [AMQ-7347] Don't log error in case of topic subscription failure. It's useless as the JMX exception is thrown and pollute the log. 2020-03-04 16:22:17 +01:00
jbonofre df1750fe01 [AMQ-7314] Fix counter increment when lastDelivereSeqId > BrokerSequenceId 2020-03-02 15:31:16 +01:00
Jean-Baptiste Onofré 51081e4edf
Merge pull request #479 from coheigea/AMQ-7423
AMQ-7423 - Remove synchronization from JAAS PropertiesLoader
2020-02-28 07:30:57 +01:00
Pascal Schumacher 7ef90e243f Add missing format argument for log message in AbortSlowAckConsumerStrategy#abortAllQualifiedSlowConsumers. 2020-02-27 22:03:41 +01:00
Colm O hEigeartaigh 67fb6f8871 AMQ-7423 - Remove synchronization from JAAS PropertiesLoader 2020-02-27 15:29:26 +00:00