Commit Graph

2695 Commits

Author SHA1 Message Date
Justin Bertram a70c421493 ARTEMIS-4580 security settings for FQQN not enforced on send 2024-01-22 09:12:44 -06:00
Emmanuel Hugonnet 2269ad417e ARTEMIS-4436 Artemis is logging warnings during clean shutdown of server
in cluster.

When we know that a node leaves a clustercleanly we shouldn't log WARN
messages about it.

Signed-off-by: Emmanuel Hugonnet <ehugonne@redhat.com>
2024-01-22 10:11:14 -05:00
Timothy Bish 4ea55cd611 ARTEMIS-4568 Configuration reload for AMQP federation broker connections
Allows the configuration of AMQP Federation broker connections to be updated and
reloaded. This allows for update, add or remove of AMQP federation broker connections
as well as the basic AMQP sender and receiver broker connections. It checks for and
ignores changes in AMQP broker connections that are performing Mirroring as that
would lead to issues that can break mirroring.
2024-01-18 17:13:41 +00:00
Clebert Suconic bc7e4639e0 ARTEMIS-4558 Idempotent Mirrored ACKs
Mirror acks should be performed atomically with the storage of the source ACK. Both the send of the ack and the recording of the ack should be part of the same transaction (in case of transactional).

We are also adding support on transactions for an afterWired callback for the proper plug of OperationContext sync.
2024-01-15 19:13:49 -05:00
Clebert Suconic c6a6e036a4 ARTEMIS-4558 Transactional support for mirroring
- Async commit
 * async here meaning the recording of the commit record is not doing a sync on the storage.
   This is useful for internal operations where we don't need an immediate sync on the journal storage.

- Wired notification
 * I need finer control on a afterWired (to the storage) and before the completions, so I can plug the sync context on mirror right before the commit is called.
2024-01-15 19:13:49 -05:00
Clebert Suconic 5e7a9023d8 ARTEMIS-4560 Fixing defaults on Broker Connections for Broker Properties
ARTEMIS-4566 Allow management of Mirror SNF internal queue
2024-01-15 19:13:49 -05:00
Justin Bertram 99d43dab01 ARTEMIS-4548 refactor MQTT tests
Many MQTT tests are run twice - once using TCP and once using
WebSockets. This is essentially a big waste of time since once the
connection is established to the broker the tests are identical. The
tests should be refactored to run just once and then there can be a
small number of tests specifically for WebSockets.

This should knock several minutes off the test-suite.
2024-01-11 16:23:48 +00:00
Gary Tully 5269b1a89d ARTEMIS-4561 expose store type on web component tls binding config 2024-01-10 15:21:53 -06:00
Justin Bertram ebd634ae54
ARTEMIS-4452 make test more robust 2024-01-10 13:53:19 -06:00
Domenico Francesco Bruscino a7f18777a3 ARTEMIS-4563 Remove auto-created addresses upon restart 2024-01-10 18:31:14 +00:00
Andy Taylor 43166e24ea ARTEMIS-4557 expose producer window size in clusterconnection JMX
https://issues.apache.org/jira/browse/ARTEMIS-4557
2024-01-09 08:38:26 -06:00
Justin Bertram 85b2f4b126 ARTEMIS-3474 replace non-inclusive terms
This commit does the following:

 - Replaces non-inclusive terms (e.g. master, slave, etc.) in the
   source, docs, & configuration.
 - Supports previous configuration elements, but logs when old elements
   are used.
 - Provides migration documentation.
 - Updates XSD with new config elements and simplifies by combining some
    overlapping complexTypes.
 - Removes ambiguous "live" language that's used with regard to high
   availability.
 - Standardizes use of "primary," "backup," "active," & "passive" as
   nomenclature to describe both configuration & runtime state for high
   availability.
2024-01-08 13:32:31 -05:00
Domenico Francesco Bruscino 0b51bcfa52 ARTEMIS-4488 Merge settings with wildcards after literal matches 2024-01-04 14:33:04 +01:00
Emmanuel Hugonnet 7456e64f39 ARTEMIS-4452: Allow to customize http header in http-upgrade request from Artemis.
Using a prefix "netty.http.header." to be able to define http headers
used for http request from the netty connector.

Issue: https://issues.apache.org/jira/browse/ARTEMIS-4452

