Commit Graph

1108 Commits

Author SHA1 Message Date
Robbie Gemmell f6bca09afa ARTEMIS-3954: add more detail to core-client javadoc around the session and children thread model being like the JMS client 2022-08-23 13:30:15 +01: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 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
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
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
Gary Tully 6d926719f4 ARTEMIS-3863 - allow Role configuration via properties 2022-06-23 09:41:33 +01: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 578f2fb5cf ARTEMIS-3856 re-applying recursive logic on ThreadLocal 2022-06-10 00:53:28 -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
Justin Bertram 446ff61542
ARTEMIS-3770 refactor MQTT handling of client ID
It would be useful for security manager implementations to be able to
alter the client ID of MQTT connections.

This commit supports this functionality by moving the code which handles
the client ID *ahead* of the authentication code. There it sets the
client ID on the connection and thereafter any component (e.g. security
managers) which needs to inspect or modify it can do so on the
connection.

This commit also refactors the MQTT connection class to extend the
abstract connection class. This greatly simplifies the MQTT connection
class and will make it easier to maintain in the future.
2022-05-09 14:51:06 -05:00
Clebert Suconic e420eb4732 ARTEMIS-3817 SchedulePageCleanup operation on AddressControl 2022-05-09 09:17:56 -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
Clebert Suconic 5e6f599f80 ARTEMIS-3805 producer-window-size default 2022-04-26 16:14:14 -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
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
Vilius Šumskas d42d654874
NO-JIRA addUser is also applicable for ActiveMQBasicSerurityManager 2022-03-30 11:56:46 -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
Emmanuel Hugonnet 3dc434a311 [ARTEMIS-3732]: ServerLocator disableFinalizeCheck method has been removed without being deprecated first.
* Adding back empty default method for retro compatibility.

Jira: https://issues.apache.org/jira/browse/ARTEMIS-3732
2022-03-21 16:50:00 -04:00
Justin Bertram 842ac1df5d ARTEMIS-3676 ignore NoRouteToHostException
This kind of exception can be common in cloud environments and should be
ignored for logging just like ConnectException.
2022-03-21 13:49:26 -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
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
AntonRoskvist 99b9d87bfd
ARTEMIS-2934 Add option to suppress SESSION notifications 2022-02-17 14:56:16 -06:00
Justin Bertram 0bc7bf3f7c
ARTEMIS-3677 add more tests 2022-02-14 12:23:16 -06:00
Justin Bertram 7b25cbb51d
ARTEMIS-3677 add test, etc. 2022-02-10 12:00:17 -06:00
Justin Bertram 51a25b4ba4
ARTEMIS-3677 mitigate NPE when browsing messages 2022-02-10 10:30:03 -06:00
Luis De Bello cf73e895f3
ARTEMIS-3613: Deprecating stompMaxFramePayloadLength in favour of webSocketMaxFramePayloadLength 2022-02-07 19:44:18 -06:00
Justin Bertram e582ce03a5
ARTEMIS-3644 add cert info to CONNECTION_CREATED notification 2022-02-04 14:37:15 -06: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
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
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
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 54f4cb560c ARTEMIS-3636 LinkedListImpl leak on mesage consume error 2022-01-11 16:55:40 -05:00
Clebert Suconic 2e89dc25b6 NO-JIRA Notice update to 2022 2022-01-06 15:31:01 -05:00
franz1981 46d1fa66f7 ARTEMIS-3618 Faster Artemis CORE client MessageListener::onMessage without SecurityManager 2021-12-20 14:22:44 -05:00
Emmanuel Hugonnet dd645d0d4e [ARTEMIS-3607]: Supporting JsonValues in JsonUtil.addToArray and
JsonUtil.addToObject

* When the added Object is of type JsonValue, don't call the toString
  method on it.

