981 Commits

Author SHA1 Message Date
Justin Bertram
a5f317dcdb ARTEMIS-5093 support configurable onMessage timeout w/closing consumer 2024-12-01 23:55:17 -06: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
Emmanuel Hugonnet
7f1751c43b ARTEMIS-5172 Reduce the permissions on temp file.
Ensure that the temproray large message content can only be read by the
user associated with the process.

Iusse: https://issues.apache.org/jira/browse/ARTEMIS-5172

Signed-off-by: Emmanuel Hugonnet <ehugonne@redhat.com>
2024-11-21 12:55:24 -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
Timothy Bish
b843e12852 ARTEMIS-2748 Support WebSocket compression in the transport pipeline
Adds support for WebSocket compression using the netty server handler to
enable per message compression and decompression as a transparent layer of
the netty pipeine.
2024-10-14 16:30:33 +01:00
Clebert Suconic
8e4bc33dc4 ARTEMIS-5097 Allow export and import data of undefined queues
This will allow users eventually undoing mistakes after removing a queue by accident.
2024-10-11 13:22:08 -04:00
Justin Bertram
e1c818d143 ARTEMIS-5078 support divert management via JSON 2024-10-02 14:53:36 -07:00
Justin Bertram
8a1f9e8874 ARTEMIS-5085 use retry parameters on initial connection
When the Core client attempts to create the initial connection to a
broker when initialConnectAttempts > 1 it will adhere to retryInterval,
but it will ignore retryIntervalMultiplier & maxRetryInterval. This
commit fixes that so that these parameters are taken into account.
2024-10-02 14:09:51 -07:00
Howard Gao
1f90b5be0d ARTEMIS-5062 ClusterConnectionControl has wrong annotation 2024-09-26 11:48:33 -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
1d1f03ad5e ARTEMIS-4971 Warning on Unacked messages through mirror AckManager 2024-09-25 09:52:37 -04: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
8b265f4625 ARTEMIS-4804 & ARTEMIS-4805 mitigate NPEs in ScaleDownHandler 2024-09-05 13:57:47 -04:00
Robbie Gemmell
9133cdb466 ARTEMIS-4962: add test, clarify some related comments 2024-09-03 13:52:10 -05:00
Justin Bertram
7605bd673f ARTEMIS-4915 clarify 'total' server metrics' descriptions 2024-09-03 12:13:14 +01:00
fogninid
9aa089b78b ARTEMIS-5013 do not override Netty leak detection
do not override the configured netty leak detection from client code.
Use the same logic as server, disabling the default only if no
properties are configured in the JVM.
See 127ce3a84a
2024-08-30 14:31:48 -05:00
Clebert Suconic
ffafbf350a ARTEMIS-5001 Relax consistency requirement on OperationContext for Mirror send operations.
Send operations should ignore replication, while the ack of the message should wait a round trip in replication.
That will allow us to ack the message faster and still have consistency with its replica.
2024-08-29 14:42:48 -04:00
Justin Bertram
d0c83af40e ARTEMIS-5017 bridge leaks ClientSessionFactory instance on reconnect attempt 2024-08-28 19:39:00 -04:00
Clebert Suconic
38693370c9 Revert "ARTEMIS-5001 Option to relax sync on journal replication for Mirroring"
This reverts commit d41f01a5aa3722002fc8199eda34198753cc23f2.
2024-08-26 12:49:42 -04:00
Clebert Suconic
d41f01a5aa ARTEMIS-5001 Option to relax sync on journal replication for Mirroring
Say you use Mirroring and journal replication combined.

