Commit Graph

621 Commits

Author SHA1 Message Date
Gary Tully 8f9a72d257 ARTEMIS-4432 respect actor and operation context for openwire connection failure processing 2023-09-20 15:25:50 +01: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 7685890574 NO-JIRA IMprovements on CompareUpgradeTest 2023-09-15 13:39:16 -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
Clebert Suconic 536174e0bb ARTEMIS-4397 Fixing Upgrade command
co-authored with Domenico Francesco Bruscino <brusdev@apache.org>
2023-09-14 12:25:46 -04: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
Justin Bertram 56c8afe934 ARTEMIS-4405 wrong user logged for authz audits 2023-08-29 15:35:22 +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 677d71b8e7 ARTEMIS-4366 Missing Mirrored ACKs with MULTICAST and subscriptions 2023-07-17 20:19:06 -04:00
Dries Harnie aebdcc5eb8 NO-JIRA: Fix spelling and grammar of two audit log messages 2023-07-14 10:00:26 -05: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
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 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
Justin Bertram 950040b62b ARTEMIS-4322 BundleFactory should use PrivilegedAction 2023-06-22 09:35:05 +01:00
Justin Bertram 0521f47a1f
Improve readability of TypedProperties toString 2023-06-19 09:53:39 -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
Justin Bertram 15aafe0b70 ARTEMIS-4293 add mngmnt ops to clear authn/z caches 2023-05-26 16:47:33 +02:00
Stephen Higgs f1f017fb3b ARTEMIS-4279 Shutdown critical analyzer thread if error on broker initialization
The broker process fails to exit if an error is encountered starting the NodeManager.  The issue is resolved by converting the critical analyzer thread to a daemon thread.  As added protection, the thread is manually stopped when this error is encountered.
2023-05-16 01:32:43 -07:00
Alexey Markevich 383345a4f6 ARTEMIS-4239 use StandardCharsets.UTF_8 2023-05-08 15:10:23 -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 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 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 8ba9727b78 ARTEMIS-4210 refactor connection audit logging
This commit fixes the following things:

 - Moves connection audit logging to the resource audit logger instead
   of using a dedicated logger as that would adversely impact upgrading
   users, and arguably didn't make sense in the first place.
 - Mitigates an potential NPE w.r.t. connection ID.
 - Updates the "dummy" management connection to return a valid
   connection ID.
2023-03-30 14:37:17 -07:00
Justin Bertram d2e5ddfe86 ARTEMIS-4210 audit connection creation & destruction 2023-03-28 16:21:04 -05:00
Clebert Suconic 8078dd098c ARTEMIS-4171 Messages leaking thorugh AMQP Delivery
there are two leaks here:

* QueueImpl::delivery might create a new iterator if a delivery happens right after a consumer was removed, and that iterator might belog to a consumer that was already closed
             as a result of that, the iterator may leak messages and hold references until a reboot is done. I have seen scenarios where messages would not be dleivered because of this.

* ProtonTransaction holding references: the last transaction might hold messages in the memory longer than expected. In tests I have performed the messages were accumulating in memory. and I cleared it here.
2023-02-28 14:36:32 -05: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 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
Erwin Dondorp 065e4246e1 ARTEMIS-3993 changed some MB style uses to use MiB; added support for MiB/GiB/etc in config 2022-12-15 13:14:24 -06:00
Justin Bertram 4924bd6b81
ARTEMIS-4101 fix license syntax 2022-12-13 11:41:27 -06: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 af2b8e4b07 ARTEMIS-4084 Dealing with multi consumers crashes, Improving cached addSorted 2022-11-28 09:54:45 -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 03b82142eb ARTEMIS-4084 Fixing addSorted with large transactions
when cancelling a large number of messages, the addSorted could be holding a lock for too long causing the server to crash under CriticalAnalyzer

co-authored: AntonRoskvist <anton.roskvist@volvo.com> (discovering the issue and providing the test ClientCrashMassiveRollbackTest.java)
2022-11-09 15:43:02 -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 b388a24b26 ARTEMIS-4056 Paging Management optimizations
- optimize startup time on paging (check-depage on startup)
- otpimize getNextPage() on complete pages
- optimize getFirstMessage() and paging. (avoid iterator usage)
2022-10-18 10:45:55 -04:00
Gary Tully 3b981b3920 ARTEMIS-4028 - add alder32 checksum to the status of properties files read by the broker 2022-10-13 18:23:09 +01:00
Timothy Bish b900a1e4bd ARTEMIS-4020 Standardize the naming of Logger types for consistency
Attempt to standardize all Logger declaration to a singular variable name
which makes the code more consistent and make finding usages of loggers in
the code a bit easier.
2022-10-13 12:40:45 -04:00
Gary Tully 8a6e29ccde
ARTEMIS-4042 - read sensitive string codec env var if system property is not set 2022-10-13 11:20:01 -05:00
Justin Bertram 5343c97c7d ARTEMIS-4022 add auto-delete queue attribute to management 2022-10-11 13:16:46 -04:00