Commit Graph

2413 Commits

Author SHA1 Message Date
Clebert Suconic d864780293 ARTEMIS-4684 Internal queues should not redistribute 2024-03-13 17:01:08 -04:00
Clebert Suconic 11b7671960 ARTEMIS-4684 Internal Queues should not redistribute
This is particularly true for the Mirrored SNF queue. Redistribution is not meant for internal queues. If an internal queue happens to have the same name on another server, it should not trigger redistribution when consumers are removed.

It would be possible to work around this by adding an address-setting specific to the address with redistribution disabled.

ClusteredMirrorSoakTest was intermittently failing because of this. For a few seconds while the mirror connection is still being made connections could move messages from one node towards another node if both have the same name.
2024-03-13 09:26:47 -04:00
Clebert Suconic 21368cf741 ARTEMIS-4678 JDBC User and password not used by CLI 2024-03-08 18:23:48 -05:00
Clebert Suconic fd1ef367d3 ARTEMIS-4670 Slow processing with Large Messages and JDBC 2024-03-07 13:09:58 -05:00
Jan Šmucr 3c580c9351 ARTEMIS-4579 Add `peekFirstMessage*` and `peekFirstScheduledMessage*` functions 2024-03-07 10:45:14 -06:00
AntonRoskvist 45533c38da ARTEMIS-4664 - autoCreatedResource can get removed while receiving batch of messages 2024-03-07 10:45:41 -05:00
Clebert Suconic 5ce70f9e37 ARTEMIS-4669 Clarify Storage Manager usage around large messages 2024-03-05 17:27:18 -05:00
Justin Bertram 661a4e6fdc ARTEMIS-4655 report logging metrics
It may be useful to configure alerts for ERROR or WARN events in the log
which may go unnoticed otherwise.
2024-03-05 09:37:11 +00:00
Clebert Suconic b5791344b4 ARTEIS-4651 Speeding up delivery resume when SNF is paged 2024-03-04 10:47:12 -05:00
Clebert Suconic db94b18b73 ARTEMIS-4651 Performance improvements on Mirror and Paging 2024-02-26 11:01:04 -05:00
Alexey Markevich 9cd598ebf4 ARTEMIS-1230 Added artemis-bom 2024-02-14 10:33:19 +00:00
Justin Bertram 20840cfdf1 ARTEMIS-4639 NPEs when TopologyMember's primary is null 2024-02-09 10:43:50 +00:00
Maverick19841972 89c3a627e9
ARTEMIS-4187 made SizeAware attributes consistent 2024-02-06 13:12:59 -06:00
a181321 c4c2a9e718 ARTEMIS-4637 - Allow unordered xml conf elements for clusters and bridges 2024-02-06 11:58:59 -05:00
Justin Bertram f91d7c51fd ARTEMIS-4629 fix core bridge docs
This fills in the gaps for some missing parameters in the core bridge
documentation as well as fixes the example so it's actually valid
according to the XSD.
2024-02-02 11:58:36 -06:00
Justin Bertram 2952d94554 ARTEMIS-4608 upgrade Derby to 10.15.2.0 2024-02-01 10:07:57 -06:00
Domenico Francesco Bruscino 6ebd390330 ARTEMIS-4587 Config security setting plugins by using broker properties 2024-01-31 11:38:29 +01:00
a181321 efe450298d ARTEMIS-4527 - Redistributor race when consumerCount reaches 0 in cluster 2024-01-30 14:22:28 -05:00
Justin Bertram 513b7826a4 ARTEMIS-4532 MQTT-to-core wildcard conversion is broken
Currently when an MQTT topic filter contains characters from the
configured wildcard syntax the conversion to/from this syntax breaks.

For example, when using the default wildcard syntax if an MQTT topic
filter contains a . the conversion from the MQTT wildcard syntax to the
core wildcard syntax and back will result in the `.` being replaced with
a `/.`.

