721 Commits

Author SHA1 Message Date
Justin Bertram
54f93c7e77 ARTEMIS-5291 simplify assertions 2025-02-05 17:15:55 +00:00
Justin Bertram
c8ca8c0ae4 ARTEMIS-5290 order JUnit assertEquals arguments properly 2025-02-05 17:15:55 +00:00
Justin Bertram
d029fd463f ARTEMIS-5139 improve locking on TypedProperties
Back in 8e40b2d4f4f242271d3dfcda4f9b96d3f94cee1b thread safety was added
to TypedProperties by synchronizing all relevant methods. This was
simple and effective but suffers from performance issues in read-heavy
use-cases.

This commit improves the performance by using a read/write locking
mechanism so reads can execute concurrently.

No new tests were added since the original commit added tests to verify
thread safety.
2025-02-04 13:39:39 -08:00
Justin Bertram
d54c771b2c ARTEMIS-5281 use isEmpty() where possible 2025-01-30 17:37:25 +00:00
Justin Bertram
0aa9c2d6ea ARTEMIS-5271 eliminate unused variables 2025-01-30 17:37:25 +00:00
Justin Bertram
9af357bae0 ARTEMIS-5278 use pattern matching for instanceof 2025-01-30 17:37:25 +00:00
Justin Bertram
fecbd73e12 ARTEMIS-5273 use collection interfaces where possible 2025-01-30 17:37:25 +00:00
Justin Bertram
a40b0a5735 ARTEMIS-5272 eliminate unused private fields 2025-01-30 17:37:25 +00:00
Justin Bertram
d8db09e7ee ARTEMIS-5270 eliminate redundant casts 2025-01-30 17:37:25 +00:00
Justin Bertram
89e23c2fa0 ARTEMIS-5268 avoid EMPTY_ properties in Collections
Type safety is better with the empty methods (e.g. emptyList, emptyMap,
etc.).
2025-01-30 17:37:25 +00:00
Justin Bertram
a4cedbcb04 ARTEMIS-5267 use containsKey where possible 2025-01-30 17:37:25 +00:00
Justin Bertram
33d064df1a ARTEMIS-4926 throw checked URISyntaxException on bad URL 2025-01-23 16:49:20 +00:00
Timothy Bish
d130d6b829 ARTEMIS-5250 Add sender state to the management metrics for federation
Adds management and metrics to the outgoing AMQP senders created by a
remote peer that has message federation configured from the local broker
including a view for the remote policies that tracks number of sent
messages for all producers. Also adds a top level federation management
view that shows counts for incoming and outgoing messages for all
federation consumer and producers.

