Commit Graph

3470 Commits

Author SHA1 Message Date
Clebert Suconic 6186805b69 ARTEMIS-5090 MirrorSNF is not supposed to expiry on messages 2024-10-09 17:30:26 +01:00
Robbie Gemmell c8a0e7c968 ARTEMIS-5087: update activemq deps to 5.18.6 2024-10-04 16:26:11 +01: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
Justin Bertram 022ec167cf ARTEMIS-5071 align naming for management option syntax
This commit aligns the naming for the management option syntax but also
retains support for the old naming.
2024-10-01 13:11:40 -07:00
Timothy Bish 65db6c60c9 ARTEMIS-5074 Fix encoding of bytes properties as Binary in AMQPMessage
When a bytes property is added to an AMQPMessage and it is then reencoded it
will fail without first wrapping the byte array in an AMQP binary as required
by the ApplicationProperties section specification defined type allowances.
2024-09-27 19:30:23 +01:00
Jean-Pascal Briquet 8fc6f09195 ARTEMIS-5063 messageMoved addition in ActiveMQServerMessagePlugin 2024-09-25 21:59:02 -04:00
Clebert Suconic 0c4c0542be ARTEMIS-5068 Temporary queue should not be mirrored 2024-09-25 21:58:13 -04:00
Clebert Suconic 9199b1f2dc ARTEMIS-5067 Preventing Race when one side is not connected in the mirror
There was already some verification at AMQPMirrorControllerSource::invalidTarget
however the verification failed on soak test ReplicatedBothNodesMirrorTest,
and an user I was working with also gave me evidence of this happening.

I'm improving the previous verification, which is actually a simplification that works on every case.
2024-09-25 21:57:45 -04:00
Clebert Suconic 30c5e63e0b ARTEMIS-5066 Disable Divert on Mirror Target 2024-09-25 21:57:45 -04: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
Timothy Bish e7ed4700e1 ARTEMIS-5054 Fix concurrent access issue of large message to Stomp Frame
When converting a large server message to an outgoing STOMP frame the converter
is allowing unsafe concurrent access to the large message internals which leads
to failures on message deliver as the state is out of sync amongst the dispatch
threads.
2024-09-25 14:12:33 +01: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
Gary Tully ebd97bb91a ARTEMIS-5051 disable jolokia detectors in console war 2024-09-20 12:23:31 +01: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 6d84f3741e ARTEMIS-5048 add test to demonstrate performance difference 2024-09-18 12:15:14 -07:00
Clebert Suconic 7860fd5fa9 ARTEMIS-5035 M_and_M_FactoryTest cannot use OpenWire as it's using JMS2 2024-09-18 11:33:05 -04:00
Justin Bertram b79db8ed66 ARTEMIS-4781 AMQP message leaking large message file
When an AMQP message is sent over a cluster bridge it is embedded into a
Core message. If the size of the AMQP message is barely beneath the
minLargeMessageSize then the Core message in which the AMQP message is
embedded will become a large message. The on the bridge target when the
embedded AMQP message is extracted from the large Core message it will
not be considered "large." In this situation the file for the large Core
message will leak.

Thanks to Erwin Dondorp for the test. I renamed and refactored it a bit,
but the fundamentals came from Erwin.
2024-09-17 14:42:37 +01:00
Justin Bertram dc64d9be78 ARTEMIS-5045 add test + polish 2024-09-16 10:17:03 +01:00
Justin Bertram 48e8de20e9 ARTEMIS-5015 bump org.jboss.marshalling:jboss-marshalling-river from 2.1.4.Final to 2.2.1.Final 2024-09-10 11:08:13 -05:00
Justin Bertram 46c7cb445c ARTEMIS-4182 support client ID config on bridges
Allow the client ID to be configured on normal bridge as well as
cluster-connection bridges. This makes the bridge connection easier to
identify on the target broker.
2024-09-10 16:46:20 +01:00
Robbie Gemmell 2365ebf0a7 ARTEMIS-5032: tweak test asserts following a failure in CI 2024-09-10 13:14:44 +01:00
Clebert Suconic e322a418ce ARTEMIS-5010 Adding Failback scenario to ReplicatedBothNodesMirrorTest 2024-09-09 15:50:48 -04:00
Timothy Bish 5b3b995d61 ARTEMIS-4978 Fix AMQP messages not matching selector on replay
When using the replay functionality the application of filters to
the replayed messages fails to match against AMQP messages due to the
message not getting scanned when some message values are accessed.
2024-09-09 14:34:14 +01:00
Timothy Bish acc415126f NO-JIRA Fix intermittent test failure 2024-09-06 11:15:57 -04:00
Clebert Suconic daba842984 ARTEMIS-5035 Change some tests to use a random choice for protocol 2024-09-05 17:04:48 -04:00
Timothy Bish ec8026e4d6 ARTEMIS-5032 Ensure AMQP message priority is honored after restart
Ensure that on server restart the original priority value assigned to an
AMQP message is used when dispatching durable messages from the store.
The AMQP Header section is scanned if present and the priority value
is recovered in an efficient manner.
2024-09-05 13:56:28 -04:00
Clebert Suconic 7fb9aa5f97 ARTEMIS-5010 Addressing deadlock on AckManager
AckManager.flush would hold a lock on ackManager, There was a possible deadlock with MirrorTarget:

Thread 1:

        at org.apache.activemq.artemis.protocol.amqp.connect.mirror.AckManager.addRetry(AckManager.java:393)
        - waiting to lock <0x00000007990a13e8> (a org.apache.activemq.artemis.protocol.amqp.connect.mirror.AckManager)
        at org.apache.activemq.artemis.protocol.amqp.connect.mirror.AckManager.ack(AckManager.java:418)
        at org.apache.activemq.artemis.protocol.amqp.connect.mirror.AMQPMirrorControllerTarget.performAck(AMQPMirrorControllerTarget.java:479)
        at org.apache.activemq.artemis.protocol.amqp.connect.mirror.AMQPMirrorControllerTarget.postAcknowledge(AMQPMirrorControllerTarget.java:461)
        at org.apache.activemq.artemis.protocol.amqp.connect.mirror.AMQPMirrorControllerTarget.actualDelivery(AMQPMirrorControllerTarget.java:318)
        at org.apache.activemq.artemis.protocol.amqp.proton.ProtonAbstractReceiver.onMessageComplete(ProtonAbstractReceiver.java:361)

Thread 2:

        at jdk.internal.misc.Unsafe.park(java.base@11.0.8/Native Method)
        - parking to wait for  <0x000000079de0af38> (a java.util.concurrent.CountDownLatch$Sync)
        at java.util.concurrent.locks.LockSupport.parkNanos(java.base@11.0.8/LockSupport.java:234)
        at java.util.concurrent.locks.AbstractQueuedSynchronizer.doAcquireSharedNanos(java.base@11.0.8/AbstractQueuedSynchronizer.java:1079)
        at java.util.concurrent.locks.AbstractQueuedSynchronizer.tryAcquireSharedNanos(java.base@11.0.8/AbstractQueuedSynchronizer.java:1369)
        at java.util.concurrent.CountDownLatch.await(java.base@11.0.8/CountDownLatch.java:278)
        at org.apache.activemq.artemis.protocol.amqp.connect.mirror.AMQPMirrorControllerTarget.flush(AMQPMirrorControllerTarget.java:230)
        at org.apache.activemq.artemis.protocol.amqp.connect.mirror.AckManager$$Lambda$601/0x00000008005c3040.accept(Unknown Source)
        at java.lang.Iterable.forEach(java.base@11.0.8/Iterable.java:75)
        at org.apache.activemq.artemis.protocol.amqp.connect.mirror.AckManager.flushMirrorTargets(AckManager.java:184)
        - locked <0x00000007990a13e8> (a org.apache.activemq.artemis.protocol.amqp.connect.mirror.AckManager)
        at org.apache.activemq.artemis.protocol.amqp.connect.mirror.AckManager.initRetry(AckManager.java:162)
2024-09-04 16:19:52 -04:00
Gary Tully 57adcd3286 NO-JIRA sanity test of mqtt shared sub publish with fqqn 2024-09-03 10:44:25 -05:00
Justin Bertram 4c0a47924c ARTEMIS-5025 bump org.jboss.marshalling:jboss-marshalling-river from 2.1.4.Final to 2.2.0.Final 2024-08-30 18:44:26 -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
Justin Bertram 465e985388 ARTEMIS-5018 eliminate deprecated use of Class.newInstance 2024-08-28 17:30:19 -04:00
Clebert Suconic 4352ebae5f ARTEMIS-5010 Addressing comments from PR https://github.com/apache/activemq-artemis/pull/5186 2024-08-28 14:08:49 -04:00
Clebert Suconic 4ba9f67d80 ARTEMIS-5010 AckManager records are not replicated 2024-08-28 11:53:16 -04:00
Justin Bertram 8a56d2ea33 ARTEMIS-4906 CentOS 7 is EOL so remove Docker file 2024-08-28 16:05:48 +01:00
Timothy Bish 18e6f1a88d ARTEMIS-5007 Ensure mirror connection recovers from manual closures
If a user for some reason force closes the local mirror connection SNF
consumer or the actual connection but hasn't stopped the broker connection
itself the connection should recover and rebuild. The fix ensures that if
local connections are closed first then local session resources get freed.
2024-08-27 16:20:18 +01:00
Clebert Suconic 38693370c9 Revert "ARTEMIS-5001 Option to relax sync on journal replication for Mirroring"
This reverts commit d41f01a5aa.
2024-08-26 12:49:42 -04:00
Timothy Bish b58191bd52 ARTEMIS-5004 Clean up federation address consumer bindings proactively
When an address consumer explicitly closes or is closed we should remove the
address binding for that consumer right away instead of waiting for possible
configured auto delete as the demand is gone and we don't need to binding to
stick around any longer.
2024-08-21 17:04:18 +01:00
Justin Bertram 18999a83bf ARTEMIS-5000 stop running most STOMP tests twice 2024-08-21 10:25:43 +01:00
Clebert Suconic ac666f3ab1 NO-JIRA Fixing typo on porOffset -> portOffset 2024-08-20 16:03:57 -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
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
Howard Gao c395db526c NO-JIRA Fix AnycastTest.testTxCommitReceive random failure 2024-08-20 11:15:47 +01:00
Robbie Gemmell 87cc15700f ARTEMIS-4996: update to junit 5.11.0
Move parameters out of base classes where needed to avoid clashes with
subclasses [re-]defining their own params. Needed due to change of
field + method annotation search handling to adopt Java hiding/shadowing
semantics, leading to ParameterizedTestExtension discovering both parent
and subclass parameter definition methods and throwing.
2024-08-19 11:51:39 +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
Howard Gao 1f79341c05 ARTEMIS-4973 pageSizeBytes/pageLimitBytes combination can cause Address full
Update docs/user-manual/paging.adoc

Co-authored-by: Robbie Gemmell <robbie@apache.org>
2024-08-16 09:41:53 -04:00
Clebert Suconic 583af58e43 ARTEMIS-4986 Tweaks on test: Disable load balancing and check for no messages 2024-08-15 20:47:56 -04:00