The target will wait a round trip on replica before sends are done.
It is possible to ignore that rountrip now with an option added into Configuration#mirrorReplicaSync
2024-08-20 16:03:57 -04:00
Robbie Gemmell
3f5184a933 ARTEMIS-4986: fixups for prior PR feedback 2024-08-15 09:13:46 -04:00
Josh Byster
8b3874d613
ARTEMIS-4809 Allow configuring initial queue buffer size
In some setups, there could be a few hundred thousand queues that are
created due to many consumers that are connecting. However, most of
these are empty and stay empty for the entire day since there aren't
necessarily messages to be sent. The 8K intermediateMessageReferences
instantiates an 64KB buffer (Object[]). This means we have large
allocation and live heap that ultimately remains empty for almost the
entire day.

In this commit, we introduce initial-queue-buffer-size, which defaults
to the current value of 8192. It can be set programmatically via
QueueConfiguration#setInitialQueueBufferSize(int).

Note that this must be a positive power of 2.
2024-08-14 13:18:29 -05:00
Clebert Suconic
4cc43323bc ARTEMIS-4986 incrementing version on activemq-version.properties 2024-08-13 16:33:00 -04:00
Clebert Suconic
537e0023fc ARTEMIS-4986 Compatibility issue on Quorum Voting 2024-08-13 14:45:00 -04:00
Clebert Suconic
1a5c2ec51c Revert "ARTEMIS-4941 Remove lazy update after application properties as it's no longer needed"
This reverts commit fb2a57f3ed25895681d3636e3f5fb9d9b9d0a053.
2024-07-25 13:01:57 -04:00
Clebert Suconic
fb2a57f3ed ARTEMIS-4941 Remove lazy update after application properties as it's no longer needed 2024-07-22 15:31:36 -04:00
Justin Bertram
9a0797509d ARTEMIS-4936 verify response correlationId when using Core client
If, for whatever reason, the response for a packet sent with blocking
semantics is never returned it's possible that an async response
received in the interventing time will be interpreted as the current
response. This is because ChannelImpl does not verify the correlation
ID set on the response packet when it is received.
2024-07-19 07:05:46 -07:00
Clebert Suconic
5af90578cb ARTEMIS-4925 Test with mirror and replication.
Files will leak on the target and messages will not be received after failover.
Also messages will be written to wrong destinations on the replica. The leak is actually between destinations, and the consequence is the file leak.

I usually keep test and fix on the same commit, but in this case I have been heavily validating the server with and without the fix,
so I will open an exception in this case and keep the fix and test separated.
2024-07-16 17:05:06 -04:00
Justin Bertram
19d8059a4e ARTEMIS-4794 configure pending ack behavior for bridge
When a bridge is stopped it doesn't wait for pending send
acknowledgements to arrive. However, when a bridge is paused it does
wait. The behavior should be consistent and more importantly
configurable. This commit implements these improvements and generally
refactors BridgeImpl to clarify and simplify the code. In total, this
commit includes the follow changes:

 - Removes the hard-coded 60-second timeout for pending acks when
   pausing the bridge and adds a new config parameter (i.e.
   "pending-ack-timeout").
 - Applies the new pending-ack-timeout when the bridge is stopped.
 - Updates existing and adds new logging messages for clarity.
 - De-duplicates code for sending bridge-related notifications.
 - Avoids converting bridge name to/from SimpleString.
 - Removes unnecessary comments.
 - Renames variables & functions for clarity.
 - Replaces the `started`, `stopping`, & `active` booleans with a
   single `state` variable which is an enum.
 - Adds `final` to a few variables that were functionally final.
 - Synchronizes `stop` & `pause` methods to add safety when invoked
   concurrently with `handle` (since both deal with `state` and execute
   runnables on the ordered executor).
 - Reorganizes and removes a few methods for clarity.
 - Relocates `connect` method directly into `ConnectRunnable` (mirroring
   the structure of the `StopRunnable` and `PauseRunnable`).
 - Eliminates unnecessary variables in `ConnectRunnable` and
   `ScheduledConnectRunnable`.
 - Adds test to verify pending ack timeout works as expected with both
   `stop` & `pause` with both regular and large messages.