Add a more declarative state handling API for initialization, start,
stop and shutdown to federation resources and the broker connection API
to make management resource create and cleanup more reliable and robust
to avoid and leaked management objects when reconnection attempts stop
or broker connections are manually stopped or are stopped by
configuration updates or configuration remove.
2025-01-21 17:47:02 +00:00
Gary Tully
d692680a0b ARTEMIS-5248 add all roles in an ordered list to the audit log user string 2025-01-16 12:02:36 -06:00
Justin Bertram
bf1b3b7fa1 ARTEMIS-5234 make style for parentheses consistent
This commit enforces a consistent style for parentheses, namely that
there is no padding. Futhermore, it updates all the code that violates
this styling so that the code is styled consistently across the entire
code-base.
2025-01-09 13:37:11 +00:00
Justin Bertram
a069a14d04 ARTEMIS-5233 make style for commas consistent
This commit enforces a consistent style for commas, namely that a space
should follow a comma. Futhermore, it update all the code that violates
this styling up to date so that the code is styled consistently across
the entire code-base.
2025-01-08 16:23:24 -05:00
Justin Bertram
d49476d0a1 [maven-release-plugin] prepare for next development iteration 2024-12-16 09:25:19 -06:00
Justin Bertram
fb1c6e3217 [maven-release-plugin] prepare release 2.39.0 2024-12-16 09:19:43 -06:00
Justin Bertram
e6f97f6e5c
Revert "[maven-release-plugin] prepare release 2.39.0"
This reverts commit 0604de39d6cc1f2946368d5775a9ef4ff753cbbf.
2024-12-16 08:55:55 -06:00
Justin Bertram
6b6ae242ed
Revert "[maven-release-plugin] prepare for next development iteration"
This reverts commit 918ef0efbe62ed5c64a0c2f8adc8f0cc3aba35d2.
2024-12-16 08:55:38 -06:00
Justin Bertram
918ef0efbe [maven-release-plugin] prepare for next development iteration 2024-12-13 08:10:30 -06:00
Justin Bertram
0604de39d6 [maven-release-plugin] prepare release 2.39.0 2024-12-13 08:05:42 -06:00
Justin Bertram
a2357b9d6d ARTEMIS-5210 bump com.google.errorprone:error_prone_core from 2.31.0 to 2.36.0 2024-12-12 12:20:26 -05:00
Justin Bertram
755c40daea ARTEMIS-5202 require Java 17+ (i.e drop support for Java 11)
This commit drops support for Java 11. All code changes were related to
output from ErrorProne that prevented the build from completing.
2024-12-11 14:29:25 +00:00
Clebert Suconic
bb7d567f5d ARTEMIS-5206 Provide description='' instead of null in some ActiveMQException instances 2024-12-10 10:07:47 -05:00
Andy Taylor
c9f9b33bf9 ARTEMIS-5131 Add A Copy message button to console
This exposes a copyMessage method that simply copies a message to a different queue so the new console can add a copy button
2024-11-21 12:57:16 -05:00
Timothy Bish
e9c06bd9f8 ARTEMIS-5157 Add management for AMQP broker connections
Add basic management views for AMQP broker connections and implement control
types for AMQP federation features along with the broker connection management
views. Some initial work also to provide support for other broker connection
features to add management control and also plan for future views of incoming
broker connections and management of AMQP federation resources.
2024-11-20 12:16:44 +00:00
Robbie Gemmell
8a912ed209 ARTEMIS-5110: retire/exclude previously-used IDs removed/reassigned in the following older commits:
177e6820b541e0a71b952eebf503a4d2235910c5
e34fd09ce325a551bf2eaf579854e2e107435502
e065d25b6fb4cdfa7f5b72afd52d6f4771b50634
af9bd7b84aad32e4fe30f2c8909e51cf7300b475
f4bdacbc4cb46b308f80391940890c74bf111ecd
74951d9221b29336c6575de9390a8557114e10eb
fe0ca4d84fc587b701e4b83ae8e5f2240c222842
b08b91a32faa89cdff4403b532e60d96084f2d4a
85857ab8eb1b1eca2498306239740e0e39d2acd4
e02ec69021f24220c0b91b8324382c9630415276
bf9f6d213bf6b3bf4fd7e15430ada8c9954e69ce
2d806807b8d9006cf642392ad5da9878394cebae
52a4157bbb898ee8fd8d7f13fffca71a9c368630
53bb3ea1833cddda6c2ded70d3149286c8207570
d5f152c7254c378707b12ad4a0b798fdb8cb7b10
b3529dcea428fa697aacbceacc6641e47cfb74ba
246bf083914c7acbb05a7fe0904c471331242c39
8a04ee07de8a7c863daf37a07a1176131151caa0
6cb68f2ce923ea3c2400c21967b2003175c8a0f4
9873fccf744c0cb0a25dd905fab67ea52ef7aa7d

See PR for individual commits which were squashed to form this change. This closes #5320
2024-11-01 11:23:13 +00:00
Justin Bertram
d01ea80df9 ARTEMIS-5110 add ability to identify retired IDs in log annotations
The broker uses unique IDs for logging statements. As logging changes
over time we need a way to "retire" these IDs (e.g. when certain
logging statements are no longer needed) to ensure they are not used

This commit does the following:

 - Removes all the logging methods which are no longer used and
   "retires" the corresponding ID (i.e. adds them to the `retiredIDs`
   list for that LogBundle).
 - Updates the validation for IDs that have been retired or are in
   active use including a new suggestion about a valid ID to use when an
   invalid ID is found.
 - Fixes all the regular expressions in all the various uses of
   `@LogBundle` to ensure there are no overlaps to prevent duplicates
   between bundles.

Changes from myself and Robbie Gemmell (see PR). This closes #5303.
2024-10-25 15:14:07 +01:00
Justin Bertram
9380235a5e [maven-release-plugin] prepare for next development iteration 2024-10-16 10:10:37 -05:00
Justin Bertram
241e76f9da [maven-release-plugin] prepare release 2.38.0 2024-10-16 10:08:10 -05:00
Domenico Francesco Bruscino
c3f1e09e88 ARTEMIS-5101 Deprecate default codec two-way algorithm
Throughout the years, the standard mechanism for storing passwords has evolved.
In the beginning, passwords were stored in plaintext. Developers are now
encouraged to leverage adaptive one-way functions to store a password. Using a
two-way function by default for storing passwords without a warning could lead
users to a false sense of security.
2024-10-15 08:40:14 -05:00
Domenico Francesco Bruscino
519472def9 ARTEMIS-5103 Remove hardcoded secure random algorithm from default codec 2024-10-15 08:25:14 -05:00
Justin Bertram
a89c452ab7 ARTEMIS-5073 formatting error of AMQ601771 audit log event 2024-10-01 13:15:40 -05:00
Clebert Suconic
b084eac71d ARTEMIS-5065 Remove Mirrored Properties on send for OpenWire and Core 2024-09-25 21:57:20 -04:00
Clebert Suconic
f92a846c21 ARTEMIS-5038 Mirrored ACKs are broken if using multiple priorities on producers
PriorityLinkedList has multiple sub-lists, before this commit PriorityLinkedList::setNodeStore would set the same node store between all the lists.
When a removeWithID was called for an item on list[0] the remove from list[4] would always succeed first. This operation would work correctly most of the time except
when tail and head is being used. Many NullPointerExceptions would be seen while iterating on the list for remove operations, and the navigation would be completely broken.