Issue: https://issues.apache.org/jira/browse/ARTEMIS-3607
2021-12-15 08:45:19 -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
Ryan Yeats e460bea4b8 ARTEMIS-3596 Pass class loader to ServiceLoader.load to fix OSGi issues 2021-12-14 13:19:41 -05:00
Justin Bertram fac7f1692a ARTEMIS-3601 expose acceptors via management 2021-12-14 08:52:48 -05:00
Justin Bertram fb2270dc05 ARTEMIS-3535 bytes messages not obeying management limit 2021-12-13 21:58:03 -06: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
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
Clebert Suconic 72a4fff167 ARTEMIS-3593 Defense against OME on parsing XID
Co-authored-by: Viktor Kolomeyko <Viktor.Kolomeyko@r3.com>
2021-12-02 21:15:41 -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 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
Domenico Francesco Bruscino fcd512f9de ARTEMIS-3576 Fix toString methods throwing exceptions 2021-11-29 12:02:58 -05: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
Erwin Dondorp dde48d052f ARTEMIS-3556 show message protocol on message-view page 2021-11-10 20:46:55 -05: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
Justin Bertram 82645aa4e9 ARTEMIS-2293 addPacket in LargeMessageControllerImpl won't notifyAll for exception 2021-11-02 21:54:24 -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
Robbie Gemmell 3f9de5fa30 ARTEMIS-3461: add some tests and resolve various issues spotted with the prior changes
- Avoid blowing up on string bodies of any size if the valueSizeLimit bits are configured to disable limit
- Dont NPE if amqp-value + binary body is sent without a content-type, as it always should be.
- Include expected prefix when adding delivery delay and ingress time annotations.
- Use the actual name for ingress time annotation, as with all other annotations.
- Use correct object type when testing equality with content-type value.
- Use consistent case for 'groupId' in different properties.
2021-11-01 17:08:15 -04:00
Robbie Gemmell ea8fe11c6d ARTEMIS-3363: add a couple of assertions for completeness (+fix deprecation warning) 2021-11-01 18:33:51 +00:00
domson-tech 89253b8513 ARTEMIS-3547 remove first field to improve code
first field is not necessary here, only pos field can work.
So remove first here.
2021-11-01 09:35:10 -04:00
Domenico Francesco Bruscino 14f8e8d5ab ARTEMIS-3363 Fix TransportConfiguration extraParams equals 2021-10-21 13:27:33 -04:00
nbrendah ebf8adc72b ARTEMIS-3523: Created delegated methods replay in addressControl 2021-10-21 13:20:06 -04:00
Domenico Francesco Bruscino 5b33140323 ARTEMIS-3363 Fix TransportConfiguration extraProps encoding 2021-10-21 10:53:18 +01: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 cf85d35355 ARTEMIS-3308 - support federation of large messages 2021-10-20 09:43:11 +01:00
Clebert Suconic 1db3ae1dc0 ARTEMIS-3529 Fixing integration tests after Web Console Parsing of Large Messages 2021-10-19 23:00:51 -04:00
Clebert Suconic 54418dfcaf ARTEMIS-3529 Fixing test and tweaks on properties 2021-10-19 17:43:01 -04:00
Clebert Suconic 6bb4aa7a10 ARTEMIS-3529 Moving addItem from AMQP and Core into upper class 2021-10-17 20:06:51 -04: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
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
franz1981 95d2de5aa4 NO-JIRA Save double property lookup on common case 2021-10-11 08:46:58 -04:00
Justin Bertram c3d93f5590 ARTEMIS-3313 routing-type conflict during import/export 2021-10-08 08:09:21 -05:00
Robbie Gemmell a5b5a504e0 ARTEMIS-3038: unwind effect of defunct changes from ARTEMIS-1264
Follows earlier test removal in a3de3d4c75
2021-10-07 10:45:02 +01:00
Clebert Suconic 481b73c8ca ARTEMIS-3502 Auto delete & auto create leading to inconsistencies 2021-10-05 17:53:30 -04:00
Andy Taylor e37175784c ARTEMIS-3493 - expose User ID (JMS Message ID) in send tab of console
https://issues.apache.org/jira/browse/ARTEMIS-3493
2021-09-28 08:11:26 +01:00
Emmanuel Hugonnet fa439375e9 [ARTEMIS-3494]: ActiveMQClientProtocolManagerFactory shouldn't have a private constructor.
* Removing the 'private' constructor
* Removing the use of a static getInstance

Issue: https://issues.apache.org/jira/browse/ARTEMIS-3494
2021-09-23 11:28:06 +02:00
Robbie Gemmell 515ac3a7cb ARTEMIS-3475: fix recursion and duplicate class name print from 2481a784f3 2021-09-17 15:48:48 +01:00
Emmanuel Hugonnet f19337901a [ARTEMIS-2545]: Auto queue creation does not work with MDBs.
* Adding support for queue autocreation from the resource adapter.

