Commit Graph

2413 Commits

Author SHA1 Message Date
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 dc93f01542 ARTEMIS-4199 PageCounter could leave a record pending in the journal
This is just an annoying thing. as the functionality would work properly if there was a previous value.
No other harm other than the cannot find TX record on startup for this, hence I'm fixing it.
2023-03-07 17:18:43 -05:00
Clebert Suconic 08a81a7402 I had a mistake reapplying the large message fix. I'm still reworking the commit.
I apologize for this spam

This reverts commit 14536bf311.
2023-03-06 20:05:18 -05:00
Clebert Suconic 14536bf311 Revert "I'm temporarily reverting "ARTEMIS-4193 Large Message Files orphaned after server killed""
This reverts commit 7e6ce5a259.
2023-03-06 17:04:18 -08:00
Clebert Suconic 7e6ce5a259 I'm temporarily reverting "ARTEMIS-4193 Large Message Files orphaned after server killed"
while I figure out a better fix

This reverts commit 9f1927d3fa.
2023-03-06 12:31:54 -05:00
Justin Bertram 97c78525da ARTEMIS-4181 make try-with-resources style consistent 2023-03-03 08:40:51 -06:00
Clebert Suconic 9f1927d3fa ARTEMIS-4193 Large Message Files orphaned after server killed 2023-03-02 19:03:37 -08: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
Gary Tully dc7d1e25cc NO-JIRA - add test for ENC of tls params for broker amqp connection via props 2023-03-02 12:53:30 +00: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
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
Rakhi Kumari 17c760ab7b ARTEMIS-4157: Fix error setting broker properties for AddressSettings 2023-02-10 09:53:22 +00:00
Gary Tully 94516b8b37 fix mirror test that validates autostart 2023-02-08 16:44:42 +00:00
Clebert Suconic ed5f63538e ARTEMIS-4155 Fixing deadlock on LargeMessage conversion and retention 2023-02-06 09:27:18 -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
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
Robbie Gemmell 031788dbe8 ARTEMIS-3178: remove erroneous comment 2023-01-31 11:48:43 +00:00
Clebert Suconic bbf1baf3b2 ARTEMIS-3178 Fixing validation on PagingStoreImpl for parameters set 2023-01-31 06:40:57 -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
Gary Tully b5ae95c376 ARTEMIS-4149 - add watch to login.config dir to trigger periodic update to jass reloadable properties status in the absence of login attempts 2023-01-30 15:25:58 -05:00
Ryan Highley 1c987ff129 ARTEMIS-3139 Anonymous types in Artemis config XSD
Moves embedded XSD element definitions and associated complexTypes
from XSD element definitions to top-level types available for XML
schema validation in IDEs.
2023-01-30 14:15:53 -05:00
Justin Bertram 49f8846861 ARTEMIS-4146 reauthenticated subjects are not cached 2023-01-30 12:02:08 -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
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 bd99a11780 ARTEMIS-4135 mitigate NPE when browsing 2023-01-17 12:18:58 -06:00
iliya e68034518d ARTEMIS-4129 Add max-saved-replicated-journals-size parameter to primary and replicated policy configuration
Allow override default max-saved-replicated-journals-size value when the server is configured as primary or replicated.
2023-01-17 12:07:10 -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
Clebert Suconic 4550fcf47c ARTEMIS-4116 Management lock to avoid multiple long running tasks running from user requests 2023-01-13 09:23:51 -05:00
Clebert Suconic b565a8a7b9 ARTEMIS-4114 Avoiding deadlock during scale down
We will rely on existing tests for this change
2023-01-13 09:23:51 -05:00
Clebert Suconic abd62665ce ARTEMIS-4125 Fixing AutoCreateJmsDestinationTest::testAutoCreateOnSubscribeToTopic 2023-01-12 16:17:28 -05:00
Clebert Suconic c231e6a643 ARTEMIS-4125 Fixing AutoCreate Topics remove of the address
This is fixing AutoCreateJmsDestinationTest::testAutoCreateOnSubscribeToTopic
2023-01-12 11:02:35 -06:00
Justin Bertram 114302a093 ARTEMIS-4125 address can be removed inadvertently
When the last non-durable subscriber on a JMS topic disconnects the
corresponding queue representing the subscription is deleted as
expected. However, the queue's address will also be deleted no matter
what, which is *not* expected.
2023-01-09 10:45:56 -06:00
Justin Bertram 56167b5e13 ARTEMIS-4122 support timed refresh for LegacyLDAPSecuritySettingPlugin
Some LDAP servers (e.g. OpenLDAP) do not support the "persistent search"
feature and therefore the existing "listener" feature does not actually
fetch updates. This commit implements a "pull" feature controlled by a
configurable interval equivalent to what is implemented in the cached
LDAP authorization module from ActiveMQ "Classic."
2023-01-07 22:54:35 -06:00
Justin Bertram c354c8e642 ARTEMIS-4016 fixing tests 2023-01-07 22:54:26 -06:00
Robbie Gemmell 0dcb3aba2e ARTEMIS-4110: update a few more files introduced recently from older PRs being merged 2022-12-20 09:45:52 +00:00
AntonRoskvist 04ddeb647c ARTEMIS-4016 Bridges created by management operations are removed on restart and config reload 2022-12-17 10:10:10 -06:00
AntonRoskvist 6dd7965906
ARTEMIS-3834 include paged messages sending to DLA 2022-12-17 00:03:23 -06:00
Clebert Suconic 51a3c6a351
ARTEMIS-3993 Fix test 2022-12-16 13:02:48 -06:00
clebert 16046b368d ARTEMIS-3993 Fixing test when libaio is loaded 2022-12-16 10:35:48 -05:00
Clebert Suconic f5d9eed9ce ARTEMIS-3085 Fixing test and proper wiring listener 2022-12-16 05:27:18 -05:00
Somdatta 00592d6dd8
ARTEMIS-3085 support custom IOCriticalErrorListener 2022-12-15 16:35:20 -06:00
AntonRoskvist 5c2a0d744c
ARTEMIS-4091 - Make scaleDown target more deterministic 2022-12-15 16:05:26 -06:00
Justin Bertram df81bfa567 ARTEMIS-4103 support journal-lock-acquisition-timeout in broker.xml 2022-12-15 13:44:40 -06: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 cbd9f63a9d ARTEMIS-4115 ArrayIndexOutOfBoundsException when dup cache size is 0
Allow setting id-cache-size to 0 from broker.xml and ensure the broker
handles this gracefully. Previously you could only set the cache size to
0 via broker properties or programmatically and it would throw an
ArrayIndexOutOfBoundsException when adding an item to the cache.
2022-12-15 13:01:31 -06:00
Domenico Francesco Bruscino fa8d487ff2 ARTEMIS-3866 Authorize management message sending using context subject 2022-12-15 11:51:39 -05:00
Clebert Suconic af9bd7b84a ARTEMIS-4065 Optimize page counters to not use the journal as often
- From now on we will save snapshots of page-counters on the journal (basically for compatibility with previous verions).
  And we will recount the records on startup.

