Commit Graph

2317 Commits

Author SHA1 Message Date
Gary Tully b11945e0c7 ARTEMIS-4410 - process deliveries before removing consumer on session close, ensure strict order for a single consumer 2023-09-01 12:52:58 +01:00
Justin Bertram 60ac0f32a5
ARTEMIS-4396 fill in some gaps 2023-08-31 11:35:00 -05:00
Justin Bertram cd8a2e5c49 ARTEMIS-4396 make address/queue internal prop durable 2023-08-31 14:09:42 +01:00
Alexey Markevich 50a1824c02 ARTEMIS-4349: Replace Guava cache with Caffeine
Combination of changes from Alexey Markevich with updates from Robbie Gemmell. See PRs for detail.

This closes #4584.
This closes #4540.
2023-08-29 16:00:53 +01:00
Justin Bertram 56c8afe934 ARTEMIS-4405 wrong user logged for authz audits 2023-08-29 15:35:22 +01:00
Andy Taylor 6b053dd290 ARTEMIS-4398 - support configuring database using Broker Properties
https://issues.apache.org/jira/browse/ARTEMIS-4398
2023-08-29 15:23:51 +01:00
Robbie Gemmell c1648d5917 ARTEMIS-4406: update LocalCache persisted entry tracking to use a ConcurrentHashMap 2023-08-29 10:07:32 +01:00
Robbie Gemmell df410da7ae ARTEMIS-4402: add some unit tests exercising the semi-generated log/message bundles to make generation problems more quickly noticable 2023-08-25 15:02:24 +01:00
Gary Tully 84c16f1a0d ARTEMIS-4378 ignore address federation config if connection is configured as pull, consumerWindowSize=0 2023-08-25 11:15:07 +01:00
Justin Bertram 29fafb5fed ARTEMIS-4399 fix disabled authn/z cache 2023-08-24 11:25:29 +01:00
Alexey Markevich 67f9c9d92d ARTEMIS-4391 tests: rework AssertionLoggerHandler 2023-08-17 05:47:24 -04:00
Yashashree Chopada ab3e67a24b ARTEMIS-4389 The word "mesage" should be corrected to "message" 2023-08-16 09:05:55 -04:00
Šmucr Jan 2f2dacdd34 ARTEMIS-4387 Fix empty consumer filter string leak 2023-08-14 10:06:25 +02:00
Clebert Suconic 064018a3e9 ARTEMIS-4384 cluster verify CLI command
ARTEMIS-4385 Expand StatQueue to visualize --clustered
2023-08-11 19:12:44 -04:00
Mike Artz c5f0e3400c ARTEMIS-4159 Support duplicate cache size configuration per address
This commit introduces support for configuring a specific Duplicate ID cache size per address in the Artemis server. Previously, there was only a global setting for the ID cache size, but now each address can have its own cache size.

The changes include the addition of a new configuration property id-cache-size in the Artemis server configuration file. This property can now be specified under each address setting in the configuration file, and its value will determine the Duplicate ID cache size for that particular address. If the id-cache-size property is not specified for an address, it will use the global setting.

The test cases have been updated to cover this new functionality, and integration test have been added to verify that address-specific cache sizes work as expected.

Documentation has been added to address-settings.adoc, configuration-index.adoc and duplicate-detection.adoc
2023-08-04 10:25:08 -05:00
Robbie Gemmell 116274e9ca ARTEMIS-4386: consolidate the used servlet api deps on the jetty one already being shipped 2023-08-04 11:57:01 +01:00
Gary Tully 5e232c25a4 ARTEMIS-4368 ensure predictable order for accurate logging 2023-07-20 22:33:06 +01:00
Justin Bertram 7048d9d4a5 [maven-release-plugin] prepare for next development iteration 2023-07-20 14:39:21 -05:00
Justin Bertram f05b63b8a1 [maven-release-plugin] prepare release 2.30.0 2023-07-20 14:36:44 -05:00
Clebert Suconic 677d71b8e7 ARTEMIS-4366 Missing Mirrored ACKs with MULTICAST and subscriptions 2023-07-17 20:19:06 -04:00
Gary Tully f5251bc5cb ARTEMIS-4356 ensure match regexp expression is anchored on eot to avoid partial matches in error 2023-07-14 20:48:19 +01:00
Justin Bertram cce565e78f ARTEMIS-4353 clean up Maven dependencies
This commit contains the following changes:
 - eliminate used, undeclared dependencies
 - eliminate unused, declared dependencies
 - fix scope for test dependencies
 - eliminate org.hamcrest completely as its use involved deprecated code
   as well as dependencies from multiple versions