2024-07-15 18:19:39 +01:00
Justin Bertram
b8a9d626cd ARTEMIS-4920 strip leading forward slash from IP address 2024-07-12 11:00:53 -07:00
Justin Bertram
fea2be6a3a ARTEMIS-4921 include protocol name in disconnection log message 2024-07-11 10:31:17 -07: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
Justin Bertram
4c454e8abd ARTEMIS-4747 remove unreachable code 2024-06-19 20:23:55 -04:00
Justin Bertram
14c564a481 ARTEMIS-4800 simplify QueueConfiguration API
This commit does the following:

 - deprecate all QueueConfiguration ctors
 - add `of` static factory methods for all the deprecated ctors
 - replace any uses of the normal ctors with the `of` counterparts

This makes the code more concise and readable.
2024-06-10 07:58:40 -07:00
Clebert Suconic
5be983392c ARTEMIS-4798 Use original message to calculate the Mirror SNF size in order to start paging 2024-06-07 11:10:12 -04:00
Justin Bertram
7ca30e9a63 ARTEMIS-4796 simplify SimpleString API
This commit does the following:

 - deprecate the verbosely named `toSimpleString` static factory
   methods
 - add `of` static factory methods for all the ctors
 - replace any uses of the normal ctors with the `of` counterparts

This makes the code more concise and readable.
2024-06-06 11:53:03 -04:00
Robbie Gemmell
4ebb2cd41a ARTEMIS-4790: switch to timeout declarations with default units, tweak a few values 2024-06-05 11:40:33 +01:00
Robbie Gemmell
362dbd11ac ARTEMIS-4790: use JUnit 5 for the tests 2024-06-03 10:06:37 -05:00
Justin Bertram
acc64b184e ARTEMIS-4306 add authn/z cache metrics
This commit includes the following changes:

 - Management operations to get sucess & failure counts for authn and
   authz along with the corresponding audit logging.
 - Export the aforementioned authn & authz metrics.
 - Export metrics for the underlying authn & authz caches including the
   ability to enable/disable them.
 - Update metrics tests to validate tags in addition to keys and values.
 - Update documentation to explain new functionality and clarify
   existing metric tags.
2024-05-28 17:27:54 -04:00
m.napieraj
f7b15e351e
ARTEMIS-4772 expose broker plugin classes via management 2024-05-20 13:54:33 -05:00
Gary Tully
f5973d53e6 ARTEMIS-4766 - validate type before newInstance calls 2024-05-17 16:33:08 +01:00
Clebert Suconic
c523458a9a ARTEMIS-4758 Hardening Mirroring
This is a list of improvements done as part of this commit / task:

* Page Transactions on mirror target are now optional.

If you had an interrupt mirror while the target destination was paging, duplicate detection would be ineffective unless you used paged transactions
Users can now configure the ack manager retries intervals.
Say you need some time to remove a consumer from a target mirror. The delivering references would prevent acks from happening. You can allow bigger retry intervals and number of retries by tinkiering with ack manager retry parameters.

* AckManager restarted independent of incoming acks

The ackManager was only restarted when new acks were coming in. If you stopped receiving acks on a target server and restarted that server with pending acks, those acks would never be exercised. The AckManager is now restarted as soon as the server is started.
2024-05-02 17:23:28 -04:00
Justin Bertram
fc6f0ee9ec ARTEMIS-4740 reduce unnecessary boxing 2024-04-27 09:36:05 -05:00
Clebert Suconic
fdf2ea874b ARTEMIS-4733 Infinite mirror reflections after CreateAddress 2024-04-20 11:07:14 -04:00
a181321
51f39fc34d ARTEMIS-4498 Expose internal queues for management and observability 2024-04-11 10:28:04 -04:00
Alvin Kwekel
b9c919821b
ARTEMIS-4675 Add replication status metrics 2024-04-09 16:30:36 -05:00
Justin Bertram
9f50aff46d ARTEMIS-4713 mitigate NPE in LargeMessageControllerImpl 2024-04-04 17:26:00 -04:00