- While the rebuild is being done the value from the previous snapshot is still available with current updates.
2022-12-15 10:30:18 -05:00
Justin Bertram 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
Gary Tully bd72a4f38d ARTEMIS-3168 - more idomatic usage of mock-server-netty - with hasStarted 2022-12-08 11:31:25 +00: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
Gary Tully 0004e52355 ARTEMIS-3168 - isolate from leaked login.config system property by seting baseDir option 2022-12-02 17:43:18 +00:00
Gary Tully d95321bf83 ARTEMIS-3168 - fix contention on pem creation and tidy up system properties 2022-12-02 14:33:40 +00:00
Gary Tully 5633de9cb0 ARTEMIS-3168 - fix test dependency on login.config system property being set 2022-12-02 13:21:45 +00:00
Gary Tully 7d537882ca ARTEMIS-3168 - fix test, ref to auto created pem before creation complete 2022-11-25 17:29:05 +00:00
ruromero 3e50014e0d [ARTEMIS-3168] Implement Kubernetes JaaS LoginModule
Signed-off-by: ruromero <rromerom@redhat.com>
2022-11-22 11:44:00 +00:00
Gary Tully eb0aa118b4 NO JIRA - test that shows need for lower case property prefix with existing fluent introspector 2022-11-21 14:13:18 +00:00
Clebert Suconic 0866a2eb88 ARTEMIS-4096 Bridge transfer is broken with AMQP Large messages 2022-11-19 11:57:28 -05:00
Domenico Francesco Bruscino 3a13a7850c ARTEMIS-4077 Add an option to disable XML external entity processing 2022-11-15 10:06:03 -06:00
Clebert Suconic 4f79eb42f5 ARTEMIS-4089 Check on AutoCreation during routing 2022-11-14 15:25:42 -05:00
Šmucr Jan 43824fc494 ARTEMIS-4078 Fix divert reloading
Reloading has been fixed for divert:
* filter
* address
* exclusive

Source address and exclusivity changes require divert redeployment.
2022-11-11 12:00:00 -06:00
Justin Bertram ca580814de ARTEMIS-4085 exclusive LVQ sending all messages to consumer 2022-11-10 13:58:53 -05:00
Domenico Francesco Bruscino 3a5e4ce363 ARTEMIS-4030 Fix SharedStoreLiveActivation race condition
DefaultCriticalErrorListener stops the server while SharedStoreLiveActivation
is initializing it.
2022-11-10 12:09:43 -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
Justin Bertram ccb76c0a2a ARTEMIS-4064 Harden MetricsManager
In order to improve trouble-shooting for the MetricsManager there should
be additional logging and exceptions. In all, this commit contains the
following changes:

 - Additional logging
 - Throw an exception when registering meters if meters already exist
 - Rename a few variables & methods to more clearly identify what they
   are used for
 - Upgrade Micrometer to 1.9.5
 - Simplify/clarify a few blocks of code
 - No longer pass the ManagementServiceImpl when registering the
   metrics, but instead pass the Object the meter is observing (e.g.
   broker, address, or queue)
2022-10-31 09:04:20 -04:00
Robbie Gemmell 92a87b0912 ARTEMIS-4060: temporarily make commons-text an explicit dep of artemis-server for now so dependent projects get the updated dep version 2022-10-26 14:16:12 +01:00
Clebert Suconic 0da14a303d ARTEMIS-4073 Relaxing some locks that were not necessary and were causing dead locks on the testsuite 2022-10-26 07:55:57 -04:00
Clebert Suconic d185735e55 ARTEMIS-4073 Page Counters can go off sync when multiple producers are used in the same address 2022-10-25 21:26:14 -04:00
Justin Bertram 9138cc86ca ARTEMIS-4049 user add fails w/space in broker path
This problem was originally discovered on Windows, but the problem
occurs on *nix as well.
2022-10-19 10:09:33 +01:00
Clebert Suconic 51c50d8546 ARTEMIS-4056 Fixing compatibility with getFirstMessage()
if Empty the previous method was returning new Map[1] and the JSON output would be slightly different and I am playing safe here just in case.
2022-10-18 13:49:32 -04:00
Clebert Suconic 77ad2b0bc0 ARTEMIS-4056 Expanding nextPage check into isDeleted 2022-10-18 11:51:47 -04: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
Robbie Gemmell 8c209adc99 ARTEMIS 4007: tweak javadoc to stop build failure with newer javadoc plugin 2022-10-17 11:06:48 +01:00
Clebert Suconic e1e728a28e NO-JIRA Debug statement on paging manager 2022-10-16 02:02:19 -04:00
Clebert Suconic 52c45f5aec ARTEMIS-4025 Fixing JSon transient attribute after serialization copy 2022-10-14 15:42:42 -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
Gary Tully 03ef286cc8 ARTEMIS-4025 - trap failure to apply properties as errors and report via the broker status in a configuration/properties/errors status field 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
Justin Bertram 0ab098e456
ARTEMIS-4035 all consumers of federated queue drop if only one consumer drops 2022-10-13 10:36:38 -05:00
Clebert Suconic 7b2f7e1707 ARTEMIS-4041 Fixing NPE on SequentialFileFactory after the CriticalIO change 2022-10-12 17:03:13 -04:00
Clebert Suconic 49d33470f9 ARTEMIS-4041 Improve critical IO reporting 2022-10-12 10:50:33 -04:00
Justin Bertram 5343c97c7d ARTEMIS-4022 add auto-delete queue attribute to management 2022-10-11 13:16:46 -04:00
Clebert Suconic 33438c2e44 ARTEMIS-4029 Avoid OME When too many pages are cleared all at once
this is the second part of the fix (I missed the first part) where I am clearig midstream records as well.
2022-10-11 00:26:41 -04:00
Timothy Bish 617269319a ARTEMIS-4020: Remove string appends and various isXEnabled logger checks (add some where useful)
Logger statements should use formatting syntax and let the normal framework checks take care of
checking if a logger is enabled instead of string concats and isXEnabled logger checks except
in cases there is known expense to the specifc logging message/arg preparation or passing.

Changes from myself and Robbie Gemmell.

Co-authored-by: Robbie Gemmell <robbie@apache.org>
2022-10-07 15:40:53 -04:00
Clebert Suconic 42d07458e9 ARTEMIS-4029 Avoid OME When too many pages are cleared all at once
The issue is that depage should not put pages on the used pages as they were not actually intended to read.
instead I should create a newPageObject and not use the RefCounts caching.
2022-10-06 07:53:38 -04:00
Clebert Suconic 18cfdb7049 ARTEMIS-4024 Avoid excessive NativeMemory allocation when sending OpenWire Multi mega sized messages in openwire 2022-10-04 13:35:50 -04:00
Robbie Gemmell f465073744 ARTEMIS-4026: correct connection-router related log statement value and/or level 2022-10-03 15:11:06 +01:00
Clebert Suconic 9647e6555f NO-JIRA small tweak on comment 2022-09-30 11:04:22 -04:00
Robbie Gemmell bd85a3eab7 ARTEMIS-4020: consolidate loggers in ActiveMQTestBase, use placeholders in messages 2022-09-30 11:41:33 +01:00
Robbie Gemmell 1ad1128db2 ARTEMIS-4020: have the concrete classes provide logger to the shared abstract impl instead of using getClass() in parent
followup to 12cc70c5bf PR discussion
2022-09-30 11:38:32 +01:00
Clebert Suconic 2ba6452b83 ARTEMIS-4020 removing ActiveMQTestBase::instanceLog 2022-09-29 17:46:51 -04:00
Clebert Suconic 12cc70c5bf ARTEMIS-4020 Using a little trick to create the Loggers
Trick provided by Tim Bish
2022-09-29 17:46:51 -04:00
Robbie Gemmell 9873fccf74 ARTEMIS-4020: switch to using SLF4J API for logging, use Log4J 2 as impl for broker distribution and tests
PR includes work from myself and Clebert Suconic, squashed from the new-logging branch.
2022-09-28 14:01:54 -04:00
Justin Bertram e47b7992ca
ARTEMIS-4010 LegacyLDAPSecuritySettingPlugin missing data
In commit a9a85f98db I removed the code
which modified existing matches. However, I forgot that the matches read
from LDAP are often duplicated so instead of always adding a new match
this commit ensures that the *right* match is modified rather than a
potentially more generic wildcard match (which was the original
problem).
2022-09-23 21:29:35 -05:00
Clebert Suconic e865558b30 ARTEMIS-3763 Fixing test I missed on my previous commit for JDBCLock 2022-09-22 14:39:48 -04:00
Marlon Müller 9fa36e7c53 ARTEMIS-3763 Use margin when checking time difference between broker and database
* Add configurable time margin for checking offset between database server and broker when updating lease lock
2022-09-22 14:34:33 -04:00
Justin Bertram cd7555c523 ARTEMIS-3264 handle core-to-AMQP conversion failures more gracefully
If an AMQP consumer tries to receive a message and the broker is unable
to convert the message from core to AMQP then the consumer is
disconnected and the offending message stays in the queue. When the
consumer reconnects the conversion error will happen again resulting in
a loop that can only be resolved through administrative action (e.g.
deleting the message manually or sending it to a dead letter address).