2023-07-14 14:03:41 +01:00
a181321 68e400b45c ARTEMIS-4184 Bidges with concurrency not cleared properly on config reload 2023-07-13 16:16:08 -04:00
Clebert Suconic b967e6d940 ARTEMIS-4362 Produce log.warn when the system cannot depage because of pending acks 2023-07-13 16:15:45 -04:00
Domenico Francesco Bruscino 451d03fd75 ARTEMIS-4332 Add management method to close stuck server sessions
In rare cases a store operation could silently fails or starves, blocking the
related server session and all delivering messages. Those server sessions can
be closed adding a management method that cleans their operation context
before closing them.
2023-07-13 10:32:14 -04:00
Domenico Francesco Bruscino b4230c62bf ARTEMIS-4332 Add store operation trackers 2023-07-13 10:32:14 -04:00
Justin Bertram b198a9db7f ARTEMIS-4358 upgrade commons-configuration2
Version 2.9.0 of commons-configuration2 now includes commons-text 1.10.0
so the dependencies can be simplified.
2023-07-11 10:12:37 +01:00
Clebert Suconic 420f386fd2 ARTEMIS-4357 Replacing logger(222188).warn by a logger.debug 2023-07-10 11:30:43 -05:00
Clebert Suconic 6ee27224a5 ARTEMIS-4352 Avod Deadlock in case the SecurityManager is reusing the Netty executor.
If the Security Manager is using Netty, and in particular the same Netty connection,
you could run into a deadlock / starvation.

This is particularly true in the Wildfly case where they reuse the same connection for everything via XNIO.
2023-07-10 11:00:19 -04:00
Justin Bertram 2d1a8661fd ARTEMIS-4338 STOMP inoperable w/resource audit logging
When resource audit logging is enabled STOMP is completely inoperable
due to an NPE during the protocol handshake. Unfortunately the failure
is completely silent. There are no logs to indicate a problem.

This commit fixes this problem via the following changes:
 - Mitigate the original NPE via a check for null
 - Move the logic necessary to set the "protocol connection" on the
   "transport connection" to a class shared by all implementations.
 - Add exception handling to log failures like this in the future.
 - Add tests to ensure the audit logging is correct.
2023-07-06 12:08:16 +01:00
Gary Tully 196e479ae8 NO-JIRA additional test for status json with and without server 2023-07-06 09:39:53 +01:00
Robbie Gemmell cb9e1fedc8 ARTEMIS-4345: update to Error Prone 2.20.0 and fix up new errors 2023-07-05 09:40:24 +01:00
Justin Bertram f60a7d5c04 ARTEMIS-4341 refactor JavaDoc generation
Currently JavaDoc is generated for many classes that don't need it.
JavaDoc should be reserved for user-facing classes (e.g. those used by
client application developers and developers embedding a broker into
their application). This commit narrows down the configuration to just
the classes that are needed. This will save time during release builds,
and save disk space wherever these files are stored (e.g. Apache
website).
2023-07-04 18:00:42 +01:00
Domenico Francesco Bruscino fef7c147eb ARTEMIS-4336 Upgrade mockserver version to 5.15.0 2023-06-27 17:39:41 +01:00
Domenico Francesco Bruscino 247263c12c ARTEMIS-4335 Upgrade bcprov to bcprov-jdk18on:1.75 2023-06-27 17:39:41 +01:00
Justin Bertram b82419634a ARTEMIS-4328 add timeout to test which can hang
`org.apache.activemq.artemis.core.server.embedded.MainTest` expects the
broker to throw a `java.io.IOException` when it is started due to its
inability to find the file app/data/server.lock. However, if that files
just happens to exist then the test will simply hang indefinitely. This
commit adds a timeout to avoid hanging.
2023-06-26 12:12:59 +01:00
Gary Tully a76e9f81d2 Revert "ARTEMIS-4314 Small Tweak: using executor directly if no delay"
This reverts commit c6a82ff95e.
2023-06-22 15:40:45 +01:00
Justin Bertram dc4bf953e3 ARTEMIS-4319 mitigate NPE in paging log statement
Also improves the wording of some several related statements.
2023-06-21 17:42:45 +01:00
Justin Bertram 3db540c61b ARTEMIS-4315 incorrect validation for page-limit settings 2023-06-21 14:08:20 +01:00
Clebert Suconic c6a82ff95e ARTEMIS-4314 Small Tweak: using executor directly if no delay 2023-06-16 17:20:26 -07:00
Gary Tully a8b4ee1992 ARTEMIS-4314 support queue federation batchOnCapacity via consumerWindowSize=0 2023-06-16 15:44:51 +01:00
Clebert Suconic ae554b43db [maven-release-plugin] prepare for next development iteration 2023-06-14 18:20:58 -04:00
Clebert Suconic 2be5c54cd0 [maven-release-plugin] prepare release 2.29.0 2023-06-14 18:20:45 -04:00
Clebert Suconic ef3a91bdfb ARTEMIS-4313 Retry Bridge when destination full and configured to FAIL 2023-06-14 14:06:35 -07:00
Justin Bertram 3ff8419a4b ARTEMIS-4312 dupes w/redistribution and multicast
Multiple multicast queues on the same address can lead to duplicate
messages during redistribution in a cluster.
2023-06-14 11:19:56 -04:00
Justin Bertram c96a074b53 ARTEMIS-4292 support more Micrometer system metrics
This commit exposes Micrometer's system metrics for:
 - file descriptors
 - processor
 - uptime
