Commit Graph

1243 Commits

Author SHA1 Message Date
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
Timothy Bish c932b75de6 ARTEMIS-4998 Fix Federation link close wrongly closing the connection
The federation sender links can react incorrectly when the source broker
closes a receiver because the demand is gone and they can result in the
remote broker closing its side of the connection causing the whole federation
to need to be rebuilt. Handle the closure events correctly to prevent an
unexpected close and rebuild.
2024-08-20 11:16:16 +01: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
Timothy Bish f031481012 ARTEMIS-4982 Cleanup AMQP large message files for rejected sends
When an incoming AMQP large message send is rejected the broker should delete the
large message file as part of the reject handling.
2024-08-12 17:39:51 +01:00
Timothy Bish be4995a530 ARTEMIS-4969 Ensure AMQP senders can target FQQN if authorized
When using targeted FQQN permissions the AMQP sender needs to check that
it can access not only the address but also the queue if sent an FQQN so
that the security can validate if the sender has been granted directed
access to the FQQN as a whole.
2024-08-06 10:21:57 +01:00
Timothy Bish 8250e611df ARTEMIS-4963 Check send auth on openwire producer create
Check that an attaching Openwire producer has SEND permission on the target
destination and reject it if it does not instead of delaying checks until the
actual send. For anonymous producers check early in the send process to reduce
overhead in the JVM handling messages that are going to fail to send.
2024-08-02 16:38:20 +01: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
Clebert Suconic db0ba73aa4 ARTEMIS-4941 Remove lazy update after application properties only when it's paging
for regular messages it's quite obvious when the message is leaving the queue but for paged messages it becomes a challenge. We should just ignore the update for paged messages.
2024-07-25 13:01:57 -04:00
Clebert Suconic 1a5c2ec51c Revert "ARTEMIS-4941 Remove lazy update after application properties as it's no longer needed"
This reverts commit fb2a57f3ed.
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
Timothy Bish 1361e29739 ARTEMIS-4919 Handle Exception from proton transport process
Handle any exceptions from the proton transport and set the error on the
transport for processing in the events dispatch cycle by adding in handling
of the transport error event.
2024-07-15 15:34:21 +01:00
Justin Bertram fea2be6a3a ARTEMIS-4921 include protocol name in disconnection log message 2024-07-11 10:31:17 -07:00
Justin Bertram ac5713be81 ARTEMIS-4922 remove spurious warn msg when OpenWire client disconnects 2024-07-11 07:13:49 -07:00
Clebert Suconic 0327fc31d8 ARTEMIS-3509 Concurrent Modification Exception on Stomp Transactions
Co-authored with Anant Sony
2024-07-05 14:30:58 -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
Timothy Bish c6f227cbb8 ARTEMIS-4820 Read Header TTL as unsigned integer to set expiration
When setting expiration on the AMQPMessage the AMQP header TTL value
should be read as an unsigned integer and as such should use the longValue
API of UnsignedInteger to get the right value to set expiration.
2024-06-17 13:32:43 -05:00
Timothy Bish a6ff05ecd7 ARTEMIS-4817 Check policy credits before checking parent credits
When checking if address federation can be done the manager needs to look
at the policy level settings before looking at federation or connector
level settings for amqp credits.
2024-06-13 15:35:00 -07:00
Clebert Suconic f4fd259f07 [maven-release-plugin] prepare for next development iteration 2024-06-12 11:58:53 -04:00
Clebert Suconic b4d3a77649 [maven-release-plugin] prepare release 2.35.0 2024-06-12 11:58:52 -04:00
Clebert Suconic 4eb90765a7 ARTEMIS-4813 Large Message in replication / sync could lose part of the body
This is a regressio after ARTEMIS-4784
2024-06-12 00:31:22 -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
Timothy Bish fad1f5274c ARTEMIS-4799 Fix broker connection receiver attach handling
The receiver attach in broker connection does not wait for the remote
attach to arrive before creating the broker side receiver plumbing which
leads to the broker treating the remote sender as an anonymous relay when
it is not and should not be. Await the remote attach in response to the
attach sent by the broker connection to finish the link setup but use the
locally defined target address vs the remote to route the incoming messages.
2024-06-07 11:21:42 +01:00
Timothy Bish ac1b483cb4 ARTEMIS-4801 Fix issue with caching address query results
When caching address query results the remote session can be blocked forever
from creating links on an address if the "does not exist" value is cached
since it is never updated again and will always report "does not exist" even
if the address is added manually via management later. The cache state can
cause other issues for long running sessions as well and should be removed
to avoid attach failures for cases where the current broker state could allow
the attach to succeed but the cached entry won't allow it.
2024-06-06 21:07:22 -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
Justin Bertram de0f6ac8f5 ARTEMIS-4760 creating MQTT consumer should work if auto-create-queues is false 2024-06-05 09:06:53 +01:00
Timothy Bish 4daefbf138 ARTEMIS-4792 Allow consumer priority to be added to receiver link address
Allow the Source address to provide consumer priority on the address using the
same option value as a core consumer '?consumer-priority=X'. The change parses
any query string appended to an address and uses the address portion as the
actual receiver address and currently only looks at consumer priority values in
the extracted address query parameters and ignores any other options found. The
existing consumer priority taken from link properties takes precedence over the
value placed on the address query options if both are present.
2024-06-04 17:38:52 +01:00
Robbie Gemmell 362dbd11ac ARTEMIS-4790: use JUnit 5 for the tests 2024-06-03 10:06:37 -05:00
Timothy Bish 892c1225b0 ARTEMIS-4788 Fix a rare race on broker shutdown in AMQP federation
Race on consumer create and broker shutdown could lead to a deadlocak trying
to access configuration from the policy manager while the federation instance
is trying to shutdown the policy manager.
2024-05-30 19:44:34 -04:00
Clebert Suconic 6cd9c9730b [maven-release-plugin] prepare for next development iteration 2024-05-29 12:13:17 -04:00
Clebert Suconic 30ea6eeae0 [maven-release-plugin] prepare release 2.34.0 2024-05-29 12:13:16 -04:00
Timothy Bish 3244965155 ARTEMIS-4771 AMQP Large Message Writer no-op staged write if already closed
If the writer is closed while flow controlled write attempts are pending in the
connection executor an NPE is thrown which should be avoided as the closed state
should trigger the writes to stop. Add fix and test that checks that this works
as it should.
2024-05-23 17:42:34 +01:00
Justin Bertram 3c058e98f1 ARTEMIS-3622 MQTT can deadlock on client cxn/discxn
This commit fixes the deadlock described on ARTEMIS-3622 by moving the
synchronization "up" a level from the MQTTSession to the
MQTTConnectionManager. It also eliminates the synchronization on the
MQTTSessionState in the MQTTConnectionManager because it's no longer
needed. This change should not only eliminate the deadlock, but improve
performance relatively as well.