This commit fixes that plus a few other things...

 - Implements proper conversions to/from one WildcardConfiguration to
   another.
 - Refactors the MQTT code which invokes these conversion methods. This
   includes simplifying a lot of test code.
 - Adds lots of tests for everything.
 - Clarifies some variable naming to better distinguish between core and
   MQTT.
2024-01-29 18:35:43 +00:00
Robbie Gemmell 83eb03c665 ARTEMIS-4583: remove the artemis-server test-jar, do related cleanup
- Move ActiveMQTestBase to artemis-test-support.
- Add reduced parent for current artemis-server tests.
- Add a simpler test case parent class unit tests can use.
- Convert some existing checks into a rule for reuse.
- Move various rules/utils to artemis[-unit]-test-support module from where they can be used instead of from artemis-server.
2024-01-25 16:48:49 +00:00
Clebert Suconic e513e6d2dd [maven-release-plugin] prepare for next development iteration 2024-01-24 14:21:08 -05:00
Clebert Suconic dbaa508d07 [maven-release-plugin] prepare release 2.32.0 2024-01-24 14:21:07 -05:00
Howard Gao 07b02159d2 ARTEMIS-4570 filter not applied to all brokers in cluster 2024-01-23 16:13:13 -05:00
Justin Bertram 44ceeff63c ARTEMIS-4540 validate MQTT session state data 2024-01-22 20:58:13 -06:00
Justin Bertram 019fc86138 ARTEMIS-4542 improve MQTT state storage
This commit:

 - Eliminates MQTT session storage on every successful connection.
   Instead data is only written when subsriptions are created or
   destroyed.
 - Adds a configuration property for the storage timeout.
 - Updates the documentation with relevant information.
 - Refactors a few bits of code to eliminate unnecessary variables, etc.
2024-01-22 19:58:07 -06:00
Pavel Perikov fbfe81eb4d ARTEMIS-4581 fix NPE crash in PostOfficeImpl 2024-01-22 17:06:00 -05:00
Howard Gao 6f6c5723d5 ARTEMIS-4576 ServerSessionImpl#updateProducerMetrics access large messages after being routed 2024-01-22 15:08:25 -05:00
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
Domenico Francesco Bruscino 2b331427d8 ARTEMIS-4552 Config all connection-router settings by using broker properties 2024-01-19 11:40:42 +00: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 2760a3e911 ARTEMIS-4569 Improving order in which the list is added versus cancel call
I just did some static analysis of this code, and I believe it would be better to first add to the list
before setting the cancel task.

Reason for that is in case the Runnable is dequeued between the add in the deQueue and setting the cancel task.

Possibility is remote but my OCD wouldn't let me ignore this small possibility.
2024-01-17 22:54:58 -05:00
Justin Bertram 1197898232 ARTEMIS-4571 race condition w/TTL impacting in-vm connections
There is a race condition between ConnectionEntry.ttl and
FailureCheckAndFlushThread whereby an in-vm connection may get closed
inadvertently due to a TTL timeout. This is because ConnectionEntry.ttl
is initialized to 60000 and then later set to -1 upon the initial Ping.
If this update happens at *just* the right time in
FailureCheckAndFlushThread then the connection will be closed.

The fix ensures that the ConnectionEntry.ttl is set to -1 for in-vm
connections from the start. It also eliminates the possibility of the
race in FailureCheckAndFlushThread.

This fix is based on static analysis of the code. The timing window is
just too small to contruct a reliable test. The failure has only been
seen in the wild a handful of times.
2024-01-17 21:37:47 -05:00
Clebert Suconic cedc050e03 ARTEMIS-4569 Blocked Producers will hold runnables until messages are consumed.
When initially developed the expectation was that no more producers would keep connecting but in a scenario like this
the consumers could actually give up and things will just accumulate on the server.

We should cleanup these upon disconnect.
2024-01-17 15:40:15 -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
Domenico Francesco Bruscino a7f18777a3 ARTEMIS-4563 Remove auto-created addresses upon restart 2024-01-10 18:31:14 +00:00
Justin Bertram 42ddf99ca8
ARTEMIS-4557 fix audit logging 2024-01-10 09:08:12 -06: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
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
Erwin Dondorp 3413aa6991
ARTEMIS-4535 handle invalid filter gracefully
This commit does the following:

 - prevents a large stack trace when the user-supplied message filter
   has errors
 - improves feedback to user for filter-validity
 - indents the search-field in the "Browse Queue" screen same as on
   other screens
 - fixes a spelling error in a nearby comment