2023-06-13 04:58:59 -07:00
Clebert Suconic e9b5931227 ARTEMIS-4278 Removing System.out left by accident 2023-06-09 08:50:11 -04:00
Domenico Francesco Bruscino 5553b6264c ARTEMIS-4299 Exclude unused json-smart dependency 2023-06-01 14:20:59 +02:00
Justin Bertram c4501f6793 ARTEMIS-4294 support text-encoded WebSocket frames 2023-05-31 16:34:02 -05:00
clebert c5be8b72c1 ARTEMIS-4298 and ARTEMIS-4215 Fixing duplicated entries on historyFiles on journalRetention during a replication
This is Fixing BackupSyncJournalTest::testReplicationDuringSync

ARTEMIS-4215 introduced a failure on the testsuite.
However the failure is non related to the Buffer itself. it introduced a race that unveiled ARTEMIS-4298.
2023-05-31 11:58:56 -07:00
Justin Bertram e7de2c7001 ARTEMIS-4297 allow regex in no-cache exception config 2023-05-31 11:37:28 -07:00
Roelof Naude 40425d422a ARTEMIS-4291 Add the "broker" tag in a consistent manner to all exported metrics.
Some scrapers, e.g. prometheus, add an "instance" tag. This value may not be the same as
the broker name, which results in these metrics becoming more difficult to match up with
the corresponding broker.
2023-05-31 12:45:32 -05:00
Justin Bertram 15aafe0b70 ARTEMIS-4293 add mngmnt ops to clear authn/z caches 2023-05-26 16:47:33 +02:00
Clebert Suconic 1b9089fc2a NO-JIRA Commandment: don't use this method 2023-05-25 15:46:25 -04:00
Justin Bertram b97d711733 ARTEMIS-4286 sometimes federated consumer won't stop 2023-05-24 18:22:33 +01:00
Gary Tully 587ffb223c ARTEMIS-3042 simple properties based, extensible broker image 2023-05-24 15:22:01 +01:00
Clebert Suconic e719622de5 ARTEMIS-4285 Limit number of redelivery records 2023-05-19 13:59:28 -07:00
Justin Bertram a57c48ec55 ARTEMIS-4275 add ID to consumer notifications 2023-05-19 16:27:36 -04:00
Justin Bertram 3a48258f7d ARTEMIS-2824 clientID not set on some notifications 2023-05-19 16:03:16 -04:00
Clebert Suconic 03afbedfe3 ARTEMIS-4282 Large Header may break the broker 2023-05-17 16:04:54 -07:00
Clebert Suconic ec54576323 ARTEMIS-4281 Queue Reaper should not remove non empty queues on initial check 2023-05-17 15:58:54 -07:00
Gary Tully d2abc56f56 ARTEMIS-4280 - map roles from review group info, optional roles properties file 2023-05-17 15:16:37 +01:00
Clebert Suconic 7434098922 ARTEMIS-4278 Code Improvements after comments from RVais on PR #4472 2023-05-16 09:12:54 -07:00
Stephen Higgs f1f017fb3b ARTEMIS-4279 Shutdown critical analyzer thread if error on broker initialization
The broker process fails to exit if an error is encountered starting the NodeManager.  The issue is resolved by converting the critical analyzer thread to a daemon thread.  As added protection, the thread is manually stopped when this error is encountered.
2023-05-16 01:32:43 -07:00
Clebert Suconic f082b9c5d1 ARTEMIS-4199 Adding test for open transaction on reset call 2023-05-15 07:08:05 -07:00
Clebert Suconic bea39f6692 ARTEMIS-4278 Incorrect Paging Counters with Prepared Transactions 2023-05-11 13:50:00 -07:00
Alexey Markevich 383345a4f6 ARTEMIS-4239 use StandardCharsets.UTF_8 2023-05-08 15:10:23 -05:00
Justin Bertram c2bada6a77 ARTEMIS-4267 original exception lost for NoCacheLoginException
When skipping the authentication cache details for the original
exception are not logged.