Issue: https://issues.apache.org/jira/browse/ARTEMIS-2545
2021-09-16 10:44:54 -04:00
Clebert Suconic c3b403a980 ARTEMIS-3482 Removing non used methods and some reorg on message methods 2021-09-15 09:17:01 -04:00
Clebert Suconic 2481a784f3 ARTEMIS-3475 avoiding possible recursion on toString and improving overal PacketImpl toString 2021-09-13 14:51:55 -04:00
Clebert Suconic 6385e471e4 Revert "ARTEMIS-3365 Avoid infinite loop on toString"
This reverts commit c67441664f.
2021-09-13 14:51:55 -04:00
Clebert Suconic c67441664f ARTEMIS-3365 Avoid infinite loop on toString 2021-09-13 10:08:24 -04:00
franz1981 a4c311f368 ARTEMIS-3449 Speedup AMQP large message streamig 2021-09-08 15:22:22 -04:00
Clebert Suconic 0266582a8f ARTEMIS-3441 Remove a few finalize methods 2021-08-24 19:08:00 -04:00
Clebert Suconic 4d2fd89882 ARTEMIS-3436 Journal Replay operation 2021-08-24 19:07:15 -04:00
Clebert Suconic ed4c915d50 ARTEMIS-3434 Fixing Journal Retention Wrong month 2021-08-20 11:22:33 -04:00
Justin Bertram 82f0ece67c ARTEMIS-3329 ability to purge all queues on address 2021-08-18 12:33:01 -04:00
Clebert Suconic b8c64590f9 [maven-release-plugin] prepare for next development iteration 2021-08-09 11:58:28 -04:00
Clebert Suconic 37cc298973 [maven-release-plugin] prepare release 2.18.0 2021-08-09 11:58:27 -04:00
Clebert Suconic cc4a51a3ea [maven-release-plugin] prepare for next development iteration 2021-08-06 17:04:18 -04:00
Clebert Suconic 0b30187091 [maven-release-plugin] prepare release 2.18.0 2021-08-06 17:04:16 -04:00
Clebert Suconic 0e2ce484ba [maven-release-plugin] prepare for next development iteration 2021-08-06 13:46:56 -04:00
Clebert Suconic cb705b5c5c [maven-release-plugin] prepare release 2.18.0 2021-08-06 13:46:54 -04:00
Domenico Francesco Bruscino 9fd1d5941d ARTEMIS-3365 Fix NPE on CORE client disconnecting 2021-08-06 18:48:49 +02:00
Domenico Francesco Bruscino 3555dd7d25 ARTEMIS-3365 Add broker balancers 2021-08-06 08:33:21 -04:00
Domenico Francesco Bruscino 6d2b96c79e ARTEMIS-3275 Lock CORE client communication during failover retries 2021-08-06 08:32:59 -04:00
gtully ca7a100de0 ARTEMIS-3340 Sequential activation tracking for pluggable quorum replication policies + peer
Co-authored-by: franz1981 <nigro.fra@gmail.com>
2021-08-05 14:18:20 -04:00
Francesco Nigro 536271485f ARTEMIS-2716 Pluggable Quorum Vote 2021-08-05 14:18:20 -04:00
Clebert Suconic feddd94276 NO-JIRA Updating parameter description 2021-08-04 17:08:11 -04:00
Domenico Francesco Bruscino a741ae9994 ARTEMIS-3367 Set verifyHost true for connectors by default 2021-08-03 18:14:51 -04:00
Clebert Suconic 813ed88ecb ARTEMIS-3243 Implementing dual mirror with Broker Connections
There are some major tests added as part of this PR.

This PR has been done through an extensive collaboration with Robbie Gemmel on https://github.com/apache/activemq-artemis/pull/3633
2021-08-03 16:50:43 -04:00
Justin Bertram 516f3425e7 ARTEMIS-3393 support securityDomain on in-vm acceptor 2021-08-03 10:19:22 -04:00
Justin Bertram 7a9de8eea3 ARTEMIS-3302 swap deprecated X509Certificate
Casting the result of getPeerCertificates() to X509Certificate[] mirrors
what is done in the ActiveMQ "Classic" code-base.