Signed-off-by: Emmanuel Hugonnet <ehugonne@redhat.com>
2024-01-03 20:55:00 -06:00
Domenico Francesco Bruscino b075cd6fc0 ARTEMIS-4537 Fix merge of multiple address setting matches
Merge multiple address setting matches on a new instance to be idempotent.
2024-01-03 11:02:03 -06:00
Justin Bertram b24f9b25f0 ARTEMIS-4516 support reloading connectors from XML 2023-12-21 11:44:56 -06:00
Justin Bertram 9baad30827 ARTEMIS-4522 simplify test & complete implementation 2023-12-21 11:44:11 -06:00
Todor Neykov ff2b76c252 ARTEMIS-4522 Dedicated thread pool for flow-control-executor 2023-12-21 11:44:11 -06:00
Justin Bertram d4d4b06fc7 ARTEMIS-4521 deleting divert using mngmnt API doesn't remove binding from journal 2023-12-21 11:43:36 -06:00
Justin Bertram 159416bc09 ARTEMIS-4530 clean up SessionCallback interface 2023-12-21 11:42:44 -06:00
Clebert Suconic a3126f9950 ARTEMIS-4536 Improving JournalTransactions 2023-12-19 09:54:40 -05:00
Gary Tully 7a2137f467 ARTEMIS-4528 tls, add support for PEM key store type 2023-12-15 15:52:48 +00:00
Clebert Suconic 5f5fa3af5a NO-JIRA Code Cleanup on JournalCrashTest 2023-12-13 11:48:24 -05:00
Justin Bertram b0545d9c45 ARTEMIS-4529 NPE with empty core message and STOMP consumer 2023-12-07 17:29:05 +00:00
Clebert Suconic 7c338e4ae5 NO-JIRA Adding log.info back into test 2023-12-06 10:58:26 -05:00
Justin Bertram 5f2403af19
NO-JIRA fix compilation issues in MQTT skeleton test 2023-12-05 14:34:09 -06:00
Justin Bertram afe0e889c5
NO-JIRA skeleton test for MQTT 2023-12-05 14:30:57 -06:00
Clebert Suconic ffaa057ce1 ARTEMIS-4526 Moving ShutdownOnCriticalIOErrorMoveNextTest into integration-tests-isolated
ShutdownOnCriticalIOErrorMoveNextTest was actually my "inspiration" to have created the isolated tests module in the first place, so it would be reasonable to move it there as well.
the issue comes down to the test simulating a server failure where the server would go down abruptly causing the VM to drop / exit. In this test the nature of failure is leaving a partial shutdown where server executors are still hanging around causing a cascade leak of server pools still running.
So it is completely expected to have these threads "leaking". Hence this test should be moved into the isolated-tests.
there is no semantic / server change as part of this task. It's just moving a test to a better place.
2023-12-05 10:14:24 -05:00
Clebert Suconic ed929fbd1b ARTEMIS-4523 Using JMS 1.1 for createSession
if using an older OpenWire client version, this could have issues.
so I'm just updating the test to use the equivalent method in 1.1 to avoid issues
2023-12-04 12:30:00 -05:00
Clebert Suconic 3ec0274356 ARTEMIS-4523 Openwire leaving consumers isolated after reconnects
co-authored with Gary Tully
2023-12-04 10:47:34 -05:00
Justin Bertram c858323f07 ARTEMIS-4520 JMSContext.acknowledge() doesn't work if last message received is null 2023-12-01 12:25:08 -05:00
Justin Bertram 3bdef0e8e1 ARTEMIS-4512 JMS q consumer can wrongly connect to multicast queue 2023-11-28 16:46:44 -05:00
Domenico Francesco Bruscino 6597f028a3 ARTEMIS-4515 Fix setting web request log using system properties 2023-11-28 16:45:55 -05:00
Gary Tully fed01276ba ARTEMIS-4517 - cancel message references in queue sequence order 2023-11-28 16:45:04 -05:00
Clebert Suconic e1f84ea45b ARTEMIS-3932 Fixing DuplciateRecordIdTest 2023-11-27 15:36:20 -05:00
Justin Bertram 7c711c04c3 ARTEMIS-4488 support 'literal' address setting match 2023-11-27 14:40:39 -05:00
Clebert Suconic 9a7a6f89cf ARTEMIS-3932 Deprecate and replace addAddressSettings with json version
As I worked through implementing a more generic JSON marshaller, I tried using reflection through BeanUtils and other ways
however the endresult was always worse as there were a few caveats that were not as easy to accomplish.

For that reason I went to a declarative appraoch where I define a meta-data object on AddressSettings and AddressSettingsInfo and
reuse the metadata in a few other places.
2023-11-27 12:36:21 -06:00
Justin Bertram 8e68bb1902 ARTEMIS-4501 clean up MQTT subscription queues when session expires 2023-11-27 12:33:35 -05:00
Justin Bertram 60200b44e2 ARTEMIS-4506 restore MQTT sub queue name syntax
Starting with 2.28.0, the broker doesn't translate the character `/` to
the configured wildcard delimiter (i.e. `.` by default) when creating
subscription queues for MQTT clients.

