2561 Commits

Author SHA1 Message Date
Clebert Suconic
764db34e9b ARTEMIS-3178 Page Limitting (max messages and max bytes)
I am adding three attributes to Address-settings:

* page-limit-bytes: Number of bytes. We will convert this metric into max number of pages internally by dividing max-bytes / page-size. It will allow a max based on an estimate.
* page-limit-messages: Number of messages
* page-full-message-policy: fail or drop

We will now allow paging, until these max values and then fail or drop messages.

Once these values are retracted, the address will remain full until a period where cleanup is kicked in by paging. So these values may have a certain delay on being applied, but they should always be cleared once cleanup happened.
2023-01-30 18:19:45 -05:00
Justin Bertram
bea8d21ecd ARTEMIS-4145 MQTT shared sub queue may be inadvertently removed
o.a.a.a.c.p.m.MQTTSubscriptionManager#removeSubscription() had a chunk
of code from 971f673c602f859f342e22afe988c71687f754b6 removed. That code
was added under the assumption that there should only ever be one
consumer per queue. That was true for MQTT 3.x, but it's not always true
for MQTT 5 due to shared subscriptions. However, the tests from that
commit all still pass even with it removed now (as well as all the other
MQTT tests) so I think it's safe.
2023-01-30 12:09:40 -05:00
Justin Bertram
49f8846861 ARTEMIS-4146 reauthenticated subjects are not cached 2023-01-30 12:02:08 -05:00
Timothy Bish
4785995f58 ARTEMIS-3357 Properly compare the subscription address on client re-attach
If the client is using address prefixes to define the routing type along with
durable subscriptions then on re-attach the compairon to check if the subscription
address has changed needs to remove the prefix when comparing against the address
since the prefix isn't propagated when creating the address and will always fail
resulting in the subscription queue being deleted in error.
2023-01-27 16:28:02 -05:00
Timothy Bish
6e10908c50 ARTEMIS-3153 Add tests for address prefixes for AMQP links
Adds some tests to validate that the destination prefixes if set and
are used properly by the client are honored over the default address
auto create routing type condiguration.
2023-01-26 12:56:39 -05:00
Domenico Francesco Bruscino
ac7b0e85fb ARTEMIS-4113 Fix NPE for backup brokers with connection routers
The nodeID on backup brokers is available only after they become live.
2023-01-26 09:55:31 -05:00
Timothy Bish
ca66028b2a ARTEMIS-4132 AMQP Receiver default to ANYCAST when creating an address
When an AMQP client subscribes to a new address (non-existing) with a receiver link, the
address is created with routing type ANYCAST regardles of the default address creation
configuration of the broker, and ignores even the broker wide default of MULTICAST.
2023-01-23 13:09:36 -05:00
Clebert Suconic
0d3cd8d880 ARTEMIS-4136 Mirrored sync replica
I am adding an option sync=true or false on mirror. if sync, any client blocking operation will wait a roundtrip to the mirror
acting like a sync replica.
2023-01-23 12:38:11 -05:00
Justin Bertram
b0ba8cae24 ARTEMIS-4137 MQTT sub-queue clean-up can fail due to auth 2023-01-23 16:18:03 +01:00
Justin Bertram
8a974fe89c ARTEMIS-4133 msg w/null prop value can't be consumed via STOMP 2023-01-17 12:18:49 -06:00
Ryan Highley
bb8761fcd2 ARTEMIS-3790 Support masked JMS credentials
Adds standard username and password value unmasking for JMS
ActiveMQConnectionFactory instances
2023-01-17 10:25:46 -06:00
Andy Taylor
b02002fc66 ARTEMIS-3875 - adding consumer and producer metrics
https://issues.apache.org/jira/browse/ARTEMIS-3875
2023-01-13 15:49:44 -05:00
Justin Bertram
c190d1c72f ARTEMIS-4127 refactor multiprotocol JMS tests in AMQP package
Over time org.apache.activemq.artemis.tests.integration.amqp has become
home to many multi-protocol JMS tests even though the package is really
for AMQP-specific tests. This commit splits those tests out into their
own package.

This is a preliminary step to clarify these tests before I add another
one for a different issue.
2023-01-12 16:19:48 -05:00
Clebert Suconic
abd62665ce ARTEMIS-4125 Fixing AutoCreateJmsDestinationTest::testAutoCreateOnSubscribeToTopic 2023-01-12 16:17:28 -05:00
Justin Bertram
e531c61c95 ARTEMIS-4126 address not auto-created when sending MQTT msg 2023-01-09 10:46:06 -06:00
Justin Bertram
114302a093 ARTEMIS-4125 address can be removed inadvertently
When the last non-durable subscriber on a JMS topic disconnects the
corresponding queue representing the subscription is deleted as
expected. However, the queue's address will also be deleted no matter
what, which is *not* expected.
2023-01-09 10:45:56 -06:00
Justin Bertram
56167b5e13 ARTEMIS-4122 support timed refresh for LegacyLDAPSecuritySettingPlugin
Some LDAP servers (e.g. OpenLDAP) do not support the "persistent search"
feature and therefore the existing "listener" feature does not actually
fetch updates. This commit implements a "pull" feature controlled by a
configurable interval equivalent to what is implemented in the cached
LDAP authorization module from ActiveMQ "Classic."
2023-01-07 22:54:35 -06:00
Justin Bertram
c354c8e642 ARTEMIS-4016 fixing tests 2023-01-07 22:54:26 -06:00
Justin Bertram
bf1d81e09e ARTEMIS-3707 fixing tests
A handful of tests started to fail after the original fix was committed.
This commit fixes those failures mainly by using a mock
`TransactionSynchronizationRegistry`.