A few tests which were imported from ActiveMQ "Classic" to verify our
OpenWire implementation were removed as they relied on a "stub"
implementation of javax.net.ssl.SSLSession that never would have worked
across multiple JDKs once javax.security.cert.X509Certificate[] was
removed. Furthermore, the tests appeared to be related to the OpenWire
*client* and not relevant to our broker-side implementation.
2021-08-03 09:55:36 -04:00
Andy Taylor c358688fd6 ARTEMIS-3404 - expose max retry interval on bridge mbean
https://issues.apache.org/jira/browse/ARTEMIS-3404
2021-08-03 09:07:39 -04:00
Justin Bertram b7f9807cd9 ARTEMIS-2919 support timestamping incoming messages 2021-07-06 14:09:00 -05:00
Justin Bertram 1d02d06eab ARTEMIS-3374 config-managed queue can be deleted by durable subscriber 2021-07-06 14:06:39 -05:00
Robbie Gemmell 567c4fc16b ARTEMIS-3155: fix javadoc error introduced in #3624 2021-06-15 12:53:43 +01:00
Justin Bertram 867bf5e01e ARTEMIS-3155 support better backwards compatibility
Support better backwards compability for SSL keyStoreProvider and
trustStoreProvider.
2021-06-14 18:04:06 -04:00
Markus Meierhofer 3b1f6eee7d ARTEMIS-3337: Correctly handle multiple connection failures
Previously, when during reconnect one session couldn't be transferred
to the new connection, we instantly returned and didn't execute failover
for the other sessions. This produced the issue that for sessions
where no failover was executed, their channels were still present on the
old connection. When the old connection was then destroyed, these channels
were closed although the reconnect was still ongoing, which lead to
"dead" sessions.

Now, if a session failover fails, for the remaining sessions the "client-side" part
of failover is executed, which removes the sessions from the old connection so that
they are not closed when the old connection is closed afterwards.
2021-06-14 16:36:23 -04:00
Justin Bertram 26b83985cf ARTEMIS-3330 JMS session stopped on failed rollback 2021-06-07 15:00:34 -04:00
Clebert Suconic 7137252c5d NO-JIRA fixing spelling udpate as update 2021-06-03 10:43:11 -04:00
Robbie Gemmell c993b5a0e9 NO-JIRA: fix javadoc errors on JDK11+, enable CI javadoc check on JDK11+ 2021-06-02 17:37:06 +01:00
franz1981 14dddb04d7 ARTEMIS-3280 Netty Pool micrometer metric plugin 2021-05-27 13:32:06 -05:00
Domenico Francesco Bruscino ba6422d45f ARTEMIS-3315 Fix JSON serialization of AMQP messages
Replace the JSON serialization errors for unknown types with their respective string representation.
2021-05-27 11:31:25 -04:00
Erwin Dondorp d50fbc4908 ARTEMIS-3258 added warning for url parameters that are explicitly ignored 2021-05-24 13:38:07 -05:00
Domenico Francesco Bruscino e03c4fe193 ARTEMIS-3309 Add a parameter to limit messages to move or transfer 2021-05-24 14:09:20 -04:00
Justin Bertram 81bbca15c1 ARTEMIS-3229 add details to AdressControl MBean 2021-05-24 11:51:14 -05:00
Jacob Middag 6b86770079 NO-JIRA Fix description of DiskStoreUsage
In 73c4e399d9 a description is added to DiskStoreUsage. It incorrectly describes the diskStoreUsage as a percentage. This commit changes it to a fraction which it is (also before the description change). A percentage would be better, since MaxDiskUsage is also specified as percentage.
2021-04-19 12:47:29 -04:00
Domenico Francesco Bruscino b4789a894f ARTEMIS-3221 Migrating to Jakarta EE 8 artifacts 2021-04-09 11:49:59 -04:00
Justin Bertram 186481bbe8 ARTEMIS-3155 differentiate SSL store type and provider
The provider of an SSL key/trust store is different from that store's
type. However, the broker currently doesn't differentiate these and uses
the provider for both. Changing this *may* potentially break existing
users who are setting the provider, but I don't see any way to avoid
that. This is a bug that needs to be fixed in order to support use-cases
like PKCS#11.

Change summary:
 - Added documentation.
 - Consolidated several 2-way SSL tests classes into a single
   parameterized test class. All these classes were essentially the same
   except for a few key test parameters. Consolidating them avoided
   having to update the same code in multiple places.
 - Expanded tests to include different providers & types.
 - Regenerated all SSL artifacts to allow tests to pass with new
   constraints.
 - Improved logging for when SSL handler initialization fails.
