Commit Graph

10698 Commits

Author SHA1 Message Date
Clebert Suconic 178f2e4b4d ARTEMIS-4812 Avoid IntObject accumulation after Page is set as complete
this could lead to OME if a lazy consumer is there for a long time with all pages being removed.
2024-06-11 12:03:08 -04:00
Justin Bertram 220a5ae2aa ARTEMIS-4796 add tests & remove refs 2024-06-10 14:03:00 -07: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
Gary Tully efdcc56519 NO-JIRA add transformer to bridge properties config test 2024-06-10 12:34:39 +01: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
Justin Bertram 4fde81813c
NO-JIRA fix Jolokia doc link 2024-06-06 22:35:23 -05: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
Clebert Suconic 047bc98cc3 NO-JIRA Reuse getMessageCount across RealServerTestBase 2024-06-05 17:33:02 -04:00
Justin Bertram c378ef9da7
NO-JIRA fix flow-control doc formatting 2024-06-05 10:18:36 -05: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 f5ecc5e219 ARTEMIS-4790: un-nest test classes to simplify 2024-06-04 12:55:00 +01:00
Clebert Suconic aade3b35f6 NO-JIRA Fixing intermittent test failures 2024-06-03 14:44:57 -04:00
Clebert Suconic 180e434b78 NO-JIRA Improving Test Reliability with max-read-page-bytes 2024-06-03 13:19:05 -04:00
Robbie Gemmell 8935b1150b ARTEMIS-4791: update to junit-5.10.2 2024-06-03 17:49:03 +01:00
Robbie Gemmell 362dbd11ac ARTEMIS-4790: use JUnit 5 for the tests 2024-06-03 10:06:37 -05:00
Clebert Suconic b9bb494b58 NO-JIRA Simplifying Test
No need to test functionality of the mirror. the intention was if the messages would arrive correctly.

Other tests are verfying functionality.
2024-06-01 14:16:40 -04:00
Clebert Suconic ae92b714e3 NO-JIRA Test improvements 2024-05-31 21:59:28 -04:00
Clebert Suconic add773e0fd NO-JIRA more information on test in case of failures 2024-05-31 16:42:25 -04:00
Timothy Bish 0650713b3e NO-JIRA Fix test failed due to missing expectation
Test should add an optional expect close as it is very occasionally able
to hit the wire and the test peer will fail if not expecting it might be.
2024-05-31 13:27:20 -07:00
Clebert Suconic fa1c5c7173 ARTEMIS-4789 Page.destroy race with cleanup
this is fixing PagingTest::testPagingStoreDestroyed(db=derby) (or any other DB).

This could eventually also fail on journal.

The cleanup could act on a destroyed folder, and issue an IOException stopping the server with this race.

You would need the server active cleaning messages while the queue is being removed.
2024-05-31 16:04:58 -04:00
Clebert Suconic b05d45cb73 NO-JIRA Removing TODO block
When we reload the page-stores I need to mark the page counter started.
2024-05-30 21:11:03 -04: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 f8dce75ac8 NO-JIRA Fixing imports after removing 2.28 2024-05-30 16:55:55 -04:00
Clebert Suconic f954212765 NO-JIRA removing 2.28 out of MirrorCompatibilityTest
2.28 had a race in its start, where you could eventually lose messages.
This was later fixed, but there's no point on testing the functionality with 2.28 as it will be always broken.
2024-05-30 16:53:36 -04:00
Clebert Suconic 6b5981d2cd NO-JIRA Adding note on prefetch 2024-05-30 11:39:20 -04:00
Clebert Suconic 77c9b06862 NO-JIRA Adding some doc on the queue prefetch logic
I'm just adding some context to the code here. I have had to explain these variables a few times to different people,
I guess it's time to make that little explanation as part of the code now.
2024-05-30 11:07:43 -04:00
Clebert Suconic 4c6cded2e7 NO-JIRA Fixing intermittent test failure on PagingTest 2024-05-30 09:58:01 -04:00
Clebert Suconic 032597dba3 ARTEMIS-4786 Avoid ConcurrentModificationException while queue.destroy in page
We observed this assert error in the netty collection used for acks:

java.lang.AssertionError: null is not a legitimate internal value. Concurrent Modification?
at io.netty.util.collection.IntObjectHashMap.toExternal(IntObjectHashMap.java:103) ~[netty-common-4.1.109.Final.jar:4.1.109.Final]
at io.netty.util.collection.IntObjectHashMap.access$900(IntObjectHashMap.java:37) ~[netty-common-4.1.109.Final.jar:4.1.109.Final]
at io.netty.util.collection.IntObjectHashMap$PrimitiveIterator.value(IntObjectHashMap.java:650) ~[netty-common-4.1.109.Final.jar:4.1.109.Final]
at io.netty.util.collection.IntObjectHashMap$2$1.next(IntObjectHashMap.java:234) ~[netty-common-4.1.109.Final.jar:4.1.109.Final]

this will avoid the cleanup and rely on GC for the cleanup.

PagingLeakTest is being added to make sure the cleanup is actually not needed.
2024-05-30 09:31:32 -04:00
iliya 6b5f78bfc4 ARTEMIS-4165 Delete messages in case of queue destroy
Messages should be acked even while paging. That will allow page transactions or anything else
to be cleared accordingly.
2024-05-30 09:31:32 -04:00
Clebert Suconic 7fbd1b1a51 NO-JIRA Fixing intermittent failure on LargeMessageTest::testSendServerMessageMetrics
When the Database option is used, the packets on the ServerMessage may still be in transit.
We should sync the file on the Database before we can actually send it, otherwise we would get an assertion error on the send method.
2024-05-29 18:49:46 -04:00
Clebert Suconic 5cf206629c NO-JIRA: Fixing up typo. 2024-05-29 13:47:24 -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
Clebert Suconic a600191dbf RELEASE update on doc 2024-05-29 11:25:08 -04:00
Justin Bertram 4cd4ecb198
ARTEMIS-4306 fix tests 2024-05-28 21:17:50 -05:00
Clebert Suconic 7544667907 NO-JIRA Removing non used field on PostOfficeImpl 2024-05-28 21:09:26 -04:00
Clebert Suconic fa06b70134 ARTEMIS-4784 Large Messages should removed from HashMap on ReplicatioEndpoint after being closed 2024-05-28 21:04:33 -04:00
Clebert Suconic 0ca36b7b38 NO-JIRA fixing intermittent test failure on MaxMessagePagingTest 2024-05-28 20:57:53 -04: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
Clebert Suconic 58fc7cbea1 NO-JIRA fix intermittent failure on LargeMessageRetentionTest 2024-05-28 17:25:52 -04:00
Timothy Bish aab1c484b2 NO-JIRA Fix a few cases of federation test fails on unexpected frames
Add a couple optional flags for performatives that might arrive based on the
timing of connection close or remote detach etc.
2024-05-28 11:52:24 -07:00
Justin Bertram 7d6ab48763
This closes #4938 2024-05-28 11:09:55 -05:00
Michal T b61776e744
ARTEMIS-4783 touch up federation docs 2024-05-28 11:09:55 -05:00
Timothy Bish f4d9cfdca8 NO-JIRA Fix random test failures if flow is omitted
If the remote detach arrives fast enough it can suppress the flow from
being sent by the broker so the test should mark that as an optional frame.
2024-05-28 16:32:23 +01:00
Justin Bertram c47713454c ARTEMIS-4726 fix original commit
The original commit (1ee3e884b7) for this
issue wasn't completely correct. This commit fixes those issues so that
both the messageCount and scheduledMessageCount are accurate now when
a scheduled message is removed by its ID.
2024-05-23 12:56:45 -05: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