There is no test associated with this commit as I wasn't able to
reproduce the deadlock with any kind of straight-forward test. There was
a test linked on the Jira, but it involved intrusive and fragile
scaffolding and wasn't ultimately tenable. That said, I did test this
fix with that test and it was successful. In any case, I think static
analysis should be sufficient here as the changes are pretty
straight-forward.
2024-05-21 15:15:44 +01:00
Clebert Suconic e47d8ea7c1 ARTEMIS-4774 Fixing PageCounters out of sync after AckMnager retries 2024-05-17 09:47:34 -04:00
Clebert Suconic 23ca774f43 NO-JIRA fixing logger.info as logger.debug 2024-05-06 08:59:07 -04: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
Timothy Bish d7a7116a4c ARTEMIS-4754 Structure the names used for federation internal queues
When creating internal temporary queues for the federation control links and the
events link we should use a structured naming convention to ease in configuring
security for the federation user where all internal names fall under a root prefix
which can be used to grant read and write access for the federation user. This
change allows security on the wildcarded address "$ACTIVEMQ_ARTEMIS_FEDERATION.#".
This change also includes some further restrictions added to federation resources
and adds support for wildcarding '$' prefixed addresses.
2024-05-02 15:54:13 +01:00
Clebert Suconic 14e83faa1b ARTEMIS-4750 AMQP Large Message flow control to use runAfter
The resume delivery on AMQP Large Message Writer is using runNow.
When a flow control is paused and then resumed, the runNow will make the first read to happen inline to the thread that's resuming other deliveries.
It would be better to not run the delivery within the same call. Hence the change here is simple, being just using a connection.runLater instead of runNow.
I have seen this on a thread dump from a production server.
No semantic issues were encountered but there was a theory that the Netty thread responsible to resume would be busy with a delivery when not supposed to.
Better to be safe on this case.
2024-05-01 13:51:04 -04:00
Justin Bertram fc6f0ee9ec ARTEMIS-4740 reduce unnecessary boxing 2024-04-27 09:36:05 -05:00
Timothy Bish 659b17c3a9 ARTEMIS-4745 Allow configuration of the pull consumer batch size
Allow for configuration of the batch size granted to the remote when an
AMQP federation queue receiver is pulling messages only when there is
local capacity to handle them. Some code housekeeping is done here to
make adding future properties a bit simpler and require fewer changes.
2024-04-26 16:29:17 +01:00
Timothy Bish ee7a2c0944 ARTEMIS-4744 Fully support multple host broker connections URIs
Create a new NettyConnector for each connection attempt that is configured from
distinct broker connection URIs which allows for differing TLS configuration
per remote connection configuration.
2024-04-25 18:29:30 +01:00
Justin Bertram 61e52ae0fd ARTEMIS-4705 remove unnecessary field from STOMP HeartBeater 2024-04-23 20:02:00 -05:00
Clebert Suconic 44e78d42a2 ARTEMIS-4733 Internal queues should not be mirrored 2024-04-22 00:06:07 -04:00