This commit fixes that problem by detecting the conversion problem and
sending the message to the queue's dead letter address. It also doesn't
disconnect the consumer.

This commit also changes the log messages associated with sending a
message to the dead letter address since this event can now occur
regardless of the delivery attempts.
2022-09-22 09:55:36 -04:00
Clebert Suconic 5d8e7fe829 [maven-release-plugin] prepare for next development iteration 2022-09-21 13:00:47 -04:00
Clebert Suconic 2d7b1a3ef7 [maven-release-plugin] prepare release 2.26.0 2022-09-21 13:00:46 -04:00
Gary Tully 2d662a07f3 ARTEMIS-4007 - expose status attribute on configuration that can hold version or error state and reflect modifications via refresh 2022-09-21 11:49:26 -04:00
Gary Tully d7d1c2ee42 ARTEMIS-4001 - add properties url to the reload manager watch list, validate queue creation on reload with new test 2022-09-20 15:39:32 +01:00
Justin Bertram 8b56c04293
ARTEMIS-3962 porting changes from AMQ-5281
Incorrect handling of unknown values in selectors.

There is a slight semantic change here due to an error in the way we
were handling null identifiers. This may require a change in selector
syntax to use "IS NULL" or "IS NOT NULL" when using identifiers which
may be null in the message being selected.

This was the case for an internal filter used by the cluster connection
bridge to select which cluster notification messages to consume.

See https://issues.apache.org/jira/browse/AMQ-5281 for more details.
2022-09-19 14:45:05 -05:00
Domenico Francesco Bruscino 93a5f3b596 ARTEMIS-3999 Fix setting extraParams for new acceptors via broker properties 2022-09-19 08:18:12 +02:00
Domenico Francesco Bruscino fda7f6ba37 ARTEMIS-3998 Fix broker properties for connectionRouters 2022-09-15 15:42:29 -04:00
Justin Bertram 27008758fe
ARTEMIS-3986 CME when using LVQ
The map used by LastValueQueue was inadvertently changed to a
non-thread-safe implementation in
4a4765c39c. This resulted in an occasional
ConcurrentModificationException from the hashCode implementation.

This commit restores the thread-safe map implementation and adds a test
which brute-forces a CME when using the non-thread-safe implementation.
2022-09-15 11:11:19 -05:00
Gary Tully c8624f57d7 ARTEMIS-3978 - allow federation upstream configuration via properties 2022-09-15 13:27:41 +01:00
Justin Bertram a9a85f98db ARTEMIS-3984 LegacyLDAPSecuritySettingPlugin shouldn't modify existing matches
When the LegacyLDAPSecuritySettingPlugin has enableListener set to true
and a new permission is added it will try to modify the existing match
if one exists. This is problematic if there's a more generic wildcard
match than the specific one that's modified.

This commit fixes that problem so that instead of modifying the existing
match(es) it simply adds a new one. The plugin never should have tried
modifying the existing match in the first place as two identical matches
would be a configuration error.
2022-09-13 19:11:28 -04:00
Emmanuel Hugonnet 51ccc7d6c2
ARTEMIS-3989 ActiveMQServerControl.getRoles doesn't return all roles
- Fixing RoleInfo to provide informations on deleteAddress.
 - Adding more coverage on test to check the number of permissions
   returned.

Signed-off-by: Emmanuel Hugonnet <ehugonne@redhat.com>
2022-09-13 14:43:58 -05:00
Clebert Suconic c4145e9226 ARTEMIS-3973 Solving concurrent issue between Subscription.ack and moveNext under heavy CPU usage 2022-09-13 10:49:22 -04:00
Clebert Suconic 4ad830fb95 Bumping artemis as 3.0
After removing ActiveMQ Artemis rest (per ARTEMIS-3987), we should start promoting Artemis as 3.0
2022-09-12 15:09:31 -04:00
Robbie Gemmell 66ac39eb81 ARTEMIS-3971: set -noindex to exclude various .js files from javadoc output 2022-09-06 17:23:56 +01:00
Clebert Suconic 11eab60584 [maven-release-plugin] prepare for next development iteration 2022-08-30 18:04:06 -04:00
Clebert Suconic fb1b362b47 [maven-release-plugin] prepare release 2.25.0 2022-08-30 18:04:05 -04:00
Clebert Suconic d4cbbfde1e ARTEMIS-3943 Changing default broker.xml and xsd with max-page-read comments and defaults 2022-08-30 13:45:17 -04:00
Rico Neubauer 6482805f7d
ARTEMIS-3922 Reducing contention on Throwable#getOurStackTrace
By allowing to pass caller's classname directly to org.apache.activemq.artemis.utils.ActiveMQThreadFactory#defaultThreadFactory instead of calculating it from stack.
2022-08-30 11:08:31 -05:00
Domenico Francesco Bruscino 45a1245cb0 ARTEMIS-3963 Fix setting security roles via properties on OpenJ9 JDK 11
RoleSet.class.getMethods() returns the same methods on both OpenJDK 11 and
OpenJ9 JDK 11 but the order is different. OpenJDK 11 returns
`public void org.apache.activemq.artemis.core.config.impl.RoleSet.add` before
`public boolean java.util.HashSet.add` while OpenJ9 JDK 11 returns
`public boolean java.util.HashSet.add` before
`public void org.apache.activemq.artemis.core.config.impl.RoleSet.add`
2022-08-30 12:06:20 -04:00
Clebert Suconic d06459df57 ARTEMIS-3943 Adjusting defalut address settings to avoid OME from paging and flow control 2022-08-30 09:26:35 -04:00
Justin Bertram 0e56d1a567 ARTEMIS-3961 don't log OperationContext 2022-08-29 16:27:40 -04:00
Justin Bertram 755b987ab1
ARTEMIS-3958 sending LWT may recurse infinitely if disk full
Due to the changes in 682f505e32 we now
send "Last Will & Testament" MQTT messages via ServerSession. This means
sending will fail if the disk is full. For MQTT this triggers a
connection failure which in turns triggers sending an LWT message. This
process will recurse infinitely until it results in a
java.lang.StackOverflowError.

This commit fixes that by tracking whether or not sending a LWT message
is already in progress.
2022-08-26 11:13:01 -05:00
Justin Bertram a0f39a4b28 ARTEMIS-3956 clean up use of RemotingConnection
org.apache.activemq.artemis.spi.core.protocol.RemotingConnection has a
number of implementations most notably an abstract version which
provides many methods shared among the implementations. The sharing
could be improved to eliminate duplicate code.

This commit eliminates more than 700 lines of unnecessary code.

There should be no semantic changes.
2022-08-25 18:12:11 -04:00
Justin Bertram 729fdc4aab ARTEMIS-3955 consolidate Subject on RemotingConnection 2022-08-25 18:12:11 -04:00
Justin Bertram f88381430c
ARTEMIS-3872 fix NPE 2022-08-25 15:16:32 -05:00
Justin Bertram 63966dcc56
ARTEMIS-3872 send scheduled msg immediately via mgmnt 2022-08-25 08:44:43 -05:00
Justin Bertram 8511cf3617
ARTEMIS-3843 add/remove connector via management 2022-08-24 17:24:29 -05:00
Justin Bertram 87e9b361bb
ARTEMIS-3785 support specifying alias for SSL keystore 2022-08-24 17:22:01 -05:00
AntonRoskvist e8337b9c2e
ARTEMIS-3933 - ScaleDown NPE on DLA resources with multiple destinations 2022-08-24 17:17:09 -05:00
Justin Bertram f1c9e3df14
ARTEMIS-3947 fix merging for expiry address-settings 2022-08-19 22:38:41 -05:00
Justin Bertram 86db53da9a ARTEMIS-3918 support FQQN + anycast + redistribution
When a message is sent to an anycast queue via FQQN on one node of a
cluster and then a consumer is created on that same anycast queue via
FQQN on another node in the cluster the message is not redistributed to
the node with the consumer.