This commit fixes that regression and restores the proper translation.
2023-11-27 11:51:22 -05:00
Gary Tully 348763e14a ARTEMIS-4164: add acceptor sslAutoReload option to have the broker watch key and trust store paths for modifications and automatically call reload 2023-11-27 11:26:07 -05:00
Gary Tully 91fd12ad1f ARTEMIS-4480: rationalise openwire session tx usage and operation context usage, use completion callbacks to ensure exclusive consumers are isolated 2023-11-20 12:20:36 +00:00
Clebert Suconic 42d99dd8f0 ARTEMIS-4505 Small improvements on test 2023-11-16 13:18:10 -05:00
Timothy Bish 93a74dc00c ARTEMIS-4502 Support core messages crossing broker connection links
Allow for core messages to be tunneled over broker connection links used
for AMQP Federation and for broker mirroring. This eliminates the need to
convert from Core to AMQP and from loading core large messages fully into
memory for that conversion.
2023-11-16 17:55:08 +00:00
Clebert Suconic 766e81d26e ARTEMIS-4505 Cleanup page transactions on startup of the broker 2023-11-15 17:14:05 -05:00
Clebert Suconic 11f76bc133 ARTEMIS-4476 Validating process to remove orphaned consumers 2023-11-13 11:37:07 -05:00
Clebert Suconic 18692ec3c4 ARTEMIS-4476 Fixing Ghost consumer situation with AMQP 2023-11-09 15:09:35 -05:00
Robbie Gemmell 66dd52fcf2 ARTEMIS-4490: update to SLF4J 2.0.9 2023-11-03 17:55:48 +00:00
Robbie Gemmell bbe40c4b45 [maven-release-plugin] prepare for next development iteration 2023-10-27 11:14:45 +01:00
Robbie Gemmell f4bccc1a26 [maven-release-plugin] prepare release 2.31.2 2023-10-27 11:14:19 +01:00
Clebert Suconic 845648526f [maven-release-plugin] prepare for next development iteration 2023-10-25 14:45:43 -04:00
Clebert Suconic 5a1c9bf3d1 [maven-release-plugin] prepare release 2.31.1 2023-10-25 14:45:41 -04:00
Domenico Francesco Bruscino c27b7b65c7 ARTEMIS-4456 Register metrics plugin 2023-10-12 10:20:58 -05:00
Clebert Suconic 45f2789531 ARTEMIS-4453 Asynchronous flow control broken when more than 1000 destinations in the producer 2023-10-10 20:56:31 -04:00
Justin Bertram ab6f0a3032 ARTEMIS-4453 Lots of addresses breaks cluster bridge flow control 2023-10-10 20:56:31 -04:00
a181321 4db39520f2 ARTEMIS-4450 - Auto-deleted clustered destinations can cause message loss 2023-10-05 14:05:40 -04:00
Nicolas Filotto 8599917222 ARTEMIS-4141 Update credits even for expired messages
When big messages are produced if a consumer receives an expired message, the credits are not updated, so if the consumer is too slow and an expiry delay has been set, we can end up with a situation where there are no more credits which prevents the consumer from receiving any more messages.
2023-09-22 14:30:29 -04:00
Gary Tully ef1a17e548 ARTEMIS-4432 remove unused commit count from the test 2023-09-21 10:02:15 +01:00
Gary Tully 8f9a72d257 ARTEMIS-4432 respect actor and operation context for openwire connection failure processing 2023-09-20 15:25:50 +01:00
Nicolas Filotto 1d3fd65008 ARTEMIS-4270 Allow hierarchy of wildcard bindings
In case the bindings "news.#" and "news.europe.#" are registered, only the first one matches with the address "news.europe" while both are supposed to match. Those changes are meant to get rid of this limitation.
2023-09-18 12:10:13 -05:00
Clebert Suconic 0d2a94b006 [maven-release-plugin] prepare for next development iteration 2023-09-15 14:40:49 -04:00
Clebert Suconic 74f08ea059 [maven-release-plugin] prepare release 2.31.0 2023-09-15 14:40:45 -04:00
Timothy Bish e8d92b3bc5 ARTEMIS-4431 Re-encode the AMQP message annotations if hops are updates
When updating or adding the hops value the AMQP message needs a re-encode to
carry that value forward when the message is sent to the next broker.
2023-09-15 16:41:43 +01:00
Clebert Suconic 784aa9f884 [maven-release-plugin] prepare for next development iteration 2023-09-14 16:54:07 -04:00
Clebert Suconic 816b0828eb [maven-release-plugin] prepare release 2.31.0 2023-09-14 16:54:05 -04:00
Clebert Suconic 6c9ddfd460 [maven-release-plugin] prepare for next development iteration 2023-09-14 14:58:10 -04:00
Clebert Suconic 30e4df8ff8 [maven-release-plugin] prepare release 2.31.0 2023-09-14 14:58:07 -04:00
haanhvu 6ec2131e32 ARTEMIS-3057 Add min-disk-free feature
To check if the remaining disk is enough. Alternative to max-disk-usage.
2023-09-14 17:20:43 +01:00
Justin Bertram af2672e79a ARTEMIS-966 MQTT subscription state isn't durable
Durable subscrption state is part of the MQTT specification which has
not been supported until now. This functionality is implemented via an
internal last-value queue. When an MQTT client creates, updates, or
adds a subscription a message using the client-ID as the last-value is
sent to the internal queue. When the broker restarts this data is read
from the queue and populates the in-memory MQTT data-structures.
Therefore subscribers can reconnect and resume their session's
subscriptions without have to manually resubscribe.

MQTT state is now managed centrally per-broker rather than in the
MQTTProtocolManager since there is one instance of MQTTProtocolManager
for each acceptor allowing MQTT connections. Managing state per acceptor
would allow odd behavior with clients connecting to different acceptors
with the same client ID.

The subscriptions are serialized as raw bytes with a "version" byte for
potential future use, but I intentionally avoided adding complex
scaffolding to support multiple versions. We can add that complexity
later if necessary.