This commit ensures these details are logged and adopts the
ExceptionUtils class from Apache Commons Lang in lieu of the previous
custom implementation.
2023-05-08 17:01:35 +02:00
Gary Tully c5d872575e ARTEMIS-4256 - support removal of configuration via properties 2023-05-05 11:58:15 +01:00
Gary Tully cf3afc4096 ARTEMIS-4263 authenticator to delegate to artemis jaas login modules and populate callback handler 2023-05-05 10:00:52 +01:00
Justin Bertram 6254c140e3 ARTEMIS-4212 handful of updates
- fix syntax used for 'addresses' CLI option
 - update release notes
 - enforce new semantics on parsing & add test
2023-05-04 12:25:15 -07:00
Justin Bertram dc0b3ac55a ARTEMIS-4266 mitigate NPE with bad SSL config 2023-05-03 06:26:02 +02:00
Justin Bertram acd6605ebf ARTEMIS-4212 fix tests 2023-04-28 06:54:16 -07:00
Justin Bertram 1fa5c761c6 ARTEMIS-4212 fix management address issues 2023-04-28 06:54:16 -07:00
Domenico Francesco Bruscino 126765decc ARTEMIS-4252 Refine waitForBridges 2023-04-26 17:09:59 -05:00
Domenico Francesco Bruscino cc9db6b2f7 ARTEMIS-4244 Set web config using system properties 2023-04-26 17:07:32 -05:00
Clebert Suconic c2ad54fa91 ARTEMIS-4247 Fixing BrokerInSyncTest::testExpiryNoReaper
Once the context is set to disable mirror, it should stay that way even if reset is called.
2023-04-26 00:28:12 -04:00
Justin Bertram 74fa4ca758 ARTEMIS-4212 fix sending msgs to address w/mismatching routing types
When sending, for example, to a predefined anycast address and queue
from a multicast (JMS topic) producer, the routed count on the address
is incremented, but the message count on the matching queue is not. No
indication is given at the client end that the messages failed to get
routed - the messages are just silently dropped.

Fixing this problem requires a slight semantic change. The broker is now
more strict in what it allows specifically with regards to
auto-creation. If, for example, a JMS application attempts to send a
message to a topic and the corresponding multicast address doesn't exist
already or the broker cannot automatically create it or update it then
sending the message will fail.

Also, part of this commit moves a chunk of auto-create logic into
ServerSession and adds an enum for auto-create results. Aside from
helping fix this specific issue this can serve as a foundation for
de-duplicating the auto-create logic spread across many of the protocol
implementations.
2023-04-25 16:08:31 -05:00
Clebert Suconic fea84e39f5 ARTEMIS-4247 BrokerClustering vs Mirror code improvements 2023-04-25 08:10:58 -07:00
Domenico Francesco Bruscino ef4501292e ARTEMIS-4252 Fix flaky QuorumFailOverTest tests 2023-04-24 06:11:51 -07:00
Clebert Suconic 2a81a0a3c6 ARTEMIS-4247 Inconsistencies between Broker Clustering and AMQP Mirror
- activemq.notifications are being transferred to the target node, unless an ignore is setup
- topics are being duplicated after redistribution
- topics sends are being duplicated when a 2 node cluster mirrors to another 2 node cluster, and both nodes are mirrored.
2023-04-21 10:30:32 -05:00
Justin Bertram 673481369f ARTEMIS-4241 paging + FQQN is broken 2023-04-17 21:51:08 +02:00
Clebert Suconic 4eb978b931 ARTEMIS-4233 Disabling RefCounting debug and error after paged messages 2023-04-12 16:40:26 -07:00
Clebert Suconic e368dacc78 ARTEMIS-4207 Improving redistribution fix over large messages 2023-04-09 17:05:17 -07:00
Alexey Markevich 61c687ec9c ARTEMIS-4195 Auth callback to get Client ID
introduce ClientIDCallback to allow JAAS login module to retrieve Client
ID
2023-04-06 11:23:45 -05:00
Justin Bertram 6851e7d677 ARTEMIS-4204 connectors added via management are not durable 2023-04-06 11:22:18 -05:00
Clebert Suconic 6d3dbc4383 ARTEMIS-4233 Large Message Issues After Failed Clients
- interrupted message breaking reference counting
After the server writing to the client is interrupted in AMQP, the reference counting was broken what would require the server restarted
in order to cleanup the files of any interrupted sends.

