971 Commits

Author SHA1 Message Date
Christopher L. Shannon (cshannon)
2399c637b5 AMQ-9107 - rework performance improvement for consumer closing in
managed region broker

This new approach just looks matching Subscriptions from the region for the
destination which prevents having to store another map and falls back to
the old approach if something went wrong.

(cherry picked from commit d46b74d674c2a67193bb95384290da266adf9a25)
2022-11-03 06:49:49 -04:00
Lucas Tétreault
05f2f1e690 remove consumers more efficiently
(cherry picked from commit b7f73d4875d767f704c6720e66da1bf8609d7ed7)
2022-10-13 05:59:02 +02:00
Jean-Baptiste Onofré
4818cf688c [AMQ-9049] Mention dicarded messages in getTotalDequeueCount operation of BrokerViewMBean
(cherry picked from commit 7159b4410baea64db104f1e06e70675446b71585)
2022-08-18 07:27:24 +02:00
Jean-Baptiste Onofré
87074f120c [maven-release-plugin] prepare for next development iteration 2022-04-29 08:21:29 +02:00
Jean-Baptiste Onofré
ed5fb45a8e [maven-release-plugin] prepare release activemq-5.16.5 2022-04-29 08:21:20 +02:00
Christopher L. Shannon
f759fb0bd1 AMQ-8548 - Don't log full stack trace on Async error at WARN level 2022-04-06 10:11:12 -04:00
Christopher L. Shannon (cshannon)
8674538d61 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()

(cherry picked from commit df354fa0237dba309592277e3cfecbe1d55690be)
2022-02-23 07:43:24 -05:00
Artur Pedroso
84a28d78f2 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.

(cherry picked from commit d1e9ba68b3cbea3e9294cf4993d005c3c8ea86f2)
2022-02-23 07:43:15 -05:00
Jean-Baptiste Onofré
2a9161116f [maven-release-plugin] prepare for next development iteration 2022-02-11 17:28:32 +01:00
Jean-Baptiste Onofré
025f99f245 [maven-release-plugin] prepare release activemq-5.16.4 2022-02-11 17:18:49 +01:00
Colm O hEigeartaigh
1f01a61426
AMQ-8472 - Switch to reload4j for logging 2022-02-08 14:02:31 +00:00
Endre Stølsvik
c81740592b 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.

(cherry picked from commit 9167a79b79e4c121cfe0a5b82456f52bf3ecc3c7)
2022-01-30 16:07:11 +01:00
Matt Pavlovich
f1b37e0a4f [AMQ-8462] Remove double call to listConnectionStates during connection close
(cherry picked from commit 6a944a05d90b3f2d44c9890a5724e7a6a702a0eb)
2022-01-24 18:48:05 +01:00
Alexej Timonin
7a8d517436 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"}