2021-03-24 09:08:33 -04:00
dhawkins 4f4231f629 ARTEMIS-3156 Better support for PKCS #11 2021-03-24 09:08:33 -04:00
franz1981 7bd2a4d080 ARTEMIS-3045 NettyConnection should null-check Netty buffer 2021-03-24 09:07:46 -04:00
Andy Taylor bb94d0a5b3 ARTEMIS-3196 - expose journal pool files in JMX
https://issues.apache.org/jira/browse/ARTEMIS-3196
2021-03-23 10:01:24 +00:00
gtully 02bb7031c2 ARTEMIS-3175 - implement address setting management-message-attribute-size-limit to sensibly limit data returned by list/browse/filter management ops 2021-03-23 09:48:45 +00:00
AntonRoskvist e9e1e476ee ARTEMIS-3198 Add concurrency option on core bridges 2021-03-22 19:13:06 -04:00
Erwin Dondorp 1a4fd1d7ae NO-JIRA Cosmetic logging change
prevent items in a debug line to be joined; and 2 additional small inconsistencies for the same
2021-03-16 18:06:38 -04:00
Clebert Suconic f49a163427 ARTEMIS-3137 Fixing Test with wrong message type on Xpath and Core 2021-03-10 21:44:07 -05:00
Justin Bertram eb26f67ab6 ARTEMIS-3137 support XPath filters
Change summary:
 - Remove the existing Xalan-based XPath evaluator since Xalan appears
   to be no longer maintained.
 - Implement a JAXP XPath evaluator (from the ActiveMQ 5.x code-base).
 - Pull in the changes from https://issues.apache.org/jira/browse/AMQ-5333
   to enable configurable XML parser features.
 - Add a method to the base Message interface to make it easier to get
   the message body as a string. This relieves the filter from having
   to deal with message implementation details.
 - Update the Qpid JMS client to get the jms.validateSelector parameter.
2021-03-10 09:32:23 -05:00
franz1981 bc83b31232 ARTEMIS-3133 Reduce memory usage for Null an Ping packets 2021-03-03 13:51:05 -05:00
sebthom 026f3859a2 ARTEMIS-3117 Provide CachingOpenSSLContextFactory
to mitigate performance degradation in JDK 11 during TLS connection
initialization.
2021-03-03 10:06:45 -06:00
franz1981 6c7231928f ARTEMIS-3138 Shared Nothing Live broker shouldn't try to connect to itself (2) 2021-02-25 10:19:02 -05:00
gtully a0ce3812ba ARTEMIS-3067, ARTEMIS-3135 - rework accounting for lazy decoding by directly referencing the owning page store, owner now tracked on a message rather than the message reference. This avoids the error prone checks around potential decoding sites 2021-02-24 15:50:13 +00:00
franz1981 6126d926dd ARTEMIS-3045 ReplicationManager can batch sent replicated packets 2021-02-19 15:18:20 -05:00
Clebert Suconic 21ee5985ea [maven-release-plugin] prepare for next development iteration 2021-02-11 12:00:04 -05:00
Clebert Suconic 36a771150b [maven-release-plugin] prepare release 2.17.0 2021-02-11 11:59:51 -05:00
Clebert Suconic c0867f0361 [maven-release-plugin] prepare for next development iteration 2021-02-09 12:12:48 -05:00
Clebert Suconic 9b473698e0 [maven-release-plugin] prepare release 2.17.0 2021-02-09 12:12:35 -05:00
Clebert Suconic 6ed1e4c87d [maven-release-plugin] prepare for next development iteration 2021-02-08 15:56:31 -05:00
Clebert Suconic 06b29806ca [maven-release-plugin] prepare release 2.17.0 2021-02-08 15:56:18 -05:00
Ingo Karkat 044d6101e9 ARTEMIS-3081 Swap precedence of key/tr.store props
If an application wants to use a special key/truststore for Artemis but
have the remainder of the application use the default Java store, the
org.apache.activemq.ssl.keyStore needs to take precedence over Java's
javax.net.ssl.keyStore. However, the current implementation takes the
first non-null value from
  System.getProperty(JAVAX_KEYSTORE_PATH_PROP_NAME),
  System.getProperty(ACTIVEMQ_KEYSTORE_PATH_PROP_NAME),
  keyStorePath

