Commit Graph

1150 Commits

Author SHA1 Message Date
Alexey Markevich bf1ea41287 ARTEMIS-4710 Keep pem-keystore dependencies as is; make it really
optional

The latest version already uses bcprov-jdk18on.
Avoid global imports to be able to exclude dependency when not used.
2024-04-02 17:54:29 +01:00
Gary Tully 625bdfce6e ARTEMIS-4699 properties config don't try and imply the factoryClassName of a transport config object, fix up fluent builder and improve mirror usability 2024-03-27 09:15:24 +00:00
Justin Bertram 2cc3704551 [maven-release-plugin] prepare for next development iteration 2024-03-19 15:22:47 -05:00
Justin Bertram 900d217bf9 [maven-release-plugin] prepare release 2.33.0 2024-03-19 15:21:32 -05:00
Clebert Suconic 308aed3060 ARTEMIS-4691 Fixing LockManagerBackupSyncJournalTest
Fixing a few intermittent failures
2024-03-18 17:36:35 -04:00
Clebert Suconic 499a4eab6b ARTEMIS-4691 log.warn on inVM closing 2024-03-18 13:31:48 -05:00
Justin Bertram 50fae08b09 ARTEMIS-4657 support better correlation ID compat b/w JMS clients 2024-03-18 13:19:22 +00:00
Gary Tully 2e17a4a007 ARTEMIS-4582 - view and edit permissions, mops. security-settings for rbac on management apis 2024-03-15 16:40:45 +00:00
Justin Bertram 576622571a ARTEMIS-4559 refactor HA docs & code/module naming
This commit does the following:

 - Updates HA docs including the chapter on network isolation (i.e.
   split brain). The network isolation chapter is now more about
   high-level explanation and the HA doc now has all the configuration
   parameters.
 - Changes references to "pluggable quorum voting" to "pluggable lock
   manager." The pluggable functionality really isn't about voting.
   Conceptually is much more like the functionality you'd get from a
   distributed lock so this naming is more clear. Both the docs and the
   code have been changed.
 - Reorganize lock manager modules as sub-modules. The API and RI
   modules are renamed, but that should be OK based on the
   "experimental" tag that's been on this feature up to this point.
 - Remove the "experimental" tag from the lock manager.

These changes will not break folks using the standalone broker. However,
they will break folks embedding the broker *if* they are using the
artemis-quorum-ri or artemis-quorum-api modules or the
o.a.a.a.c.c.h.DistributedPrimitiveManagerConfiguration class.

There are no functional changes here. Renaming these modules is more a
conceptual change to facilitate better documentation and increased
adoption.
2024-03-15 10:18:05 -04:00
Justin Bertram 269be13c5a ARTEMIS-4652 rollback of XAResource impl shouldn't return XA_RETRY
This fix was based on static analysis of the code and inspection of the
XA specification. There is no test associated with it due to the
difficult nature in reproducing the failure. This code has been
essentially the same for a decade and only now have there been any
reports of it actually sending back the wrong XA code.
2024-03-13 17:25:24 -04:00
Jan Šmucr 3c580c9351 ARTEMIS-4579 Add `peekFirstMessage*` and `peekFirstScheduledMessage*` functions 2024-03-07 10:45:14 -06: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 db94b18b73 ARTEMIS-4651 Performance improvements on Mirror and Paging 2024-02-26 11:01:04 -05:00
Justin Bertram 77d9f10a3d ARTEMIS-4588 30 second pause for large msgs + federation
Large message support was added to
o.a.a.a.c.s.f.FederatedQueueConsumerImpl#onMessage via cf85d35 for
ARTEMIS-3308. The problem with that change is that when onMessage
returns o.a.a.a.c.c.i.ClientConsumerImpl#callOnMessage will eventually
call o.a.a.a.c.c.i.ClientLargeMessageImpl#discardBody which eventually
ends up in o.a.a.a.c.c.i.LargeMessageControllerImpl#popPacket waiting 30
seconds (i.e. the default readTimeout) for more packets to arrive (which
never do). This happens because the FederatedQueueConsumer short-cuts
the "normal" process by using LargeMessageControllerImpl#take.

This commit fixes that by tracking the number of bytes "taken" and then
looking at that value later when discarding the body effectively
skipping the 30 second wait.
2024-02-14 11:07:11 -06:00
Alexey Markevich 9cd598ebf4 ARTEMIS-1230 Added artemis-bom 2024-02-14 10:33:19 +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
a181321 f56595b89b ARTEMIS-4185 - Revision on sending already compressed messages 2024-01-22 17:23:56 -05:00
Justin Bertram 3dd50f8ff1 ARTEMIS-3831 scale-down w/jgroups fails if using same dg as cluster-connection
If both scale-down and cluster-connection are using the same JGroups
discovery-group then when the cluster-connection stops it will close the
underlying org.jgroups.JChannel and when the scale-down process tries to
use it to find a server it will fail.