(cherry picked from commit 7c6322700389c013be50139ae5c087f3e7da9510)
2022-01-22 17:14:44 +01:00
Matt Pavlovich
7295bd85a5 [AMQ-8043] Do not override JMSXUserID when message comes across network connector
(cherry picked from commit bec734a133ef27327414f1fb75066d01b4bd039a)
2022-01-15 06:48:26 +01:00
Jean-Baptiste Onofré
ec6db10c7e [AMQ-8252] Introduce stackTraceEnabled flag on transport connector to define if the stack trace should be displayed or not in case of WARN messages
(cherry picked from commit 2f96b4a60c30f1d9a3ce047aa41a94d975324d83)
2022-01-15 06:46:33 +01:00
Matt Pavlovich
6a25d654f2 [AMQ-8397] Add a destination option to sendDuplicateFromStoreToDLQ (#724)
- Default 'true' to match existing behavior
 - Added counter to DestinationView
2021-12-20 09:11:25 -06:00
Matt Pavlovich
f2dbc92743 [AMQ-8400] Add synchronization handling for Transaction to prevent CME (#720) 2021-12-20 09:11:19 -06:00
Matt Pavlovich
c58e531584 [AMQ-8413] Add remoteUserName and remotePassword config fields to network connector (#725) 2021-12-20 09:10:53 -06:00
Jean-Baptiste Onofré
57b1316d21 [AMQ-8395] Avoid possible NPE when sending advisory message
(cherry picked from commit f74992c1058eb8de051c1ce0779ba4f34ba39ed3)
2021-10-25 06:45:04 +02:00
Jean-Baptiste Onofré
be8fc6e6eb [maven-release-plugin] prepare for next development iteration 2021-08-10 07:47:44 +02:00
Jean-Baptiste Onofré
50582306a7 [maven-release-plugin] prepare release activemq-5.16.3 2021-08-10 07:47:23 +02:00
Christopher L. Shannon (cshannon)
2ec4673a59 AMQ-8349 - Ensure virtual destination consumer advisories are only
replayed to new advisory consumers and not existing

(cherry picked from commit 8b99596eeb721666fe0e2bece121aed2dea81075)
2021-08-05 09:59:41 -04:00
Jean-Baptiste Onofré
6f2d745ce5 [AMQ-8252] Doesn't display warn stack trace for stomp (regression compared to 5.15.x)
(cherry picked from commit ceaeaa986b4f9a233fe7b24f0e7b3b5c2dcfa9ec)
2021-08-04 08:24:28 +02:00
Matt Pavlovich
16ee3cd0f2 [AMQ-8285] Add 'slow' metrics to PersistenceAdapterStatistics (#664)
(cherry picked from commit c0d53996354a9db4a682af38604dae420b759ef9)
2021-06-04 06:20:44 +02:00
Colm O hEigeartaigh
f3e90aab44 AMQ-8117 - Allow java.util arrays for deserialization
(cherry picked from commit 7ca7118a9544fd6b2aac4dd72fd3a6edc3369aca)
2021-06-04 06:16:15 +02:00
Christopher L. Shannon (cshannon)
0f952f72f7 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

(cherry picked from commit 2fcf2fd75f7c2a04151a2284595a08bf4c03240b)
2021-06-02 13:54:37 -04:00
jbonofre
9eda1508e3 [maven-release-plugin] prepare for next development iteration 2021-04-21 07:39:09 +02:00
jbonofre
ff1af27106 [maven-release-plugin] prepare release activemq-5.16.2 2021-04-21 07:38:47 +02:00
kimmking
e5b6982afd 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)
(cherry picked from commit b6ab868f949a688b24a669398f7cdc7be100220b)
2021-03-22 16:23:17 +01:00
jbonofre
c152ea7c5d Fix slf4j logger use
(cherry picked from commit 1a2de52c5f580c24590c706fcf3b6fc61dc88379)
2021-03-20 17:12:46 +01:00
Christopher L. Shannon (cshannon)
34475dbde3 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

(cherry picked from commit 2cf3decd8e59a52ba135d8194279b6a6117d0e9c)
2021-03-15 07:56:17 +01:00
Christopher L. Shannon (cshannon)
0a099af4c4 AMQ-8183 - apply maxFrameSize high cpu usage fix to Auto nio transport
also

(cherry picked from commit 2712464b78f76affd34cc0b097a2248f211ea0c7)
2021-03-11 11:15:32 -05:00
Christopher L. Shannon (cshannon)
8d34120d93 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.

(cherry picked from commit 1654e6c79cfbc1ced5a8fa3f726a9f651560be9d)
2021-03-09 21:20:26 +01:00
jbonofre
6d82e628f7 [maven-release-plugin] prepare for next development iteration 2021-01-14 14:02:35 +01:00
jbonofre
e432a78c19 [maven-release-plugin] prepare release activemq-5.16.1 2021-01-14 14:00:24 +01:00
jbonofre
71be503447 [AMQ-7443] Add connection remote addr in the prefetch warn log message
(cherry picked from commit 7339e0516c39fe6736e8afd201bf176bbdd83950)
2021-01-14 06:06:11 +01:00
jbonofre
34bc37d68d [AMQ-7246] Add scheduledMessageCount attribute on the JobSchedulerView MBean
(cherry picked from commit f01e35f7d95bee8c22c5eb45b8b25375fc6ece59)
2021-01-13 18:49:42 +01:00
jbonofre
4cc287fcd7 [AMQ-8097] Deal with deserialization with xstream unmarshal poison ack
(cherry picked from commit cbc1baa07a2c3774dcfed288c9f3316dbcd35100)
2021-01-13 18:29:12 +01:00
jbonofre
737fa4e46e [AMQ-8060] Re add allowLinkStealing on transport connector for backward compatibility
(cherry picked from commit 0146d5eb3e69e086ec19df1df1b2b7966c644d26)
2021-01-09 07:27:12 +01:00
Roman Nevezhyn
f71c6674f0 [AMQ-8104] Fix NPE when pausing queue if audit is on
cherry picked from 651c5ff2cfe72c0de5f4f486c965cdbb80ceba0d
2020-12-28 07:36:21 +01:00
jbonofre
d9b2d9309e [AMQ-8068] Fix topic memory leak on message eviction using UniquePropertyMessageEvictionStrategy
(cherry picked from commit 2bc87c2c5f15d03296581b238a41e0fd4235892b)
2020-11-23 13:41:26 +01:00
dhmgit
894c60ee0c adding an option which allows messages to expire on active durable subscriptions
(cherry picked from commit 2f2fe6855fa397d7977f3e0bca513db2881d5e7f)
2020-11-22 07:17:44 +01:00
murali.mogalayapalli
d9113626e5 [AMQ-8028] Add sendWhenNotMatched option to composite destination filter
(cherry picked from commit 55914d3ac1dc90f35969ce16877429e475b9c2ab)
2020-11-21 14:22:06 +01:00
jbonofre
8c384676a8 Improve stability of KahaDB tests 2020-11-18 16:46:54 +01:00
Benjamin Graf
054febe0c9 AMQ-8055 - rename posion to correct poison
(cherry picked from commit a2e718f25957099ae734b44b9840b4f2a0199320)
2020-11-10 16:13:57 +01:00
Colm O hEigeartaigh
1b0a47bed5 AMQ-7512 - Consolidate XBean byte parsing
(cherry picked from commit 930b18df6575e89f1df4c4c6fa9e1e8ac68b2591)
2020-08-11 09:48:22 +02:00
Colm O hEigeartaigh
811f49b947 AMQ-7513 - Fix http://activemq.org links
(cherry picked from commit fca3b615eb869330633b71978843a682bfa8ab49)
2020-08-11 09:43:15 +02:00
Colm O hEigeartaigh
04430d8e93 AMQ-8020 - Replace toLowerCase().equals() with equalsIgnoreCase
(cherry picked from commit e3e2fda509d0c6761fe1368c025e83a31a576275)
2020-08-11 09:33:46 +02:00
Christopher L. Shannon (cshannon)
2fa7f09fb9 AMQ-8012 - Move synchronized block after null check
(cherry picked from commit 0a189f833e1041e589ffa9523bdbe2285a678eed)
2020-07-24 16:29:52 -04:00