So if the default Java property is set, no override is possible. Swap
the order of the JAVAX_... and ACTIVEMQ_... property names so that the
ActiveMQ ones come first (as a component-specific overrides), the
standard Java ones comes second, and finally a local attribute value
(through Stream.of(...).firstFirst()).

(In our case the application uses the default Java truststore location
at $JAVA_HOME/lib/security/jssecacerts, and only supplies its password
in javax.net.ssl.trustStorePassword, and then uses a dedicated
truststore for Artemis. Defining both org.apache.activemq.ssl.trustStore
and org.apache.activemq.ssl.trustStorePassword now makes Artemis use the
dedicated truststore (javax.net.ssl.trustStore is not set as we use the
default location, so the second choice
org.apache.activemq.ssl.trustStore applies), but with the Java default
truststore password (first choice javax.net.ssl.trustStorePassword
applies instead of the second choice because it is set for the default
truststore). Obviously, this does not work unless both passwords are
identical!)
2021-02-03 12:02:19 -05:00
Tomas Hofman ebeea15c2a ARTEMIS-3074 Add ActiveMQServerControl#createBridge() method variant accepting a JSON string 2021-02-01 19:21:40 -05:00
Justin Bertram 4fbc8bf67d ARTEMIS-3008 mngmnt op to reload config file 2021-01-25 13:35:19 -06:00
franz1981 2e0f051d2d ARTEMIS-3063 AMQPMessage get property can use a String switch 2021-01-12 12:07:23 +01:00
Andy Taylor ea7f001776 ARTEMIS-3043 - improvements on new console
https://issues.apache.org/jira/browse/ARTEMIS-3043
2021-01-06 10:47:57 -05:00
franz1981 2b585508cc ARTEMIS-3025 JsonReader char[] leak 2020-12-09 10:55:09 -06:00
Domenico Francesco Bruscino 383ec0870e NO-JIRA Mask ssl context log passwords 2020-12-08 10:44:29 -05:00
Clebert Suconic e6a6e81b02 ARTEMIS-3019 expiry changes in AMQP Large Message 2020-12-07 10:44:51 -05:00
sebthom 80c51803da ARTEMIS-3001 Provide address and queue count via ActiveMQServerControl
See https://issues.apache.org/jira/browse/ARTEMIS-3001
2020-11-17 15:55:50 -05:00
Justin Bertram 1551983a73 ARTEMIS-2961 reset TLS values w/forceSSLParameters 2020-11-12 11:06:35 -05:00
Domenico Francesco Bruscino 14ec3cb7b0 ARTEMIS-2976 Remove password before creating server locator 2020-11-05 11:39:35 -05:00
Robbie Gemmell 5ff075b7ff ARTEMIS-2971: add ANONYMOUS and EXTERNAL SASL mechanism support for outgoing AMQP server connections 2020-11-05 11:32:35 -05:00
Clebert Suconic 4e7bb97df7 [maven-release-plugin] prepare for next development iteration 2020-11-02 17:45:51 -05:00
Clebert Suconic 9768017530 [maven-release-plugin] prepare release 2.16.0 2020-11-02 17:45:38 -05:00
Clebert Suconic 28919b6ad8 [maven-release-plugin] prepare for next development iteration 2020-10-30 10:16:29 -04:00
Clebert Suconic af5ca9f1e6 [maven-release-plugin] prepare release 2.16.0 2020-10-30 10:16:17 -04:00
Clebert Suconic 8499eac76c ARTEMIS-2937 Server Side AMQP Connectivity with options to transfer queues or replicate data 2020-10-28 11:37:25 -04:00
franz1981 b5753a0000 ARTEMIS-2958 Timed out waiting pool stop on backup restart
BackupManager::activated should correctly unblock
unauthorized blocking requests to allow a backup broker
to prompty restart in case of live failback
2020-10-22 12:44:42 -04:00
Domenico Francesco Bruscino 90434a4cf4 ARTEMIS-2935 Fix JMX ObjectNames
Fix invalid object names setting a default broker name if it cannot be used.
2020-10-22 15:10:02 +08:00
Emmanuel Hugonnet fdfc58171b [ARTEMIS-2939]: Artemis should not delete corrupt log files.
* Moving corrupted journal files to the attic folder.