A test was added to PriorityLinkedListTest to make sure the correct lists were used however I was not able to reproduce the NPE condition in that test.
AccumulatedInPageSoakTest reproduced the exact condition for the NPE when significant load is used.
2024-09-23 11:48:24 -04:00
Justin Bertram
c8f51952f4 ARTEMIS-5048 clean up for removal of Base64.java 2024-09-19 11:06:37 -07:00
Justin Bertram
d9d84f814c ARTEMIS-5048 use java.util.Base64
We've traditionally used org.apache.activemq.artemis.utils.Base64 for
Base64 encoding/decoding. This implementation is based on public domain
code from http://iharder.net/base64.

In Java 8 java.util.Base64 was introduced. I assumed we hadn't switched
to this implementation for performance reasons so I created a simple
JMH-based test to compare the two implementations and it appears to me
that java.util.Base64 is significantly faster than our current
implementation. Using the JDK's class will simplify our code and
improve performance. Also, it should be 100% backwards compatible
since Base64 encoding/decoding is standardized.
2024-09-18 12:15:14 -07:00
Justin Bertram
465e985388 ARTEMIS-5018 eliminate deprecated use of Class.newInstance 2024-08-28 17:30:19 -04:00
Clebert Suconic
c042fb9e13 [maven-release-plugin] prepare for next development iteration 2024-08-16 10:23:18 -04:00
Clebert Suconic
0ec68a93d3 [maven-release-plugin] prepare release 2.37.0 2024-08-16 10:23:17 -04:00
Clebert Suconic
209f293922 [maven-release-plugin] prepare for next development iteration 2024-08-14 14:39:34 -04:00
Clebert Suconic
de6efc82d1 [maven-release-plugin] prepare release 2.37.0 2024-08-14 14:39:21 -04:00
Clebert Suconic
537e0023fc ARTEMIS-4986 Compatibility issue on Quorum Voting 2024-08-13 14:45:00 -04:00
Justin Bertram
ef3b5fa02c ARTEMIS-4985 message priority occasionally broken
The test in this commit was distilled down from a much more complex
integration test that rarely reproduced the problem. It is short and
sweet and reproduces the problem every time.

The problem exists in the iterator's `remove()` method where it uses
`index` instead of `i` when calculating a new highest priority.
2024-08-12 14:55:25 -07:00
Clebert Suconic
fa917ae3fd [maven-release-plugin] prepare for next development iteration 2024-07-25 13:47:10 -04:00
Clebert Suconic
75f17ba64d [maven-release-plugin] prepare release 2.36.0 2024-07-25 13:47:09 -04:00
Robbie Gemmell
d45349fa67 ARTEMIS-4872: use explicit annotationProcessorPaths compiler config
Updates artemis-log-annotation-processor to use artemis-project so that
artemis-pom can reference artemis-log-annotation-processor without cycle.

Split out its tests to their own module to faciltate, also exercising the
profile mechanism to enable the processor usage with trigger file.

Simplify disabling processing in the module using maven.compiler.proc prop
available since maven-compiler-plugin 3.13.0

Uses a dummy non-processor path at root to 'disable' processsing on JDK < 23,
accounting for Maven 3 not being able to unset maven.compiler.proc from a
parent, and JDKs < 21 requiring newest builds to support -proc:full value
needed otherwise to reenable processing once explicitly disabled.
2024-06-28 16:49:27 +01:00
Justin Bertram
ca73dee630 ARTEMIS-4833 remove redundant type arguments 2024-06-24 10:41:39 -07:00
Justin Bertram
d7cf5dfa44 ARTEMIS-4829 use lambdas consistently
This commit uses lambdas or method references wherever possible. There
are still a handful of places that appear like they could be changed but
couldn't mainly because they use "this" and the meaning of "this"
changes when using a lambda.
2024-06-21 12:01:16 -04:00