This commit fixes this use-case primarily by including the FQQN info in
the notification messages sent to other nodes in the cluster.
2022-08-19 16:42:03 -04:00
Justin Bertram d158e7eff0
ARTEMIS-3925 LVQ pruning nulls
Messages without a last-value property sent to an LVQ are being pruned
rather than just passing through. Only messages with a non-null
last-value property should be subject to pruning.
2022-08-17 12:28:36 -05:00
Clebert Suconic 520088b8c6 ARTEMIS-3940 Address.maxSizeMessage is ignored on FAIL and Blocking Paging Policy 2022-08-16 16:50:51 -04:00
Clebert Suconic 252e5b0b14 ARTEMIS-3928 Limiting parallel IO in paging which would allow multiple destinations running all at once
Running HorizontalPagingTest with these variables would make the test to fail unless these changes are applied.

export TEST_HORIZONTAL_SERVER_START_TIMEOUT=300000
export TEST_HORIZONTAL_TIMEOUT_MINUTES=120
export TEST_HORIZONTAL_PROTOCOL_LIST=OPENWIRE

export TEST_HORIZONTAL_OPENWIRE_DESTINATIONS=200
export TEST_HORIZONTAL_OPENWIRE_MESSAGES=1000
export TEST_HORIZONTAL_OPENWIRE_COMMIT_INTERVAL=100
export TEST_HORIZONTAL_OPENWIRE_RECEIVE_COMMIT_INTERVAL=0
export TEST_HORIZONTAL_OPENWIRE_MESSAGE_SIZE=20000
export TEST_HORIZONTAL_OPENWIRE_PARALLEL_SENDS=10
2022-08-10 19:29:29 -04:00
Emmanuel Hugonnet 7fe3e5d198 ARTEMIS-3923 AddressControlImpl.getRoles doesn't return all the security role permissions.
* Adding the missing permissions to the array.

Signed-off-by: Emmanuel Hugonnet <ehugonne@redhat.com>
2022-08-08 11:20:04 +02:00
Andy Taylor 609343ec78 ARTEMIS-3917 Fix incorrect getters/setters on Configuration API
and added test for primitive configuration properties

https://issues.apache.org/jira/browse/ARTEMIS-3917
2022-08-02 08:58:47 -04:00
Andy Taylor d67910f1a6 added test for mirroring and properties 2022-08-01 11:20:09 -04:00
Justin Bertram 7184862bb5
NO-JIRA update XSD missed in ARTEMIS-3805 2022-07-29 09:35:48 -05:00
Domenico Francesco Bruscino d250801fcf ARTEMIS-3900 Support management allowlist entries with wildcard domain 2022-07-28 13:39:00 -04:00
Clebert Suconic e44bd5266f ARTEMIS-3909 Move RoutingContext::processReferences as a static method in PostOffice
We were lucky that processReferences was pretty much a static operation, hence I am moving it away from RoutingContext both for clarity and avoiding state being needed on that method.
If state was needed as part of processReferences you would had a pretty nasty bug as the IOCallback could introduce a race where a send would change the state while the IO was pending.
2022-07-28 13:04:10 -04:00
Clebert Suconic fa002728f2 [maven-release-plugin] prepare for next development iteration 2022-07-26 11:59:21 -04:00
Clebert Suconic 897d9beaef [maven-release-plugin] prepare release 2.24.0 2022-07-26 11:59:19 -04:00
Clebert Suconic 55865ab4b4 Revert "ARTEMIS-3902 Adding reason to Audit Security Message"
This reverts commit db8f530256.
2022-07-22 11:37:46 -04:00
Clebert Suconic db8f530256 ARTEMIS-3902 Adding reason to Audit Security Message 2022-07-22 11:22:30 -04:00
Clebert Suconic 79daf49105 [maven-release-plugin] prepare for next development iteration 2022-07-21 17:44:35 -04:00
Clebert Suconic cc4867ccba [maven-release-plugin] prepare release 2.24.0 2022-07-21 17:44:33 -04:00
AntonRoskvist e56b5ff53f ARTEMIS-3840 Core bridges with concurrency > 1 will get removed on config reload 2022-07-21 12:36:08 -04:00
Justin Bertram a2262612ca
ARTEMIS-3892 fix tests, add docs 2022-07-20 11:36:12 -05:00
Justin Bertram 688b894c62 ARTEMIS-3896 clarify logging for transactional ops
Both audit logging and logging from the LoggingActiveMQServerPlugin are
unclear as they relate to transactional sends and acks. Both essentially
ignore the transaction which makes it appear that an operation has taken
place when, in fact, it hasn't (e.g. a transactional ack is rolled back
but the log indicates the ack went through).

This commit fix this with the following changes:

 - Log details when a send or ack is added to a transaction.
 - Log details when the transaction is committed.
 - Log when the transaction is rolled back.
 - Include transaction details in the relevant DEBUG logs.
 - Simplify INFO level logging for sends & acks in
LoggingActiveMQServerPlugin. Ensure details are in the DEBUG logs.

Other changes:

 - Make capitalization more consistent in a handful of audit logs.
2022-07-20 11:35:18 -04:00
Yesenkov ff1fe7f6b5 ARTEMIS-3892 user limits not working with cert auth 2022-07-19 13:20:49 -04:00
Justin Bertram ff770d540d ARTEMIS-1964 fix and deprecate getNumberOfMessages() on AddressControl
AddressControl has 2 methods to get same metric. Both
getNumberOfMessages() and getMessageCount() return the same metric
albeit in different ways.

Also, getNumberOfMessages() inspects both "local" and "remote" queue
bindings which is wrong.

This commit fixes these issues via the following changes:

 - Deprecate getNumberOfMessages().
 - Change getNumberOfMessages() to invoke getMessageCount().
 - Add a test to ensure getNumberOfMessages() does not count remote
queue bindings.
 - Simplify getMessageCount(DurabilityType).