Some tests needed to be changed since instantiating an MQTT protocol
manager now creates an internal queue. A handful of tests assume that no
queues will exist other than the ones they create themselves. I updated
the main test super-class so that an MQTT protocol manager is not
automatically instantiated when configuring a broker for in-vm support.
2023-09-13 11:28:53 +01:00
Robbie Gemmell 819e1a9802 NO-JIRA: make various poms indents consistent 2023-09-12 17:03:58 +01:00
Clebert Suconic 6a8cd175dc ARTEMIS-4401 improving JDBC Performance with Paging by a significant factor 2023-09-12 08:34:09 -04:00
Timothy Bish d830f04de8 ARTEMIS-4419 Add federation support to AMQP broker connections
Allows federation of addresses and queues over an outbound AMQP broker
connection and provide configuration via XML or broker propeties.
2023-09-11 16:38:36 -04:00
Clebert Suconic ab6cfe2445 ARTEMIS-4424 Unecessary AMQ212025 (not connected) when no nodes are connected
The exception thrown by serverLocator.connect() should be all you need on such case
and the caller should then be responsible for taking appropriate action.
2023-09-11 11:19:26 -04:00
Clebert Suconic 263a44e262 ARTEMIS-4421 Page counters should work before page rebuild is done 2023-09-10 19:35:38 -04:00
Gary Tully 91debf25db ARTEMIS-4418 use consumer delivery sequence in messageId for openwire broker sequence id, makes delivery count calculation independent of message order 2023-09-07 15:24:35 +01:00
Clebert Suconic 47a3ee5304 ARTEMIS-4413 Improve reliability of CheckTest.testNodeCheckTopology
I have also made some other quick changes to make testing here easier.
2023-09-01 11:53:58 -04:00
Gary Tully b11945e0c7 ARTEMIS-4410 - process deliveries before removing consumer on session close, ensure strict order for a single consumer 2023-09-01 12:52:58 +01:00
Justin Bertram 60ac0f32a5
ARTEMIS-4396 fill in some gaps 2023-08-31 11:35:00 -05:00
Alexey Markevich 50a1824c02 ARTEMIS-4349: Replace Guava cache with Caffeine
Combination of changes from Alexey Markevich with updates from Robbie Gemmell. See PRs for detail.

This closes #4584.
This closes #4540.
2023-08-29 16:00:53 +01:00
Justin Bertram 56c8afe934 ARTEMIS-4405 wrong user logged for authz audits 2023-08-29 15:35:22 +01:00
Robbie Gemmell 6d4fad7a4c ARTEMIS-4391: fix break in findText from prior changes
Only report finding matching log message if all requested entries are present in it, not just the last one provided.

Also fix the updated AssertionLoggerHandler usage within AddressFullLoggingTest, ensure it is active across the full period expected messages can happen and doesnt miss early ones.
2023-08-25 14:42:55 +01:00
Gary Tully 84c16f1a0d ARTEMIS-4378 ignore address federation config if connection is configured as pull, consumerWindowSize=0 2023-08-25 11:15:07 +01:00
Alexey Markevich 67f9c9d92d ARTEMIS-4391 tests: rework AssertionLoggerHandler 2023-08-17 05:47:24 -04:00
Yashashree Chopada ab3e67a24b ARTEMIS-4389 The word "mesage" should be corrected to "message" 2023-08-16 09:05:55 -04:00
Clebert Suconic 019b682c70 ARTEMIS-4388 Topic Distribution tests 2023-08-14 13:17:46 -04:00
Šmucr Jan 2f2dacdd34 ARTEMIS-4387 Fix empty consumer filter string leak 2023-08-14 10:06:25 +02:00
Clebert Suconic 064018a3e9 ARTEMIS-4384 cluster verify CLI command
ARTEMIS-4385 Expand StatQueue to visualize --clustered
2023-08-11 19:12:44 -04:00
Mike Artz c5f0e3400c ARTEMIS-4159 Support duplicate cache size configuration per address
This commit introduces support for configuring a specific Duplicate ID cache size per address in the Artemis server. Previously, there was only a global setting for the ID cache size, but now each address can have its own cache size.

The changes include the addition of a new configuration property id-cache-size in the Artemis server configuration file. This property can now be specified under each address setting in the configuration file, and its value will determine the Duplicate ID cache size for that particular address. If the id-cache-size property is not specified for an address, it will use the global setting.

The test cases have been updated to cover this new functionality, and integration test have been added to verify that address-specific cache sizes work as expected.

Documentation has been added to address-settings.adoc, configuration-index.adoc and duplicate-detection.adoc
2023-08-04 10:25:08 -05:00
Clebert Suconic 93ee61e35c ARTEMIS-4372 Implement Pico-cli and script auto-complete
ARTEMIS-4375 Implement artemis shell using JLine3 integrated with auto-completion from picocli

This commit involves two JIRAs. One is adding PicoCLI and the next is Using JLine3 and implement a shell.
I have tried to keep these commits separate but these changes became interdependent hence the two JIRAs are squashed in this commit.
2023-07-31 10:40:27 -04:00
Justin Bertram 22e3b09b9c ARTEMIS-4370 update existing topic alias for MQTT 5 publisher 2023-07-24 12:55:05 -05:00
Justin Bertram 7048d9d4a5 [maven-release-plugin] prepare for next development iteration 2023-07-20 14:39:21 -05:00
Justin Bertram f05b63b8a1 [maven-release-plugin] prepare release 2.30.0 2023-07-20 14:36:44 -05:00
Clebert Suconic 6b61e9eaaf NO-JIRA Moving CLI Management to use ManagementHelper 2023-07-20 15:01:58 -04:00
Justin Bertram c8d685ee87 ARTEMIS-4365 MQTT retain flag not set correctly 2023-07-19 12:50:05 +01:00
Clebert Suconic 677d71b8e7 ARTEMIS-4366 Missing Mirrored ACKs with MULTICAST and subscriptions 2023-07-17 20:19:06 -04:00
Justin Bertram cce565e78f ARTEMIS-4353 clean up Maven dependencies
This commit contains the following changes:
 - eliminate used, undeclared dependencies
 - eliminate unused, declared dependencies
 - fix scope for test dependencies
 - eliminate org.hamcrest completely as its use involved deprecated code
   as well as dependencies from multiple versions