- Removed consumer during large message delivery damaging large messages
If the consumer failed to deliver messages for any reason, the message on the queue would be duplicated. what would wipe out the body of the message
and other journal errors would happen because of this.

extra debug capabilities added into RefCountMessage as part of ARTEMIS-4206 in order to identify these issues
2023-04-06 07:40:01 -07:00
Clebert Suconic 23bbf76bdf ARTEMIS-4233 Avoiding holder.iter=null with a compile time validation 2023-04-06 07:40:01 -07:00
Justin Bertram 8ba9727b78 ARTEMIS-4210 refactor connection audit logging
This commit fixes the following things:

 - Moves connection audit logging to the resource audit logger instead
   of using a dedicated logger as that would adversely impact upgrading
   users, and arguably didn't make sense in the first place.
 - Mitigates an potential NPE w.r.t. connection ID.
 - Updates the "dummy" management connection to return a valid
   connection ID.
2023-03-30 14:37:17 -07:00
Clebert Suconic a8d828a510 ARTEMIS-4224 cert-users-LARGE.properties is too big for certain CI machines 2023-03-29 15:00:46 -05:00
Justin Bertram d2e5ddfe86 ARTEMIS-4210 audit connection creation & destruction 2023-03-28 16:21:04 -05:00
Clebert Suconic 15d39a14ea ARTEMIS-4207 Improved fix on LargeMessage Redistribution
This fix will delay the message.copy to the redistributor itself.
Meaning no copy would be performed if the redistribution itself failed.

No need to remove a copy any longer
2023-03-27 10:45:07 -07:00
Clebert Suconic 6d9bd71901 NO-JIRA I meant to remove this line 2023-03-18 18:48:07 -04:00
Clebert Suconic d730d1a684 NO-JIRA Testsuite speedup: proper JDBC drop from derby 2023-03-18 15:44:03 -07:00
Domenico Francesco Bruscino aaa8627795 ARTEMIS-4211 Fix record message id for federated queue consumers
The federated queue consumer has to generate a new id for the messages
received from the upstream broker because they have an id generated by
the store manager of the upstream broker.

Co-authored-by: Clebert Suconic <clebertsuconic@apache.org>
2023-03-18 08:52:21 -07:00
Clebert Suconic f43d3c4bde ARTEMIS-4207 Removing logger.info added by accident (temporary debug) 2023-03-15 18:01:03 -04:00
Clebert Suconic 8b2be8ef3b ARTEMIS-4207 Removing logger.info added by accident (temporary debug) 2023-03-15 16:24:25 -04:00
Clebert Suconic 3a5601572e ARTEMIS-4207 Redistribution could leave messages stranded in the folder
- redistribute received the handle call, it then copies the message
- the routing table changes
- the message is left behind

With the new version of the server these messages will be removed. But we should remove these right away
2023-03-15 12:46:50 -07:00
Clebert Suconic 4babdab18c NO-JIRA Cleanup MBeanServer usage in the testsuite as it is leaking
Basically I started the testsuite and attached check leak with "java -jar check-leak.jar --pid <pid> --report testsuite-report --sleep 1000" and saw the allocations of this were pretty high.
2023-03-15 12:42:12 -07:00
Clebert Suconic 2c037386b6 ARTEMIS-4206 Unreferenced AMQP Large Messages not removed right away, requiring a reboot 2023-03-15 05:57:51 -07:00