2022-07-19 13:08:23 -04:00
Clebert Suconic 8e54a65227 ARTEMIS-3767 Incompatibility on replication between 2.17 and current version 2022-07-18 16:34:31 -04:00
Gary Tully 7bc3b02809 ARTEMIS-3895 - treat properties url with trailing slash as directory of .properties files and apply in lexical order of name 2022-07-18 10:38:54 +01:00
Clebert Suconic 0f5bd28e23 ARTEMIS-2894 Small tweak into newInstance call 2022-07-14 11:55:24 +01:00
Gary Tully d3ed11da2a ARTEMIS-3894 - resolve errorprone warn on vargs call 2022-07-13 15:44:26 -04:00
Gary Tully 7ee820864b ARTEMIS-3894 - add conversion from string for list - allow core bridge static connector config via properties 2022-07-13 15:44:26 -04:00
Gary Tully 1f2543029c ARTEMIS-3891 - allow TransformerConfig creation via properties 2022-07-13 00:01:35 -04:00
Gary Tully 4a4765c39c ARTEMIS-3890 - rework LVQ implementation to ensure all messages get delivered, replacement of lvq now tied to the deliver loop. Fix issue with duplicates - bug in LinkedListImpl` 2022-07-13 00:01:16 -04:00
Clebert Suconic 68f6d8263d ARTEMIS-3743 / ARTEMIS-3766 Use ACKReason on Mirror to determine target operations and fixing Delivering statistics on Mirror
I merged these two JIRAs into one as I was doing an overal check on Mirroring
2022-06-29 19:20:03 -04:00
Robbie Gemmell 2ab0e85db4 ARTEMIS-3874: move/update various bits to allow removing many test-jar creations and dependencies 2022-06-27 09:52:54 -04:00
Ryan Highley 2123de415b ARTEMIS-3873 AMQP Broker Conn Encrypted Attrs
Adds support for ENC(...) attribute values for user and password on
amqp-connection.
2022-06-27 14:37:27 +02:00
Gary Tully 6d926719f4 ARTEMIS-3863 - allow Role configuration via properties 2022-06-23 09:41:33 +01:00
Clebert Suconic 9dd026118e ARTEMIS-3862 Short lived subscriptiong makes address size inconsistent 2022-06-17 16:57:35 -04:00
Clebert Suconic 342565d4c1 ARTEMIS-3850 Eliminate Page Soft Cache. Add Option to read messages based on sizing. 2022-06-14 14:53:14 -04:00
Clebert Suconic 0fab0dae91 [maven-release-plugin] prepare for next development iteration 2022-06-07 12:39:09 -04:00
Clebert Suconic 224ca0d4d7 [maven-release-plugin] prepare release 2.23.0 2022-06-07 12:39:07 -04:00
Clebert Suconic a2dd805a2f ARTEMIS-3848 High CPU usage on ReadWriteLocks
This is caused by too many entries on the HashMap for ThreadLocals.
Also: I'm reviewing some readlock usage on the StorageManager to simplify things a little bit.
2022-05-25 12:27:57 -04:00
Justin Bertram 466597e83b
ARTEMIS-3822 get broker name via management 2022-05-23 12:03:32 -05:00
Justin Bertram 974bd5f6e1
ARTEMIS-3808 support start/stop embedded web server via mngmnt
It would be useful to be able to cycle the embedded web server if, for
example, one needed to renew the SSL certificates. To support
functionality I made a handful of changes, e.g.:

 - Refactoring WebServerComponent so that all the necessary
   configuration would happen in the start() method.
 - Refactoring WebServerComponentTest to re-use code.
2022-05-23 10:57:49 -05:00
Gary Tully b390a6b08f ARTEMIS-3835 - deprecate addressesSettings in place of addressSettings on the Configuration bean 2022-05-18 08:13:17 +02:00
Gary Tully 168b61ec38 ARTEMIS-3826 - allow address/queue configuration via properties 2022-05-18 08:07:58 +02:00
Clebert Suconic bed9af2e51 ARTEMIS-3825 Improve Print-data output with non existing queues 2022-05-10 16:53:53 -04:00
Domenico Francesco Bruscino 7a03f58be9 ARTEMIS-3816 Fix connection router null pointer dereferences 2022-05-10 10:02:46 +02:00
Gary Tully d433f3bc3f ARTEMIS-3823 - limit modulo operation to positive hash values 2022-05-10 10:01:24 +02:00
Clebert Suconic e420eb4732 ARTEMIS-3817 SchedulePageCleanup operation on AddressControl 2022-05-09 09:17:56 -04:00
iliya 0b321ab8ff ARTEMIS-3759 Add mirror controller address filter support
Allow replication only certain addresses with mirror controller.
The configuration is similar to cluster address configuration.

Co-authored-by: Robbie Gemmell <robbie@apache.org>
2022-05-04 21:25:58 -04:00
Clebert Suconic ee51a7806d ARTEMIS-3811 Cluster connections clashing with ANYCast addresses
This is a test fix for AMQPClusterReplicaTest
2022-05-03 12:55:23 -04:00
Clebert Suconic 784b0e967e ARTEMIS-3810 Do not throw error resuming already active XA Transaction 2022-05-02 14:45:07 -04:00
Clebert Suconic 48cd586ac5 ARTEMIS-3807 Simplify Redistributor avoid races, and fix ProtocolMessageLoadBalancingTest
The control existing in Redistributor is not needed as the Queue::deliver will already have a control on re-scheduling the loop and avoid holding references for too long.
2022-04-29 08:24:06 -04:00
Clebert Suconic 57fa8b8271 [maven-release-plugin] prepare for next development iteration 2022-04-27 17:26:46 -04:00
Clebert Suconic 1a49845628 [maven-release-plugin] prepare release 2.22.0 2022-04-27 17:26:45 -04:00
Domenico Francesco Bruscino eb6264239e ARTEMIS-3803 Fix first NetworkHealthCheck execution
The NetworkHealthCheck hasn't to execute the default command if a custom
command is defined.
2022-04-26 17:11:48 -04:00
Clebert Suconic 5e6f599f80 ARTEMIS-3805 producer-window-size default 2022-04-26 16:14:14 -04:00
Clebert Suconic 28513e048f ARTEMIS-3753 Small Improvement on RouterContext.internalOnly calculation 2022-04-23 11:20:48 -04:00
iliya 99302b1935 ARTEMIS-3753 Prevent sending message to internal queues on mirror
In cluster configuration messages could be routed to internal queues for
further delivering on different broker. We need to check that before
sending to SNF, otherwise message can stuck on target server and will
never receive ACK.

co-author: Clebert Suconic

Discusssions on https://github.com/apache/activemq-artemis/pull/4012 and https://github.com/apache/activemq-artemis/pull/4038
2022-04-23 10:13:21 -04:00
Emmanuel Hugonnet 52a4157bbb [ARTEMIS-3756]: Enabling extra parameters to be passed by the URI.
* passing the full list of parameters when creating the URI.
 * moving the WARN message to DEBUG when unknown parameters are
   received.

Jira: https://issues.apache.org/jira/browse/ARTEMIS-3756
2022-04-21 19:00:55 -04:00
Justin Bertram 650952ba67 ARTEMIS-3755 mitigate NPE related to fail-back 2022-04-21 18:55:00 -04:00
Clebert Suconic 857f9f1db8 ARTEMIS-3765 Fixing testsuite
we cannot really change the attribute's name as it may break user's applications.
I am adding the previous property here.
2022-04-20 21:20:11 -04:00
Gary Tully f9f70aeb4c ARTEMIS-3786 - ensure named properties config from routerConfiguration can be created from string property value 2022-04-20 12:26:12 -04:00
aaron.hoffer d0574b39af
ARTEMIS-3765 Display validated user in Hawtio
This PR adds a "Validated User" column to the Hawtio plugin. The column is
not visible by default. The "Validated User" column is available in the
Session, Consumer, and Producer tabs of the artemis-navigation notebook.
"Validated User" is also available for sort and filtering in those view.
The "Validated Consumer" in the Producer view is always blank. I debugged
as far as I could, but did not find the cause of the issue.
2022-04-19 09:49:31 -05:00
iliya 20370d2920 ARTEMIS-3751 Do not override large message size
It is possible to receive a compressed message from the client as regular message. Such a message will already contain correct body size, that takes compression into account.
2022-04-18 15:01:44 -04:00
Clebert Suconic da5d5e504f ARTEMIS-3779 Critial IO Exception logged as Error 2022-04-14 18:04:06 -04:00
Clebert Suconic d0036ee0cc ARTEMIS-3778 Just avoiding NPE on Expiry Reaper
Added an extra check on null, just in case
it should not happen, but I preferred adding this clause on the safe side
2022-04-14 17:13:35 -04:00
Clebert Suconic f4bdacbc4c ARTEMIS-3778 Streamline Expiration Reaping
Instead of holding a thread and an iterator, we should instead keep moving to next references
without holding any threads. Just with callbacks.
2022-04-14 13:04:51 -04:00
Clebert Suconic bc17acd6da ARTEMIS-3776 Avoid Integer.MAX_VALUE overflow on openwire clients
Older versions of Openwire clients wil be affected by AMQ-6431.
As a result of the issue if the ID of the message>Integer.MAX_VALUE
a consumer configured with Failover and doing duplicate detection on the client
will not be able to process duplicate detection accordingly and miss messages.
2022-04-13 11:11:10 -04:00
Robbie Gemmell 9d943483d5 ARTEMIS-3772: update to mockito 4.4.0 2022-04-08 13:38:41 +01:00
Clebert Suconic cfdb710a08 ARTEMIS-3761 Improve page cleanup to remove messages in the middle of the stream as well
Paging only removes files at the beginning of the stream...
Say you have paged files 1 through 1000...
if all the messages are ack, but one message on file 1 is missing an ack, all the 999 subsequent files would not be removed until all the messages on file 1 is ack.
This was working as engineered, but sometimes devs don't have complete control on their app.
With this improvement we will now remove messages in the middle of the stream as well.

There is also some improvement to how browsing and page work with this
2022-04-07 10:33:08 -04:00
Clebert Suconic 1da68b3024 ARTEMIS-3769 Fixing queue browsing iterator avoiding NoSuchElement exception from the Iteration
QueueImpl::browserIterator could throw NoSuchElementException and this is fixing the iterator
Found this while testing ARTEMIS-3761
2022-04-07 10:33:08 -04:00
Clebert Suconic bad1c26582 NO-JIRA Making AmqpFlowControlFailTest more accurate
this test was relying on internal details such as number of credits on the link.
The test was flaky and eventually failing or hunging.
2022-04-07 10:33:08 -04:00
Gary Tully 825264257a ensure temp files are off the base class temp folder rule root to get cleaned up post test 2022-04-06 12:04:25 +02:00
Gary Tully a739b9f068 ARTEMIS-3757 - allow system and env var substution of properties config, respect order of file loaded properties and add generic enum converter 2022-04-06 12:04:25 +02:00
Justin Bertram 5d970576da
ARTEMIS-3741 Cache MBeanInfoHelper results
The utility methods in
`org.apache.activemq.artemis.core.management.impl.MBeanInfoHelper` are
executed *a lot* - especially for Jolokia which is used by the web
console. The `MBeanOperationInfo` and `MBeanAttributeInfo` results are
static and reflection is slow therefore they should not be calculated
over and over again. Rather they should be calculated once and cached
for later use.

Caching these results significantly improves performance. Over the
course of 1,000,000 invocations the difference is several orders of
magnitude. This improves usability substantially when dealing with,
for example, tens of thousands of addresses and/or queues.
2022-03-30 11:57:28 -05:00
Clebert Suconic a0e7cb4eae [maven-release-plugin] prepare for next development iteration 2022-03-22 13:34:58 -04:00
Clebert Suconic d57ac487c7 [maven-release-plugin] prepare release 2.21.0 2022-03-22 13:34:55 -04:00
Domenico Francesco Bruscino 41463c8397 ARTEMIS-3710 Deprecate queues config element 2022-03-22 09:37:31 -04:00
Domenico Francesco Bruscino 603462a1a5 ARTEMIS-3708 Collapse key transformer into policy 2022-03-21 19:34:48 -04:00
Clebert Suconic 5f22a51926 ARTEMIS-3720 Improvements on Paging MaxMessages usage
I "used" the broker a little bit around max-messages and found a few minor issues.
2022-03-21 16:51:22 -04:00
Clebert Suconic 192933cce3 NO-JIRA Simplifying some formatting in logging 2022-03-21 16:37:19 -04:00
Domenico Francesco Bruscino 90af0b3ea9 ARTEMIS-3709 Add group-rebalance-pause-dispatch attribute to queueType 2022-03-21 13:49:50 -04:00
Domenico Francesco Bruscino d0c550bcd7 ARTEMIS-3729 Fix JMS CORE client commit after async sends 2022-03-21 10:36:28 -04:00
Clebert Suconic 0966f2d7a0 ARTEMIS-3720 Max Number Of Messages on a deciding policy for paging (global and address-settings) 2022-03-18 16:27:46 -04:00
Justin Bertram 1ed7cc1efc ARTEMIS-3719 DLA and expiry incorrect w/temp-queue-namespace
When using a temporary queue with a `temporary-queue-namespace` the
`AddressSettings` lookup wasn't correct. This commit fixes that and
refactors `QueueImpl` a bit so that it holds a copy of its
`AddressSettings` rather than looking them up all the time. If any
relevant `AddressSettings` changes the
`HierarchicalRepositoryChangeListener` implementation will still
refresh the `QueueImpl` appropriately.

The `QueueControlImpl` was likewise changed to get the dead-letter
address and expiry address directly from the `QueueImpl` rather than
looking them up in the `AddressSettings` repository.

I modified some code that came from ARTEMIS-734, but I ran the test that
was associated with that Jira (i.e.
`o.a.a.a.t.i.c.d.ExpireWhileLoadBalanceTest`) and it passed so I think
that should be fine. There actually was no test included with the
original commit. One was added later so it's hard to say for sure it
exactly captures the original issue.
2022-03-14 15:26:20 -04:00
Robbie Gemmell 36dcb30cda ARTEMIS-3591: stop paging checkMemory task executing twice 2022-03-14 15:26:01 -04:00
Justin Bertram c376503f35 ARTEMIS-3699 expose actual port on NettyAcceptor
It sometimes makes sense to set an acceptor's port to 0 to allow the JVM
to select an ephemeral port (e.g. in embedded integration tests). This
commit adds a new getter on NettyAcceptor so tests can programmtically
determine the actual port used by the acceptor.

This commit also changes the ACCEPTOR_STARTED notification and the
related logging to clarify the actual port value where clients can
connect.
2022-03-04 13:53:06 +00:00
nbrendah 7bee0d8923 ARTEMIS-3686: Adding example showing how to do telemetry support
This is adding an example intercepting and sending messages using opentelemetry to either Jaeger, zipkin or OTLP exporter
2022-03-03 11:08:53 -05:00
gtully dcaebfb24e ARTEMIS-3660 - rename broker-balancer to connection-router 2022-03-01 11:15:16 +01:00
Domenico Francesco Bruscino 2398e5a16c
ARTEMIS-3685 Fix BridgeTransformer resolver 2022-02-28 20:43:06 -06:00
Domenico Francesco Bruscino 263351b331 ARTEMIS-3685 Fix BridgeImpl init 2022-02-28 13:45:20 -05:00
Justin Bertram 2d16ec3305
ARTEMIS-3685 fix a couple more issues 2022-02-28 10:12:05 -06:00
Justin Bertram b5c25e871c
ARTEMIS-3685 fix a couple of issues 2022-02-28 09:55:08 -06:00
Justin Bertram bc65438344
ARTEMIS-3687 bridges with concurrency > 1 can leak 2022-02-26 15:16:04 -06:00
Justin Bertram c51fda09cd
ARTEMIS-3685 support reloading bridges 2022-02-26 15:16:04 -06:00
franz1981 101c0d2cd0 ARTEMIS-3679 Brokers shutdown after daylight saving fall back 2022-02-23 06:53:49 +01:00
gtully cdcbfb2ae0
ARTEMIS-3627 - support 25k type postfix, same feature as xml config, for long values 2022-02-17 15:20:52 -06:00
AntonRoskvist 99b9d87bfd
ARTEMIS-2934 Add option to suppress SESSION notifications 2022-02-17 14:56:16 -06:00
Matteo Baccan dc1c269b36 Fixed a typo error "unkown" -> "unknown" 2022-02-17 10:29:58 -05:00
Emmanuel Hugonnet 20bbfe3afb [ARTEMIS-3682]: No way of knowing if a bridge was successfully deployed
or not.

 * deployBridge now returns a boolean to know if the deployment
   succeeded or not.

Issue: https://issues.apache.org/jira/browse/ARTEMIS-3682
2022-02-15 09:05:35 -05:00
Domenico Francesco Bruscino bac579ac25
ARTEMIS-3573 Support PropertiesLoginModule custom password codecs 2022-02-07 20:31:30 -06:00
AntonRoskvist bf83a9b3d1
ARTEMIS-3608 - Add distribution for Multicast messages to OFF_WITH_REDISTRIBUTION to avoid message loss 2022-02-07 20:06:45 -06:00
Luis De Bello cf73e895f3
ARTEMIS-3613: Deprecating stompMaxFramePayloadLength in favour of webSocketMaxFramePayloadLength 2022-02-07 19:44:18 -06:00
Domenico Francesco Bruscino 290e5016c8
ARTEMIS-3645 Support broker balancer cache persistence 2022-02-07 19:08:00 -06:00
Justin Bertram ec52682697
ARTEMIS-3145 ensure lock validity before releasing 2022-02-07 09:07:12 -06:00
Justin Bertram bafa0fbb3c ARTEMIS-3641 move to the latest checkstyle 2022-02-07 10:02:09 -05:00
nbrendah dbb4cd0a7a
ARTEMIS-2582: EmbeddedActiveMQ.stop() should check for null 2022-02-07 08:55:57 -06:00
Clebert Suconic 100e4abd7b ARTEMIS-3670 Fixing Divert Update tests 2022-02-06 11:44:18 -05:00
Justin Bertram e582ce03a5
ARTEMIS-3644 add cert info to CONNECTION_CREATED notification 2022-02-04 14:37:15 -06:00
Justin Bertram f18dd80dc8 ARTEMIS-3662 remove deprecated config from default broker.xml
The auto-create-jms-queues, auto-delete-jms-queues,
auto-create-jms-topics, and auto-delete-jms-topics address settings
were deprecated in ARTEMIS-881 way back in 2016. There's no need to keep
them in the default broker.xml at this point.
2022-02-04 13:49:32 -05:00
Justin Bertram 9c459eb313 ARTEMIS-2413 upgrade JGroups
JGroups 3.x hasn't been updated in some time now. The last release was
in April 2020 almost 2 years ago. Lots of protocols have been updated
and added and users are wanting to use them. There is also increasing
concern about using older components triggered mainly by other
recently-discovered high-profile vulnerabilities in the wider Open
Source Java community.

This commit bumps JGroups up to the latest release - 5.2.0.Final.
However, there is a cost associated with upgrading.

The old-style properties configuration is no longer supported. I think
it's unlikely that end-users are leveraging this because it is not
exposed via broker.xml. The JGroups XML configuration has been around
for a long time, is widely adopted, and is still supported. I expect
most (if not all) users are using this. However, a handful of tests
needed to be updated and/or removed to deal with this absence.

Some protocols and/or protocol properties are no longer supported. This
means that users may have to change their JGroups stack configurations
when they upgrade. For example, our own clustered-jgroups example had to
be updated or it wouldn't run properly.
2022-02-04 13:47:11 -05:00
AntonRoskvist 263b723726 ARTEMIS-3646 - OpenWire, Fix overflowing prefetch and incorrect metrics for messages sent to DLQ 2022-02-04 13:40:32 -05:00
Justin Bertram e184038d05 ARTEMIS-3670 support diverting to multiple addresses 2022-02-04 11:39:16 -05:00
Justin Bertram 8063110644 ARTEMIS-3638 Support MQTT 5
MQTT 5 is an OASIS standard which debuted in March 2019. It boasts
numerous improvments over its predecessor (i.e. MQTT 3.1.1) which will
benefit users. These improvements are summarized in the specification
at:
https://docs.oasis-open.org/mqtt/mqtt/v5.0/os/mqtt-v5.0-os.html#_Toc3901293

The specification describes all the behavior necessary for a client or
server to conform. The spec is highlighted with special "normative"
conformance statements which distill the descriptions into concise
terms. The specification provides a helpful summary of all these
statements. See:
https://docs.oasis-open.org/mqtt/mqtt/v5.0/os/mqtt-v5.0-os.html#_Toc3901292

This commit implements all of the mandatory elements from the
specification and provides tests which are identified using the
corresponding normative conformance statement. All normative
conformance statements either have an explicit test or are noted in
comments with an explanation of why an explicit test doesn't exist. See
org.apache.activemq.artemis.tests.integration.mqtt5 for all those
details.

This commit also includes documentation about how to configure
everything related to the new MQTT 5 features.
2022-02-04 09:57:15 -05:00
Clebert Suconic ba02fccb77 ARTEMIS-3664 Critical Analyzer should not HALT or STOP the broker during the startup 2022-01-31 13:33:20 -05:00
Robbie Gemmell 8661cecb8f ARTEMIS-3655: isolate the errorprone dependencies to its profiles, enable everywhere, fix related problems, and update to 2.10. 2022-01-26 16:32:34 +00:00
Robbie Gemmell ee52e3de7c ARTEMIS-3650: simplify distribution to leverage module poms for most of work, ensure their deps are present
Fixes/tidies some module definitions to set appropriate test/etc dep scopes and/or exclude bits not used or passed on for usage.
2022-01-26 10:09:18 +00:00
gtully e164a5b3b8 ARTEMIS-3627 - fix regression in CriticalCrashTest - statically configured converters were being lost on new custom bean utils 2022-01-25 19:22:36 +00:00
gtully c05177d723 ARTEMIS-3627 - allow default classpath properties name to be configured and use non intrusive property for testing, root cause of falure in test identified by ARTEMIS-3652 2022-01-24 17:18:34 +00:00
gtully 10d93d9c92 ARTEMIS-3627 - support broker.properties for augmenting or supplying additional configuration via nested properties of the internal configuratinimpl bean - elements with a name attribute can be configured in collections, the type inferred by the add singular fluent api 2022-01-19 14:39:27 +00:00
Justin Bertram 951c506481 ARTEMIS-3637 config-delete-diverts not applied properly
The address-setting config-delete-diverts is not being applied correctly
hierarchically because it's not included in the merge() method. It is
also not being persisted to disk either. This commit fixes both issues.
2022-01-12 21:06:40 -05:00
Clebert Suconic e34677f5c0 [maven-release-plugin] prepare for next development iteration 2021-12-14 22:50:55 -05:00
Clebert Suconic 3dea7eeb71 [maven-release-plugin] prepare release 2.20.0 2021-12-14 22:50:53 -05:00
AntonRoskvist 7d129b36e9 Commits: 'Add redistribution to old Anycast consumers' and 'Changed redistributionDelay-check to earlier, improved test, reverted changes in ClusterTestBase' 2021-12-14 09:22:05 -05:00
Justin Bertram fac7f1692a ARTEMIS-3601 expose acceptors via management 2021-12-14 08:52:48 -05:00
Justin Bertram 996f6f46fe ARTEMIS-3115 use correct call timeout defaults for cluster-connection 2021-12-13 21:56:45 -06:00
Marlon Müller 47e947ad7b ARTEMIS-3542 Avoid requesting LDAP root attribute
Check getAttributes with dn of user entry to avoid missing permissions
2021-12-13 21:55:32 -06:00
Clebert Suconic 1e62979577 ARTEMIS-3604 Async sends overflowing server in OpenWire 2021-12-10 15:49:26 -05:00
gtully 158157260c ARTEMIS-2097 - via elastic queue use case test based on ARTEMIS-3365 and ARTEMIS-3569
scenario - avoid paging, if address is full chain another broker and produce to the head, consume from the tail using producer and consumer roles to partition connections. When tail is drained, drop it.
 - adds a option to treat an idle consumer as slow
 - adds basic support for credit based address blocking ARTEMIS-2097
 - adds some more visiblity to address memory usage and balancer attribute modifier operations
2021-12-09 10:14:20 +00:00
gtully 56299e846a ARTEMIS-3054 - fix lock inversion - intermittent failure of PageCleanupWhileReplicaCatchupTest and hang 2021-12-09 10:13:26 +00:00
gtully e0b16217a1 ARTEMIS-3594 - add support for a local target key transformer and an instance of CONSISTENT_HASH_MODULO that can be used to partition in a static cluster 2021-12-07 13:17:37 +00:00
Domenico Francesco Bruscino 3f7f8c0ecd ARTEMIS-3576 Fix toString methods throwing exceptions 2021-12-03 13:15:44 -05:00
Clebert Suconic 5730fcacfa ARTEMIS-3599 Removing finalization calls 2021-12-03 13:12:02 -05:00
franz1981 7e6373d4df ARTEMIS-3578 Save SimpleString duplication and long[] allocation while moving Core messages 2021-12-01 10:27:46 +01:00
franz1981 185236f74d ARTEMIS-3577 Save Core msg re-encoding due to msg copy 2021-12-01 10:27:46 +01:00
franz1981 ad4f6a133a ARTEMIS-3021 OOM due to wrong CORE clustered message memory estimation 2021-12-01 10:27:46 +01:00
Clebert Suconic 12a93e3c7e Revert "ARTEMIS-3576 Fix toString methods throwing exceptions"
This reverts commit fcd512f9de.

this will be re-applied after fixing the build and tests
2021-11-29 13:21:24 -05:00
Justin Bertram 5fe42dd0c4 ARTEMIS-3552 NPE on message expiration 2021-11-29 12:13:14 -05:00
Domenico Francesco Bruscino fcd512f9de ARTEMIS-3576 Fix toString methods throwing exceptions 2021-11-29 12:02:58 -05:00
Domenico Francesco Bruscino f8472fd736 ARTEMIS-3569 Validate users on AMQP remote open 2021-11-24 11:28:16 +01:00
gtully b979189187 ARTEMIS-3569 - balancer role_name local target, matches role of authenticated user 2021-11-24 11:28:16 +01:00
Clebert Suconic bfc10dcf8b ARTEMIS-3546 Jakarta javax.json incompability on jakarta all client
Domenico Bruscino provided the JSON Wrapper used here. Thanks Domenico!
2021-11-19 13:20:38 -05:00
gtully 8d50aa916c ARTEMIS-3581 - allow max-size-bytes=0 configuration force paging for an address, independent of the page-size-bytes 2021-11-18 09:44:13 +00:00
gtully 778ab4419f ARTEMIS-3575 - ensure message owner is set from journal reload, follow up on ARTEMIS-3067 2021-11-16 11:33:26 -05:00
Erwin Dondorp dde48d052f ARTEMIS-3556 show message protocol on message-view page 2021-11-10 20:46:55 -05:00
Clebert Suconic 98a6e42a57 ARTEMIS-3554 Invalid Prepared Transaction could interrupt server reload 2021-11-05 10:14:43 -04:00
Justin Bertram 4367ec40a6 ARTEMIS-649 deprecate the HTML based JMX reports
The HTML output methods are hold-overs from way back when the code-base
started off as JBoss Messaging 2 and the broker mainly ran in JBoss AS 4
and 5 which leveraged an HTML-based JMX console where these methods
would be executed and spit out nicely formatted data. That stuff has all
long since been retired so this commit deprecates the HTML-based
management methods so they can be removed completely in a future release.
JSON is a better structured output format for this and most of the
deprecated methods have JSON alternatives.
2021-11-04 11:36:49 -04:00
Clebert Suconic 8b3663e827 ARTEMIS-3538 Removing a few extra // ----- structural comments 2021-11-02 21:45:09 -04:00
Asukwo-comfort 923e4cc892 ARTEMIS-3538: Removing // --------- comments from the codebase 2021-11-02 21:44:12 -04:00
Clebert Suconic 1d0c0a8897 ARTEMIS-3541 createQueue ignoring autoDeleteAddress flag
Commit 481b73c8ca from ARTEMIS-3502
inadvertently broke this functionality. This commit restores the
original behavior.

autoDeleteAddress was renamed to forceAutoDeleteAddress which will ignore the address settings.

delete temporary queues will use forceAutoDeleteAddress=true.

this is done in collaboration with Justin Bertram
2021-11-02 08:56:15 -04:00
gtully c6b85ea4e3 ARTEMIS-1925 - fix test regression - isHighAcceptPriority does not need to check for off_with_redistribution 2021-11-01 13:08:26 +00:00
gtully 1839461204 ARTEMIS-3489 - fix JdbcLeaseLockTest fails sporadically in CI 2021-11-01 09:35:39 +00:00
pahamala a0c4cba7e1 ARTEMIS-3140 Extra options in LDAP login module
Adds support for extra configuration options to LDAP login module to
prepare for supporting any future/custom string configuration in LDAP
directory context creation.

Details:

 - Changed LDAPLoginModule to pass any string configuration not
recognized by the module itself to the InitialDirContext contruction
environment.
 - Changed the static LDAPLoginModule configuration key fields to an
enum to be able to loop through the specified keys (e.g. to filter out
the internal LDAPLoginModule configuration keys from the keys passed to
InitialDirContext).
 - Few fixes for issues reported by static analysis tools.
 - Tested that LDAP authentication with TLS+GSSAPI works against a
recent Windows AD server with Java
OpenJDK11U-jdk_x64_windows_hotspot_11.0.13_8 by setting the property
com.sun.jndi.ldap.tls.cbtype (see ARTEMIS-3140) in JAAS login.conf.
 - Moved LDAPLoginModuleTest to the correct package to be able to
access LDAPLoginModule package privates from the test code.
 - Added a test to LDAPLoginModuleTest for the task changes.
 - Updated documentation to reflect the changes.
2021-10-29 12:19:30 -05:00
gtully 2167ac2e30 ARTEMIS-1925 - ensure OFF_WITH_REDISTRIBUTION behaves like OFF for initial routing 2021-10-29 13:37:17 +01:00
Clebert Suconic fdc0cc591c ARTEMIS-3523 Small tweaks into AddressControl delegation 2021-10-21 13:20:19 -04:00
nbrendah ebf8adc72b ARTEMIS-3523: Created delegated methods replay in addressControl 2021-10-21 13:20:06 -04:00
Domenico Francesco Bruscino dca3facb55 ARTEMIS-3495 Fix backup cluster controller connection loops
Skip backup connector equivalent to cluster connector for cluster connections.
2021-10-21 10:46:59 +01:00
Justin Bertram 6d52f20edd ARTEMIS-3530 space in role list breaks user listing 2021-10-21 10:44:29 +01:00
gtully 925ceadffa ARTEMIS-3433 - allow null return and throw error only startup usage paths 2021-10-21 10:35:43 +01:00
gtully 3259791bbb ARTEMIS-3533 - respect extra url parameters from federation connector-ref 2021-10-20 09:44:21 +01:00
gtully cf85d35355 ARTEMIS-3308 - support federation of large messages 2021-10-20 09:43:11 +01:00
Clebert Suconic a833d95c1f ARTEMIS-3461 Generalize MBean Support on Messages and avoid converstion to core on AMQP Messages on console browsing
Done in collaboration with Erwin Dondorp through https://github.com/apache/activemq-artemis/pull/3794/
2021-10-17 11:25:27 -04:00
Clebert Suconic 1d84800d5a ARTEMIS-3529 Expire should not reject messages from duplicateID 2021-10-13 19:11:40 -04:00
Clebert Suconic 2383aa0125 ARTEMIS-3525 Empty Auto Created queues should be removed on restart 2021-10-12 12:54:48 -04:00
gtully 6f4c609ee0 ARTEMIS-3496 - add test to verify no reconnect on locators - mokito based and quite involved 2021-10-12 10:14:30 +01:00
franz1981 1dc9d4f455 ARTEMIS-3496 Replica connection to its live should fail fast 2021-10-12 10:14:30 +01:00
Justin Bertram 402842062a [maven-release-plugin] prepare for next development iteration 2021-10-11 13:35:57 -05:00
Justin Bertram 5fcb763234 [maven-release-plugin] prepare release 2.19.0 2021-10-11 13:35:06 -05:00
Justin Bertram c3d93f5590 ARTEMIS-3313 routing-type conflict during import/export 2021-10-08 08:09:21 -05:00