2023-07-14 14:03:41 +01:00
a181321 68e400b45c ARTEMIS-4184 Bidges with concurrency not cleared properly on config reload 2023-07-13 16:16:08 -04:00
Clebert Suconic b967e6d940 ARTEMIS-4362 Produce log.warn when the system cannot depage because of pending acks 2023-07-13 16:15:45 -04:00
Domenico Francesco Bruscino 451d03fd75 ARTEMIS-4332 Add management method to close stuck server sessions
In rare cases a store operation could silently fails or starves, blocking the
related server session and all delivering messages. Those server sessions can
be closed adding a management method that cleans their operation context
before closing them.
2023-07-13 10:32:14 -04:00
Clebert Suconic 6ee27224a5 ARTEMIS-4352 Avod Deadlock in case the SecurityManager is reusing the Netty executor.
If the Security Manager is using Netty, and in particular the same Netty connection,
you could run into a deadlock / starvation.

This is particularly true in the Wildfly case where they reuse the same connection for everything via XNIO.
2023-07-10 11:00:19 -04:00
Robbie Gemmell 5b86f8d59e ARTEMIS-4346: move stomp test client to artemis-test-support systest helper module 2023-07-05 09:52:48 -05:00
Robbie Gemmell cb9e1fedc8 ARTEMIS-4345: update to Error Prone 2.20.0 and fix up new errors 2023-07-05 09:40:24 +01:00
Justin Bertram b316272e14 ARTEMIS-4311 fix typo 2023-06-20 17:50:19 +01:00
Gary Tully a8b4ee1992 ARTEMIS-4314 support queue federation batchOnCapacity via consumerWindowSize=0 2023-06-16 15:44:51 +01:00
Clebert Suconic ae554b43db [maven-release-plugin] prepare for next development iteration 2023-06-14 18:20:58 -04:00
Clebert Suconic 2be5c54cd0 [maven-release-plugin] prepare release 2.29.0 2023-06-14 18:20:45 -04:00
a181321 0f4982913f ARTEMIS-4185 Resending compressed message uncompressed throws exception in consumer 2023-06-14 17:08:40 -04:00
Clebert Suconic ef3a91bdfb ARTEMIS-4313 Retry Bridge when destination full and configured to FAIL 2023-06-14 14:06:35 -07:00
Justin Bertram 3ff8419a4b ARTEMIS-4312 dupes w/redistribution and multicast
Multiple multicast queues on the same address can lead to duplicate
messages during redistribution in a cluster.
2023-06-14 11:19:56 -04:00
a181321 582a689cdb ARTEMIS-4186 Ability to set compressionLevel for compressLargeMessages 2023-06-14 04:42:38 -07:00
Domenico Francesco Bruscino bd3c057559 ARTEMIS-4251 Support CORE client failover to other live servers
Improve the CORE client failover connecting to other live servers when all
reconnect attempts fails, i.e. in a cluster composed of 2 live servers,
when the server to which the CORE client is connected goes down the CORE
client should reconnect its sessions to the other liver broker.
2023-06-13 08:24:02 -07:00
Peter Brady 2f5463c960 ARTEMIS-4309 Read all bytes of compressed objmsg
Continually read from the compressed byte[] into
the decompressed object

Add test to validate large (>1024 bytes) compressed data can be
deserialized properly
2023-06-13 05:50:37 -07:00
Justin Bertram c96a074b53 ARTEMIS-4292 support more Micrometer system metrics
This commit exposes Micrometer's system metrics for:
 - file descriptors
 - processor
 - uptime