I changed `o.a.a.a.r.ActiveMQRAManagedConnection#checkTransactionActive`
slightly because `getTransactionStatus` will never return `null` unlike
`getTransaction` would. The semantics should still be the same, though.
2023-01-07 22:54:17 -06:00
Robbie Gemmell
0dcb3aba2e ARTEMIS-4110: update a few more files introduced recently from older PRs being merged 2022-12-20 09:45:52 +00:00
AntonRoskvist
04ddeb647c ARTEMIS-4016 Bridges created by management operations are removed on restart and config reload 2022-12-17 10:10:10 -06:00
AntonRoskvist
6dd7965906
ARTEMIS-3834 include paged messages sending to DLA 2022-12-17 00:03:23 -06:00
Clebert Suconic
9816e1b999 ARTEMIS-3085 Fixing IOCriticalErrorListenerTest 2022-12-16 05:32:59 -05:00
Clebert Suconic
f5d9eed9ce ARTEMIS-3085 Fixing test and proper wiring listener 2022-12-16 05:27:18 -05:00
Somdatta
00592d6dd8
ARTEMIS-3085 support custom IOCriticalErrorListener 2022-12-15 16:35:20 -06:00
AntonRoskvist
5c2a0d744c
ARTEMIS-4091 - Make scaleDown target more deterministic 2022-12-15 16:05:26 -06:00
Justin Bertram
038e95adb9 ARTEMIS-4109 unable to auto-delete q for MQTT retained msg 2022-12-15 13:44:55 -06:00
Justin Bertram
cbd9f63a9d ARTEMIS-4115 ArrayIndexOutOfBoundsException when dup cache size is 0
Allow setting id-cache-size to 0 from broker.xml and ensure the broker
handles this gracefully. Previously you could only set the cache size to
0 via broker properties or programmatically and it would throw an
ArrayIndexOutOfBoundsException when adding an item to the cache.
2022-12-15 13:01:31 -06:00
Clebert Suconic
1de10671f8 ARTEMIS-3609 Do not use netty thread for thread completion listener 2022-12-15 10:35:43 -05:00
Clebert Suconic
af9bd7b84a ARTEMIS-4065 Optimize page counters to not use the journal as often
- From now on we will save snapshots of page-counters on the journal (basically for compatibility with previous verions).
  And we will recount the records on startup.

- While the rebuild is being done the value from the previous snapshot is still available with current updates.
2022-12-15 10:30:18 -05:00
Justin Bertram
ba2cbddd6b
ARTEMIS-3871 fix MQTT shared sub q naming semantics 2022-12-13 14:45:13 -06:00
Clebert Suconic
ef67ea0e26 NO-JIRA Fixing intermittent failure on JMSTransactionTest
We can't block the netty thread (which is used by the Listener) otherwise everything just blocks and nothing works on the client
2022-12-13 13:35:59 -05:00
Clebert Suconic
f6050b842e NO-JIRA fixing intermittent failure on ActiveMQServerControlTest 2022-12-13 12:17:26 -05:00
Justin Bertram
b5e25eb4fe ARTEMIS-3871 uniquely name MQTT share sub queues 2022-12-13 11:59:08 -05:00
Clebert Suconic
4af11a04d3 NO-JIRA fixing intermittent failure on ActiveMQServerControlTest 2022-12-13 11:35:19 -05:00
Justin Bertram
499e3c119f ARTEMIS-4101 caching failed authn result on LDAP cxn failures 2022-12-13 09:07:28 -05:00
Robbie Gemmell
f790911c44 ARTEMIS-4110: insert standard ASF licence header comment in various cases, such as to replace a javadoc header 2022-12-07 10:21:25 +00:00
Clebert Suconic
0866a2eb88 ARTEMIS-4096 Bridge transfer is broken with AMQP Large messages 2022-11-19 11:57:28 -05:00
Domenico Francesco Bruscino
3a13a7850c ARTEMIS-4077 Add an option to disable XML external entity processing 2022-11-15 10:06:03 -06:00
Clebert Suconic
4f79eb42f5 ARTEMIS-4089 Check on AutoCreation during routing 2022-11-14 15:25:42 -05:00
Šmucr Jan
43824fc494 ARTEMIS-4078 Fix divert reloading
Reloading has been fixed for divert:
* filter
* address
* exclusive

Source address and exclusivity changes require divert redeployment.
2022-11-11 12:00:00 -06:00
Justin Bertram
ca580814de ARTEMIS-4085 exclusive LVQ sending all messages to consumer 2022-11-10 13:58:53 -05:00
Clebert Suconic
f2e0f8713f ARTEMIS-4083 ClientLargeMessage Streaming not closing inputStream if compressed 2022-11-10 07:52:44 -05:00
Clebert Suconic
9528e45869 ARTEMIS-4083 ClientLargeMessage Streaming not closing inputStream if compressed 2022-11-10 06:27:10 -05:00
Justin Bertram
dce4ba3c1a [maven-release-plugin] prepare for next development iteration 2022-11-08 13:17:38 -06:00
Justin Bertram
1fd6cb6239 [maven-release-plugin] prepare release 2.27.0 2022-11-08 12:46:20 -06:00
Clebert Suconic
87ec9b5465 ARTEMIS-4045 Fixing in Handler ACKRunner on Mirror 2022-10-26 13:10:07 -04:00
Clebert Suconic
d185735e55 ARTEMIS-4073 Page Counters can go off sync when multiple producers are used in the same address 2022-10-25 21:26:14 -04:00
Clebert Suconic
cffc06aec8 NO-JIRA Fixing intermittent failure in PagingTest 2022-10-23 12:16:23 -04:00
Clebert Suconic
c199902cde NO-JIRA Fixing intermittent failure in PagingTest
receiveImmediate will issue a depage but it might not be available right away.
A retry needs to be done.
2022-10-23 12:11:53 -04:00