Jira: https://issues.apache.org/jira/browse/ARTEMIS-2939
2020-10-20 18:39:06 -04:00
Justin Bertram 75e12b5e1d ARTEMIS-2947 Implement SecurityManager that supports replication 2020-10-19 10:07:57 -04:00
Andy Taylor 0ce173dcb5 ARTEMIS-2838 - migrate to HawtIO 2
https://issues.apache.org/jira/browse/ARTEMIS-2838
2020-10-09 09:20:29 +01:00
Mikko Uoti 2faafec737 ARTEMIS-2823 Use datasource with JDBC store db connections
Replaces direct jdbc connections with dbcp2 datasource. Adds
configuration options to use alternative datasources and to alter the
parameters. While adding slight overhead, this vastly improves the
management and pooling capabilities with db connections.
2020-10-06 08:32:58 +03:00
Andy Taylor c77bf50db4 ARTEMIS-2908 - Persist Divert Configuration in Bindings journal
https://issues.apache.org/jira/browse/ARTEMIS-2908
2020-09-25 10:03:40 -04:00
Justin Bertram 0f60b5a8e4 ARTEMIS-2906 add lastAckTimestamp to message counter 2020-09-24 12:51:00 -04:00
Justin Bertram beaacbfa8d ARTEMIS-2904 prevent acceptor from automatically starting 2020-09-23 20:19:16 -04:00
Justin Bertram 246bf08391 ARTEMIS-2909 revert ARTEMIS-2322
This reverts commit dbb3a90fe6.

The org.apache.activemq.artemis.core.server.Queue#getRate method is for
slow-consumer detection and is designed for internal use only.

Furthermore, it's too opaque to be trusted by a remote user as it only
returns the number of message added to the queue since *the last time
it was called*. The problem here is that the user calling it doesn't
know when it was invoked last. Therefore, they could be getting the
rate of messages added for the last 5 minutes or the last 5
milliseconds. This can lead to inconsistent and misleading results.

There are three main ways for users to track rates of message
production and consumption:

 1. Use a metrics plugin. This is the most feature-rich and flexible
way to track broker metrics, although it requires tools (e.g.
Prometheus) to store the metrics and display them (e.g. Grafana).

 2. Invoke the getMessageCount() and getMessagesAdded() management
methods and store the returned values along with the time they were
retrieved. A time-series database is a great tool for this job. This is
exactly what tools like Prometheus do. That data can then be used to
create informative graphs, etc. using tools like Grafana. Of course, one
can skip all the tools and just do some simple math to calculate rates
based on the last time the counts were retrieved.

 3. Use the broker's message counters. Message counters are the broker's
simple way of providing historical information about the queue. They
provide similar results to the previous solutions, but with less
flexibility since they only track data while the broker is up and
there's not really any good options for graphing.
2020-09-23 12:08:57 -04:00
Bernd Gutjahr 100d070942 ARTEMIS-2878 Add numberOfPages as metric
Added metric 'number.of.pages' to provide numberOfPages for an address.
2020-09-16 09:16:55 -05:00
Justin Bertram e47eb5ae20 ARTEMIS-589 flow control for individual STOMP subscribers 2020-09-16 10:13:47 -04:00
Justin Bertram 6be8966164 ARTEMIS-2901 support namespace for temporary queues 2020-09-16 10:10:28 -04:00
Andy Taylor c29a8cda5c ARTEMIS-2902 - expose at queue control messages held in a prepared tx
https://issues.apache.org/jira/browse/ARTEMIS-2902
2020-09-15 11:08:59 -04:00
Clebert Suconic 7cf5289efa ARTEMIS-2900 Expose property (getWholeMessageSize) so users can intercept size of messages and large messages 2020-09-14 15:35:46 -04:00
Stefan Krutzler 1783aa15cb ARTEMIS-2875 - retry to reattach sessions on failed failover for the specified amount of times set in reconnectAttempts parameter 2020-09-10 08:21:18 +02:00
Justin Bertram 90853409a0 ARTEMIS-2886 optimize security auth
Both authentication and authorization will hit the underlying security
repository (e.g. files, LDAP, etc.). For example, creating a JMS
connection and a consumer will result in 2 hits with the *same*
authentication request. This can cause unwanted (and unnecessary)
resource utilization, especially in the case of networked configuration
like LDAP.