2023-06-13 04:58:59 -07:00
Clebert Suconic cea9ff6667 ARTEMIS-4259 JMS consumer + FQQN + selector not working
co-authored with Justin Bertram
2023-06-07 15:15:21 -07:00
Clebert Suconic f03b775ac5 NO-JIRA fixing intermittent test failure 2023-06-07 18:10:42 -04:00
Justin Bertram e7de2c7001 ARTEMIS-4297 allow regex in no-cache exception config 2023-05-31 11:37:28 -07:00
Roelof Naude 40425d422a ARTEMIS-4291 Add the "broker" tag in a consistent manner to all exported metrics.
Some scrapers, e.g. prometheus, add an "instance" tag. This value may not be the same as
the broker name, which results in these metrics becoming more difficult to match up with
the corresponding broker.
2023-05-31 12:45:32 -05:00
Justin Bertram 15aafe0b70 ARTEMIS-4293 add mngmnt ops to clear authn/z caches 2023-05-26 16:47:33 +02:00
Clebert Suconic ff4c697e25 NO-JIRA ignoring invalid test 2023-05-25 20:04:50 -04:00
Justin Bertram b97d711733 ARTEMIS-4286 sometimes federated consumer won't stop 2023-05-24 18:22:33 +01:00
Clebert Suconic c7f28ad70b ARTEMIS-4290 Isolating more threads, removing disableThreadChecks 2023-05-24 11:16:49 -04:00
Clebert Suconic 0c8adee37a ARTEMIS-4290 Separating some integration tests into legacy-integration-tests
legacy-integration-tests is being created to hold LDAP Tests (or any other tests that won't play well with keeping threads clean)
it will have fork-mode=always on the maven-surefire-plugin
2023-05-23 13:52:03 -07:00
Clebert Suconic e719622de5 ARTEMIS-4285 Limit number of redelivery records 2023-05-19 13:59:28 -07:00
Justin Bertram a57c48ec55 ARTEMIS-4275 add ID to consumer notifications 2023-05-19 16:27:36 -04:00
Justin Bertram 3a48258f7d ARTEMIS-2824 clientID not set on some notifications 2023-05-19 16:03:16 -04:00
Domenico Francesco Bruscino c47d15c12a ARTEMIS-4283 Fail fast CORE client connect on closing
ServerLocatorImpl waits for topology after connecting a new session factory.
It should interrupt waiting for topology when it is closed to fail fast.
2023-05-19 08:30:58 -07:00
Gary Tully b664022a1e ARTEMIS-4284 - sync operwire remove consumer with the operation context to ensure prefetched messages are available to the next consumer in order
This closes #4483
2023-05-18 09:33:05 -04:00
Clebert Suconic 03afbedfe3 ARTEMIS-4282 Large Header may break the broker 2023-05-17 16:04:54 -07:00
Clebert Suconic ec54576323 ARTEMIS-4281 Queue Reaper should not remove non empty queues on initial check 2023-05-17 15:58:54 -07:00
Clebert Suconic f082b9c5d1 ARTEMIS-4199 Adding test for open transaction on reset call 2023-05-15 07:08:05 -07:00
Clebert Suconic bea39f6692 ARTEMIS-4278 Incorrect Paging Counters with Prepared Transactions 2023-05-11 13:50:00 -07:00
Justin Bertram c9c819aa88 ARTEMIS-4274 push masked credential support into core client 2023-05-10 13:55:39 -07:00
Justin Bertram 5f476896e9 ARTEMIS-4258 make tests faster & more robust 2023-05-09 09:57:32 -07:00
Justin Bertram 6ba54964bd ARTEMIS-4258 delayBeforeDispatch not working with OpenWire 2023-05-08 15:11:52 -05:00
Justin Bertram c2bada6a77 ARTEMIS-4267 original exception lost for NoCacheLoginException
When skipping the authentication cache details for the original
exception are not logged.

This commit ensures these details are logged and adopts the
ExceptionUtils class from Apache Commons Lang in lieu of the previous
custom implementation.
2023-05-08 17:01:35 +02:00
Justin Bertram 6254c140e3 ARTEMIS-4212 handful of updates
- fix syntax used for 'addresses' CLI option
 - update release notes
 - enforce new semantics on parsing & add test
2023-05-04 12:25:15 -07:00
Domenico Francesco Bruscino fb1fa6a95f ARTEMIS-4244 Fix testSetWebBindingProperties 2023-05-03 13:27:14 +02:00
Domenico Francesco Bruscino d2a4837b69 ARTEMIS-4245 Expose web SNI settings 2023-05-02 17:18:10 +01:00
Clebert Suconic 0c80a6435f ARTEMIS-4253 Disabling invalid management test over core protocol 2023-05-01 11:28:00 -04:00
Justin Bertram acd6605ebf ARTEMIS-4212 fix tests 2023-04-28 06:54:16 -07:00
Justin Bertram 1fa5c761c6 ARTEMIS-4212 fix management address issues 2023-04-28 06:54:16 -07:00
Domenico Francesco Bruscino cc9db6b2f7 ARTEMIS-4244 Set web config using system properties 2023-04-26 17:07:32 -05:00
Justin Bertram 74fa4ca758 ARTEMIS-4212 fix sending msgs to address w/mismatching routing types
When sending, for example, to a predefined anycast address and queue
from a multicast (JMS topic) producer, the routed count on the address
is incremented, but the message count on the matching queue is not. No
indication is given at the client end that the messages failed to get
routed - the messages are just silently dropped.

Fixing this problem requires a slight semantic change. The broker is now
more strict in what it allows specifically with regards to
auto-creation. If, for example, a JMS application attempts to send a
message to a topic and the corresponding multicast address doesn't exist
already or the broker cannot automatically create it or update it then
sending the message will fail.

Also, part of this commit moves a chunk of auto-create logic into
ServerSession and adds an enum for auto-create results. Aside from
helping fix this specific issue this can serve as a foundation for
de-duplicating the auto-create logic spread across many of the protocol
implementations.
2023-04-25 16:08:31 -05:00
Clebert Suconic 2ffd94e682 ARTEMIS-4253 disabling a few ActiveMQServerControlUsingCoreTest tests
Some of these tests don't make sense when using the Core protocol due to noise introduced
2023-04-25 08:11:10 -07:00
Clebert Suconic fea84e39f5 ARTEMIS-4247 BrokerClustering vs Mirror code improvements 2023-04-25 08:10:58 -07:00
Clebert Suconic 0eefc38d93 ARTEMIS-4250 Spawning VM to avoid thread leaking on ShutdownOnCriticalIOErrorMoveNextTest 2023-04-24 08:06:00 -07:00
Domenico Francesco Bruscino ef4501292e ARTEMIS-4252 Fix flaky QuorumFailOverTest tests 2023-04-24 06:11:51 -07:00
Justin Bertram fde9d223ae ARTEMIS-4249 failure to create internal MQTT consumer can orphan sub q 2023-04-21 12:32:21 -05:00
Clebert Suconic 9bac93e25e ARTEMIS-4248 Fixing PagingTest::testSimpleResume
testSimpleResume is intermittently failing.
This test is forcing another page, while cleanup is happening on the background.
ForceAnotherPage may not put the address back into paging if this happened right after the cleanup call.
To fix the test, we should call startPaging after forceAnotherPage is called.
2023-04-21 11:35:45 -04:00
Clebert Suconic 2a81a0a3c6 ARTEMIS-4247 Inconsistencies between Broker Clustering and AMQP Mirror
- activemq.notifications are being transferred to the target node, unless an ignore is setup
- topics are being duplicated after redistribution
- topics sends are being duplicated when a 2 node cluster mirrors to another 2 node cluster, and both nodes are mirrored.
2023-04-21 10:30:32 -05:00
Domenico Francesco Bruscino 4e77a34c29 ARTEMIS-4243 Fix export of bindings without routing types 2023-04-20 10:01:36 +02:00
Justin Bertram 673481369f ARTEMIS-4241 paging + FQQN is broken 2023-04-17 21:51:08 +02:00
Clebert Suconic 4eb978b931 ARTEMIS-4233 Disabling RefCounting debug and error after paged messages 2023-04-12 16:40:26 -07:00
Justin Bertram 8abdee29e9 ARTEMIS-4235 fix map msg conversion from OpenWire->core 2023-04-10 10:28:07 +01:00
Justin Bertram 6851e7d677 ARTEMIS-4204 connectors added via management are not durable 2023-04-06 11:22:18 -05:00
Clebert Suconic 6d3dbc4383 ARTEMIS-4233 Large Message Issues After Failed Clients
- interrupted message breaking reference counting
After the server writing to the client is interrupted in AMQP, the reference counting was broken what would require the server restarted
in order to cleanup the files of any interrupted sends.

- Removed consumer during large message delivery damaging large messages
If the consumer failed to deliver messages for any reason, the message on the queue would be duplicated. what would wipe out the body of the message
and other journal errors would happen because of this.

extra debug capabilities added into RefCountMessage as part of ARTEMIS-4206 in order to identify these issues
2023-04-06 07:40:01 -07:00
Justin Bertram 448a6dee02 ARTEMIS-4209 avoid double 'ID:' for 'User ID' when browsing AMQP msgs 2023-03-28 16:21:13 -05:00
Clebert Suconic 41b2ec7efb NO-JIRA Limitting load on PotentialOOMELoggingTest
This test was generating too much data just to log an error message.
The same error message would happen with just 100 queues.
2023-03-28 09:27:19 -04:00
Clebert Suconic 6de9e30c46 NO-JIRA Limiting load on NIOJournalCompactTest
This test is boundless adding data into the journal when there are no syncs.
That's creating 600MIB worth of data on our CIs, and this tests was not meant to be acting like a soak test.
I'm limitting the load the test can generate with a TokenBucketLimiterImpl now.
2023-03-28 09:27:00 -04:00
Clebert Suconic 880fe86ddc NO-JIRA Moving MQTT5Test::testMaxMessageSize into a soak-test
MQTT5Test::testMaxMessageSize is spiking the memory on the integration testsuite all the way up to 1.5G
what makes this test more like a soak test.

The test is now converted to use a real server like other Soak Tests.
2023-03-27 17:47:50 -07:00
Clebert Suconic 40e9d4ebf7 NO-JIRA Trying to fix intermittent failure on ShutdownOnCriticalIOErrorMoveNextTest 2023-03-27 15:17:48 -04:00
Clebert Suconic 15d39a14ea ARTEMIS-4207 Improved fix on LargeMessage Redistribution
This fix will delay the message.copy to the redistributor itself.
Meaning no copy would be performed if the redistribution itself failed.

No need to remove a copy any longer
2023-03-27 10:45:07 -07:00
Clebert Suconic d730d1a684 NO-JIRA Testsuite speedup: proper JDBC drop from derby 2023-03-18 15:44:03 -07:00
Domenico Francesco Bruscino aaa8627795 ARTEMIS-4211 Fix record message id for federated queue consumers
The federated queue consumer has to generate a new id for the messages
received from the upstream broker because they have an id generated by
the store manager of the upstream broker.

Co-authored-by: Clebert Suconic <clebertsuconic@apache.org>
2023-03-18 08:52:21 -07:00
Clebert Suconic 4babdab18c NO-JIRA Cleanup MBeanServer usage in the testsuite as it is leaking
Basically I started the testsuite and attached check leak with "java -jar check-leak.jar --pid <pid> --report testsuite-report --sleep 1000" and saw the allocations of this were pretty high.
2023-03-15 12:42:12 -07:00
Clebert Suconic 2c037386b6 ARTEMIS-4206 Unreferenced AMQP Large Messages not removed right away, requiring a reboot 2023-03-15 05:57:51 -07:00
Justin Bertram 68c5bed159 ARTEMIS-4200 configurable link-stealing for MQTT 2023-03-10 17:51:24 -06:00
Justin Bertram 9b4204b345 ARTEMIS-4201 send proper MQTT disconnect code on stolen link 2023-03-10 17:51:24 -06:00
Clebert Suconic 257dd86ae2 ARTEMIS-4193 Large Message Files orphaned after server killed
This fix is scanning journal and paging for existing large messages. We will remove any large messages that do not have a corresponding record in journals or paging.
2023-03-09 08:35:51 -08:00
Domenico Francesco Bruscino 7a0bf52ed8 ARTEMIS-4190 Fix config-delete-queues when address changes 2023-03-09 09:42:57 -06:00
Domenico Francesco Bruscino bb08a573eb ARTEMIS-3640 Use client connectors for HA 2023-03-09 11:20:51 +00:00
Gary Tully 00cae02ca4 ARTEMIS-4196 - set message routing type in mqtt publish 2023-03-08 14:30:30 -06:00
Clebert Suconic ed5322c54f NO-JIRA Fixing intermittent failure on ActiveMQServerControlUsingCoreTest
This failure was because of a noise from the test itself. as the test is creating a producer, and it's measuring for a producer from the test.
it makes no sense to fix it for OverCore.. we just ignore it on UsingCore
2023-03-08 12:13:17 -05:00
Justin Bertram 97c78525da ARTEMIS-4181 make try-with-resources style consistent 2023-03-03 08:40:51 -06:00
Justin Bertram b76c672305 ARTEMIS-4162 support deleting addresses & queues w/o usage check
There are certain use-cases where addresses will be auto-created and
never have a direct binding created on them. Because of this they will
never be auto-deleted. If a large number of these addresses build up
they will consume a problematic amount of heap space.

One specific example of this use-case is an MQTT subscriber with a
wild-card subscription and a large number of MQTT producers sending one
or two messages a large number of different MQTT topics covered by the
wild-card. Since no bindings are ever created on any of these individual
addresses (e.g. from a subscription queue) they will never be
auto-deleted, but they will eventually consume a large amount of heap.
The only way to deal with these addresses is to manually delete them.

There are also situations  where queues may be created and never have
any messages sent to them or never have a consumer connect. These
queues will never be auto-deleted so they must be deleted manually.

This commit adds the ability to configure the broker to skip the usage
check so that these kinds of addresses and queues can be deleted
automatically.
2023-03-02 19:17:03 -06:00
Justin Bertram 6874556f7c ARTEMIS-4188 auto-create + MDB using selector on queue 2023-03-02 16:26:12 -08:00
Justin Bertram fb169bc4af ARTEMIS-4172 sending large msg via core skips plugins & audit log 2023-02-16 13:34:29 -08:00
Justin Bertram 82fc42987a ARTEMIS-4171 potential large message file leak 2023-02-16 13:34:29 -08:00
Clebert Suconic a2ba6ed298 ARTEMIS-4161 AMQP and OpenWire leaking leaking objects in certain conditions
The issue identified with AMQP was under Transaction usage, and while opening and closing sessions.
It seems the leak would be released once the connection is closed.

We added a new testsuite under ./tests/leak-tests To fix and validate these issues
2023-02-16 12:10:54 -08:00
Clebert Suconic 69e21a0eb7 ARTEMIS-4163 Fixing openwire race while chunkSend is happening 2023-02-09 19:58:40 -05:00
Clebert Suconic 1caa406bbf NO-JIRA Adding a test to verify TX in OpenWire Large Message Handling 2023-02-08 09:29:11 -05:00
Justin Bertram 8f30347b18 ARTEMIS-4143 improve mitigation against split-brain with shared-storage
Configurations employing shared-storage with NFS are susceptible to
split-brain in certain scenarios. For example:

  1) Primary loses network connection to NFS.
  2) Backup activates.
  3) Primary reconnects to NFS.
  4) Split-brain.