This commit ensures that the JGroupsBroadcastEndpoint implementation of
BroadcastEndpoint#openClient initializes the channel if it has been
closed.
2024-01-22 15:02:02 -05: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
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
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
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
Justin Bertram c089e72928
ARTEMIS-4522 remove System.outs 2023-12-21 15:16:51 -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
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
Clebert Suconic 2efc4967b6 ARTEMIS-4495 Improving data retention documentation 2023-12-01 23:51:28 -05:00
Justin Bertram 3bdef0e8e1 ARTEMIS-4512 JMS q consumer can wrongly connect to multicast queue 2023-11-28 16:46:44 -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
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
Clebert Suconic 3cdd6cc672 ARTEMIS-4483 Avoid log.warn on regular AMQP closing 2023-11-13 11:02:04 -05:00
Clebert Suconic b041f2cde2 ARTEMIS-4476 Client Failures Soak Test
I was not able to reproduce the actual issue here, but I heavily used this test during debugging.
This will not serve as a reproducer to the Ghost consumer issue, but this is a valid test.
2023-11-09 15:09:35 -05:00
Petr Kužel ebb747b9e7
ARTEMIS-4470 prevent the common trap
Omitting reencode() results in latent error that surfaces only in
AMQP-AMQP messaging.
2023-11-08 14:12:37 -06: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
Emmanuel Hugonnet 37273701ea ARTEMIS-4467 Core client code visibility change required.
* Since the constructors in RemotingConnectionImpl can be used from the server and the client.
If the server calling code is in a different classloader then the
constructor can't be called.
* same for the 'active' boolean property of ActiveMQChannelHandler

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

Signed-off-by: Emmanuel Hugonnet <ehugonne@redhat.com>
2023-10-25 13:39:08 -04:00
Clebert Suconic 9b56d296a3 ARTEMIS-4464 Cleanup on Soak and Smoke tests
- removed a few ignored tests
- removed some artemis maven plugin usage and using the CLI directly now
2023-10-24 14:44:24 -04:00
Clebert Suconic c46c6f11f6 ARTEMIS-4453 Removing unused parameter from constructor 2023-10-12 12:34:04 -04: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
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
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 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 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
Justin Bertram cd8a2e5c49 ARTEMIS-4396 make address/queue internal prop durable 2023-08-31 14:09:42 +01:00
Robbie Gemmell df410da7ae ARTEMIS-4402: add some unit tests exercising the semi-generated log/message bundles to make generation problems more quickly noticable 2023-08-25 15:02:24 +01: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
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
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
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
Justin Bertram 2d1a8661fd ARTEMIS-4338 STOMP inoperable w/resource audit logging
When resource audit logging is enabled STOMP is completely inoperable
due to an NPE during the protocol handshake. Unfortunately the failure
is completely silent. There are no logs to indicate a problem.

This commit fixes this problem via the following changes:
 - Mitigate the original NPE via a check for null
 - Move the logic necessary to set the "protocol connection" on the
   "transport connection" to a class shared by all implementations.
 - Add exception handling to log failures like this in the future.
 - Add tests to ensure the audit logging is correct.
2023-07-06 12:08:16 +01:00
Justin Bertram f60a7d5c04 ARTEMIS-4341 refactor JavaDoc generation
Currently JavaDoc is generated for many classes that don't need it.
JavaDoc should be reserved for user-facing classes (e.g. those used by
client application developers and developers embedding a broker into
their application). This commit narrows down the configuration to just
the classes that are needed. This will save time during release builds,
and save disk space wherever these files are stored (e.g. Apache
website).
2023-07-04 18:00:42 +01:00
Gary Tully a8b4ee1992 ARTEMIS-4314 support queue federation batchOnCapacity via consumerWindowSize=0 2023-06-16 15:44:51 +01:00
Alexey Markevich d00b9ad014 NO-JIRA artemis-core-client: minor SecurityFormatter improvement 2023-06-15 17:00:53 -05: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
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
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
Justin Bertram c4501f6793 ARTEMIS-4294 support text-encoded WebSocket frames 2023-05-31 16:34:02 -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 e719622de5 ARTEMIS-4285 Limit number of redelivery records 2023-05-19 13:59:28 -07: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
Clebert Suconic 1d4139f278 ARTEMIS-3809 Fixing LargeMessageController timeout
Say packets stopped flowing, and you are calling receive(0);
The Controller should check if packets didn't arrive and throw a proper exception
2023-05-15 14:37:05 -07:00
Justin Bertram c9c819aa88 ARTEMIS-4274 push masked credential support into core client 2023-05-10 13:55:39 -07:00
Gary Tully c5d872575e ARTEMIS-4256 - support removal of configuration via properties 2023-05-05 11:58:15 +01: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 4eb978b931 ARTEMIS-4233 Disabling RefCounting debug and error after paged messages 2023-04-12 16:40:26 -07: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
Clebert Suconic 07d96ecb9e NO-JIRA dump typo 2023-03-30 15:42:10 -04:00
Justin Bertram 448a6dee02 ARTEMIS-4209 avoid double 'ID:' for 'User ID' when browsing AMQP msgs 2023-03-28 16:21:13 -05:00
Domenico Francesco Bruscino bb08a573eb ARTEMIS-3640 Use client connectors for HA 2023-03-09 11:20:51 +00: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