There is already a rudimentary cache for authorization, but it is
cleared *totally* every 10 seconds by default (controlled via the
security-invalidation-interval setting), and it must be populated
initially which still results in duplicate auth requests.

This commit optimizes authentication and authorization via the following
changes:

 - Replace our home-grown cache with Google Guava's cache. This provides
simple caching with both time-based and size-based LRU eviction. See more
at https://github.com/google/guava/wiki/CachesExplained. I also thought
about using Caffeine, but we already have a dependency on Guava and the
cache implementions look to be negligibly different for this use-case.
 - Add caching for authentication. Both successful and unsuccessful
authentication attempts will be cached to spare the underlying security
repository as much as possible. Authenticated Subjects will be cached
and re-used whenever possible.
 - Authorization will used Subjects cached during authentication. If the
required Subject is not in the cache it will be fetched from the
underlying security repo.
 - Caching can be disabled by setting the security-invalidation-interval
to 0.
 - Cache sizes are configurable.
 - Management operations exist to inspect cache sizes at runtime.
2020-08-26 13:36:24 -05:00
Domenico Francesco Bruscino 32bf9680f2 [maven-release-plugin] prepare for next development iteration 2020-08-24 16:03:24 +02:00
Domenico Francesco Bruscino a549fcedde [maven-release-plugin] prepare release 2.15.0 2020-08-24 16:03:12 +02:00
Michael Pearce 2c506cc52a [ARTEMIS-2863] Add support to pause dispatch when group rebalance
Add test case
Add implementation
Add docs
2020-08-19 12:04:50 -04:00
franz1981 40f20cfe6a ARTEMIS-2877 Fix journal replication scalability
This is allowing journal appends to happen in burst
during replication, by batching replication response
into the network at the end of the append burst.
2020-08-17 13:01:41 -04:00
Clebert Suconic c551df770c ARTEMIS-2868 Protect Topology Updates from Split Brain on broker shutdown as well 2020-08-07 12:39:20 -04:00
Clebert Suconic 27cb9b37b1 ARTEMIS-2868 Protect Topology Updates from Split Brain 2020-08-06 17:40:57 -04:00
Clebert Suconic 3d86d78828 ARTEMIS-2587 Exposing ActiveMQServer::isActivate through management at ActiveMQServerControl 2020-07-29 11:41:41 -04:00
Scott Werner e3ed8e815b ARTEMIS-2847 socks5h support
Added 'socksRemoteDNS' transport parameter.
If set to true, remote destination socket is created unresolved
and DNS resolution is disabled.
2020-07-21 16:04:15 -04:00
Clebert Suconic 6690ba1d24 [maven-release-plugin] prepare for next development iteration 2020-07-09 12:49:08 -04:00
Clebert Suconic a76f41a7ed [maven-release-plugin] prepare release 2.14.0 2020-07-09 12:48:54 -04:00
Howard Gao 6f8ff55dec ARTEMIS-2835 Porting HORNETQ-1575 and HORNETQ-1578
1 of 2) - Porting of HORNETMQ-1575

In a live-backup scenario, when live is down and backup becomes live, clients
using HA Connection Factories can failover automatically. However if a
client decides to create a new connection by itself (as in camel jms case)
there is a chance that the new connection is pointing to the dead live
and the connection won't be successful. The reason is that if the old
connection is gone the backup will not get a chance to announce itself
back to client so it fails on initial connection.

The fix is to let CF remember the old topology and use it on any
initial connection attempts.
2020-07-08 11:27:36 -04:00
Justin Bertram fd207e75b0 ARTEMIS-2829 wrong return type for getDiskStoreUsage
Since getDiskStoreUsage on the ActiveMQServerControl is converting a
double to a long the value is always 0 in the management API. It should
return a double instead.
2020-07-07 08:18:28 -04:00
Justin Bertram cb7cd729d7 ARTEMIS-2828 add addressSize metric
Adding this metric required moving the meter registration code from the
AddressInfo class to the ManagementService in order to get clean access
to both the AddressInfo and AddressControl classes.
2020-07-07 08:18:28 -04:00
Justin Bertram 73c4e399d9 NO-JIRA clarify diskStoreUsage description 2020-07-07 08:18:28 -04:00
Justin Bertram ac8ffedf66 ARTEMIS-2827 add addressMemoryUsagePercentage as metric 2020-07-07 08:18:28 -04:00