In reality this situation is pretty unlikely due to the timing involved,
but the possibility still exists. Currently the file lock held by the
primary broker on the NFS share is essentially worthless in this
situation. This commit adds logic by which the timestamp of the lock
file is updated during activation and then routinely checked during
runtime to ensure consistency. This effectively mitigates split-brain in
this situation (and likely others). Here's how it works now.

  1) Primary loses network connection to NFS.
  2) Backup activates.
  3) Primary reconnects to NFS.
  4) Primary detects that the lock file's timestamp has been updated and
     shuts itself down.

When the primary shuts down in step #4 the Topology on the backup can be
damaged. Protections were added for this via ARTEMIS-2868 but only for
the replicated use-case. This commit applies the protection for
removeMember() so that the Topology remains intact.

There are no tests for these changes as I cannot determine how to
properly simulate this use-case. However, there have never been robust,
automated tests for these kinds of NFS use-cases so this is not a
departure from the norm.
2023-02-03 10:40:08 -05:00
Timothy Bish d1b3610f68 ARTEMIS-2431 Stop processing Begin and Attach frames if open fails
For pipelined open cases the events processing should ignore additional begin
and attach events if the open event handler closes the connection to avoid the
processing throwing additional exceptions and replacing the error condition in
the connection with an unrelated error about NPE from the additional events.
2023-02-01 17:53:32 -05:00
Clebert Suconic 2378d187af [maven-release-plugin] prepare for next development iteration 2023-01-31 07:22:48 -05:00
Clebert Suconic 893e1e7916 [maven-release-plugin] prepare release 2.28.0 2023-01-31 07:22:47 -05:00
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 971f673c60 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