2023-12-21 11:26:18 -06:00
Justin Bertram 6d5c9f170d ARTEMIS-4546 modernize Validators, etc.
No semantic changes here. Just some code gardening.
2023-12-21 12:10:13 -05:00
Clebert Suconic 379dd4088f ARTEMIS-4544 Option to sync large messages 2023-12-19 16:56:14 -05:00
Domenico Francesco Bruscino 177e566f75 ARTEMIS-3932 Move meta bean init to static blocks 2023-12-18 10:28:54 -05:00
Gary Tully 7a2137f467 ARTEMIS-4528 tls, add support for PEM key store type 2023-12-15 15:52:48 +00:00
Justin Bertram 3bdef0e8e1 ARTEMIS-4512 JMS q consumer can wrongly connect to multicast queue 2023-11-28 16:46:44 -05:00
Gary Tully fed01276ba ARTEMIS-4517 - cancel message references in queue sequence order 2023-11-28 16:45:04 -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 7909f4b77f ARTEMIS-4507 make critical analyzer logging consistent 2023-11-27 11:34:44 -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
Robbie Gemmell 8195394eca ARTEMIS-4511: adjust MainTest to clean up resources in case of failure, prevent knock-on test failures 2023-11-20 12:45:18 +00: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
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
Robbie Gemmell 54c1ae630c ARTEMIS-4509: fail if LibaioContext check fouls before class, nicer in CI than just logging and failing after anyway 2023-11-16 10:43:07 +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 3cdd6cc672 ARTEMIS-4483 Avoid log.warn on regular AMQP closing 2023-11-13 11:02:04 -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 42be518deb ARTEMIS-4450 Caching hasLocal boolean on bindings to avoid transversing the maps on every call 2023-10-05 14:05:40 -04:00
a181321 4db39520f2 ARTEMIS-4450 - Auto-deleted clustered destinations can cause message loss 2023-10-05 14:05:40 -04:00
Gary Tully cca027b1cc ARTEMIS-4443 support broker plugin config via broker properties 2023-10-02 10:54:18 +01:00
Clebert Suconic 7c9a15e9b4 ARTEMIS-4447 Add paging prefetch parameters into address settings
we are adding new attributes to determine how many messages (or bytes) we are reading from paging into Queue memory.
2023-09-29 18:43:23 -04:00
Clebert Suconic 5eb02d247b ARTEMIS-4442 Redistributor Leaking Iterators 2023-09-25 14:56:52 -04:00
Clebert Suconic b74f47867f ARTEMIS-4434 Some trivial logging about Redistribution 2023-09-21 12:05:42 -04: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
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
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 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
Robbie Gemmell 9864e005d2 ARTEMIS-4174: test is verifying hostname detail, so use floating ports to avoid sporadic bind failures that are happening 2023-09-06 16:33:43 +01:00
Robbie Gemmell aa4e4409bf ARTEMIS-4417: use ConcurrentHashMap for the sub-maps to make their use thread safe 2023-09-05 19:13:39 +02:00
Clebert Suconic 98710fe032 ARTEMIS-4174 Changing JMXRMIRegistryPortTest to extend ActiveMQTestBase
This way we ensure no thread leaks in tests
2023-09-01 15:26:28 -04:00
Justin Bertram 691771c766
ARTEMIS-4174 fix style & rat 2023-09-01 11:23:48 -05:00
Marvin Blauth 4d46588cdf
ARTEMIS-4174 Listen only to provided connector-host for JMX RMI sockets 2023-09-01 11:08:57 -05: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
Justin Bertram cd8a2e5c49 ARTEMIS-4396 make address/queue internal prop durable 2023-08-31 14:09:42 +01: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