Commit Graph

2772 Commits

Author SHA1 Message Date
Justin Bertram 506d59db03 ARTEMIS-3801 not getting messages on MQTT subscriptions with $ 2022-04-25 21:41:20 -04:00
Justin Bertram bcfff61e17 ARTEMIS-3800 allow CLI to delete address with queues 2022-04-25 15:39:44 -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
Clebert Suconic c6bfe34f9e ARTEMIS-3756 Removing test that is now invalid 2022-04-22 11:29:17 -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 97b4f6a578 ARTEMIS-3788 don't send MQTT will message if will flag = false 2022-04-21 16:38:27 -04:00
Justin Bertram 96fa98fc93 ARTEMIS-3789 respect session expiry interval on MQTT disconnect message 2022-04-21 15:33:56 -04:00
Clebert Suconic d1e1faacc4 ARTEMIS-3791 Openwire failover leaving sessions leaked 2022-04-21 14:43:09 -04:00
Justin Bertram c5f45ee44d ARTEMIS-3781 send PUBREC on duplicate PUBLISH for MQTT QoS 2
The MQTT 5 (and 3.1.1) specification states:

    Until it has received the corresponding PUBREL packet, the receiver
MUST acknowledge any subsequent PUBLISH packet with the same Packet
Identifier by sending a PUBREC. It MUST NOT cause duplicate messages to
be delivered to any onward recipients in this case [MQTT-4.3.3-10].

The broker prevents a duplicate message, but it doesn't respond with a
PUBREC. This commit fixes that.
2022-04-20 12:01:47 -04:00
Justin Bertram 40a191379b ARTEMIS-3775 don't carry forward MQTT topic aliases to new connection 2022-04-18 21:10:49 -04:00
Justin Bertram 7d11cf81ba ARTEMIS-3777 fix MQTT request/response + nolocal
Removing the connection ID property from the actual *message* breaks the
nolocal functionality. Removing the property isn't necessary in the
first place so this commit reomves that code.
2022-04-18 18:26:05 -04: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 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 ccfd4b7a62 ARTEMIS-3776 just my OCD applying aesthetic tweaks to recediveOW.groovy 2022-04-13 12:39:31 -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
Justin Bertram a6abf68ba5 ARTEMIS-3774 support user properties on MQTT will message 2022-04-13 10:25:57 -04: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 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
Robbie Gemmell e774e4fcfb ARTEMIS-3768: update to Qpid JMS 1.6.0 2022-04-07 13:05:15 +01:00
Robbie Gemmell 6da678177a ARTEMIS-3758: clean up lots of tests that never run, remove related files + dependencies and some unnecessary deps 2022-04-07 11:29:52 +01: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
Domenico Francesco Bruscino 4ff5d95b2c ARTEMIS-3752 Upgrade Spring Framework to 5.3.18 for examples and tests 2022-04-04 10:59:14 +02:00
Tiago Bueno dbd60d0afb ARTEMIS-3749 e2e-tests improvements
Scripts:
- Fix the preapre-docker.sh to exit with 0 instead of 1 on success

On pom files:
- Change e2e-tests variable names to e2e-tests.xxxxxx for clarity on
  e2e-tests variables
- Add e2e-tests.skipImageBuild variable to control if the docker image
  will be build (defaults to not build)
- Add e2e-tests.dockerfile variable to specify the dockerfile to be
  used (defaults to Dockerfile-centos)
- Bump testcontainers version to 1.16.3
- Add artemis distribution dependency since the docker image build
  depends on it

On ContainerService class:
- Fix exposePorts and exporseFolder to use SELinux shared mode
  otherwise the mount fails on machines with SELinux enabled
- Move the logic to use specific user on container from generic start
  method to broker specific method to avoid affect other images
- Update the broker image name to a more generic name (activemq-artemis
  instead of artemis-centos)
- Update the broker image tag to match with the project version in pom
  file
2022-03-30 11:48:05 -04: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
Clebert Suconic 49276ae633 NO-JIRA fixing MessagesExpiredPagingTest
There is a reference expiring in one hour. It should not leave page mode.
This is about still flowing messages, not leaving page mode.
2022-03-22 09:15:08 -04:00
Domenico Francesco Bruscino 603462a1a5 ARTEMIS-3708 Collapse key transformer into policy 2022-03-21 19:34:48 -04:00
Tiago Bueno 2a26e46a8c NO-JIRA fix ManifestTest
As the test needs the generated jms jars to be verified I moved it from
unit-tests to smoke-tests.
Updated the test to look for the correct jars as the originally
specified does not exist.
Update the test to assert against Implementation-Version instead of
ActiveMQ-Version in the manifest file as the ActiveMQ-Version property does not exist.
2022-03-21 19:00:00 -04:00
Clebert Suconic 0c651dd17b ARTEMIS-3720 Exposing global-max-messages on the CLI 2022-03-21 18:50:08 -04:00
Justin Bertram 3627ba57c9 ARTEMIS-3711 support AMQ_SCHEDULED_DELAY for OpenWire clients 2022-03-21 18:49: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
Tiago Bueno 968e4886c8 ARTEMIS-3716 move e2e tests to e2e-tests module
Move all tests which are related to end-to-end testing from smoke-tests
module to a new module named e2e-tests.

These e2e tests are those which are dependent of ContainerService
class. ContainerService class uses artemis inside a container by using
the testcontainers library and for that reason these tests are usually
a quite slow and tecnically they are not a smoke test.

The new e2e-tests module is part of tests module but it is not enabled
by default and to get executed it requires the e2e-tests profile
specification on maven command.
2022-03-21 16:48:29 -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 2b5a25a106 ARTEMIS-3702 auth failures don't adhere to MQTT spec
The commit includes the following changes:
 - Don't drop the connection on subscribe or publish authorization
failures for 3.1 clients.
 - Don't drop the connection on subscribe authorization failures for
3.1.1 clients.
 - Add configuration parameter to control behavior on publish
authorization failures for 3.1.1 clients (either disconnect or not).
2022-03-15 15:33:54 -04:00
Clebert Suconic 861fe59124 ARTEMIS-3721 AMQP Mirrored Large Message file not removed 2022-03-15 08:56:32 -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 f6372d8443
ARTEMIS-3698 fix test
When copying message properties from the core message to the OpenWire
message we intentially omit any properties starting with `_AMQ` and
`__HDR_`. However, we were effectively negating that logic because we
copied the marshalled properties directly to the message without any
filtering. Now that we no longer copy the marshalled properties directly
to the message the test breaks because it expects properties starting
with `__HDR_`. This commit fixes the test by removing those
expectations. The test is still valid because the message is still
receieved rather than being swallowed due to an exception (which was the
original problem).
2022-03-04 12:08:35 -06:00
Clebert Suconic e949e3843b ARTEMIS-3701 Do no block libaio on compacting or closing
I am adding a test showing it is safe to not wait pending callbacks before closing a file.
With this I can just close the file and let the kernel to deal with sending the completions.
2022-03-04 10:43:06 -05: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
Robbie Gemmell dcbd4b059a ARTEMIS-3695: use specific jetty deps instead of uber jar, rationalise servlet api deps
Partially reverts c5f94f340d
2022-03-03 21:59:13 -05: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
Clebert Suconic cf49bfaa2b NO-JIRA Improving assertion on MessageExpiredPagingTest 2022-03-01 12:27:01 -05:00
Clebert Suconic 60ce5f9cf1 NO-JIRA Improving expiry test with an executor 2022-03-01 11:59:05 -05:00
gtully dcaebfb24e ARTEMIS-3660 - rename broker-balancer to connection-router 2022-03-01 11:15:16 +01:00
Domenico Francesco Bruscino 6438d6a7a8 ARTEMIS-3697 Skipping testInabilityToCreateDirectoryDuringPaging for db 2022-03-01 07:03:41 +01:00
Clebert Suconic dbeda809e3 NO-JIRA Fixing test assertion 2022-02-28 21:29:51 -05:00
Justin Bertram c4ebccd94d ARTEMIS-3696 avoid null prop values on STOMP msgs 2022-02-28 13:44:45 -05:00
Justin Bertram 40acb18f4e ARTEMIS-3698 avoid byte[] prop values when converting from OpenWire
Avoid storing the following values as byte[] for OpenWire:
 - Marshalled properties. We already store the unmarshalled properties
   so this is altogether redundant.
 - Producer ID.
 - Message ID.
 - Various destination values.

Also, eliminate the "original transaction ID" conversion code as it's
never actually set from the incoming message.
2022-02-28 08:41:36 -05: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
Clebert Suconic 293b96aa45 ARTEMIS-3697 Adding test assertion on invalid IO on Paging
This commit is part of a bigger task where I am improving paging.
This test is needed to validate some of the changes I am making on further commits.
2022-02-25 14:34:44 -05:00
Domenico Francesco Bruscino b0f131f080 ARTEMIS-3694 Support remote servers for console smoke tests 2022-02-23 20:39:11 +01:00
AntonRoskvist 99b9d87bfd
ARTEMIS-2934 Add option to suppress SESSION notifications 2022-02-17 14:56:16 -06:00
AntonRoskvist 8a9f326b25
ARTEMIS-3647 - OpenWire, remove rolledbackMessageRef on Ack 2022-02-17 14:36:39 -06:00
Robbie Gemmell 5d5e6ccb20 ARTEMIS-3638: remove duplicate dependency definition to fix warning 2022-02-17 16:19:19 +00:00
Matteo Baccan 8c3f699d27 Typo error: double semicolon at the end of line 2022-02-17 10:30:33 -05:00
Matteo Baccan dc1c269b36 Fixed a typo error "unkown" -> "unknown" 2022-02-17 10:29:58 -05: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 27d018327a
ARTEMIS-3678 return proper CONNACK code when MQTT 3.x auth fails 2022-02-10 10:30:44 -06:00
Robbie Gemmell 22328dc188 ARTEMIS-3675: use reload4j in the optional openwire tests module 2022-02-08 17:21:31 +00: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 ae7e7cbb22
ARTEMIS-2413 fix tests 2022-02-07 11:44:41 -06: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
Robbie Gemmell 2c1afc4b75 ARTEMIS-3667: update to Groovy 4.0.0 2022-02-04 11:39:37 -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
Robbie Gemmell 4a6a74e1c3 NO-JIRA: use various versions from parent to be consistent, remove some duplicate yet incomplete plugin config 2022-01-28 11:34:20 +00:00
Domenico Francesco Bruscino b9243cc999 ARTEMIS-3654 Fix AllClassesTest leaks 2022-01-27 09:26:45 +01: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 90535a2401 ARTEMIS-3652 - tighten up test assertions and cleanup, track errors via connection listener and consider missing send reply 2022-01-25 17:17:35 +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
Robbie Gemmell 5e7ecfcc8a NO-JIRA: remove some test methods that are permanently disabled in one or more ways 2022-01-24 11:13:52 +00:00
Domenico Francesco Bruscino 1b07c3222a NO-JIRA Fix activemq5-unit-tests with byteman 2022-01-19 17:05:35 +01: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
Domenico Francesco Bruscino fc357213d2 NO-JIRA Fix activemq5-unit-tests with SSL 2022-01-19 10:33:56 +01:00
Domenico Francesco Bruscino cb96a89524 ARTEMIS-3616 Fix netty epoll not available 2022-01-17 12:25:59 +00:00
franz1981 52fcc0c81b ARTEMIS-3620 Journal blocking delete/update record with no sync 2022-01-13 15:35:57 -05: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
Erwin Dondorp 172d72d62d
ARTEMIS-3626 fixed simple syntax error 2022-01-12 12:09:24 -06:00
Domenico Francesco Bruscino 1c9516db6a NO-JIRA Fix activemq5-unit-tests after ARTEMIS-3546 2022-01-11 10:45:01 -05:00
Robbie Gemmell a91d3b0c0f ARTEMIS-3624: change dep mangement entry to be for the minikdc dep, add property for its version, update it and rework exclusions 2022-01-11 10:44:22 -05:00
Domenico Francesco Bruscino 055d05b9f1 NO-JIRA Fix DiscoveryTest#testSimpleBroadcast 2022-01-04 14:23:17 +01:00
Jacob Middag 2125af1b8d ARTEMIS-3625 Correctly compare Boolean object and fix NPE introduced in bf875c 2022-01-03 21:31:51 -05:00
Clebert Suconic 4e52758a62 NO-JIRA Updating activemq.org links 2021-12-20 14:46:01 -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
Marlon Müller d56d299456 ARTEMIS-3574 multiple bindings for embedded webserver
* Add BindingDTO to allow configuring multiple addresses to listen on
* Start a new ServerConnector for each binding and deploy the corresponding web-applications
* Update documentation and tests
* Add tests to verify old and new configuration style produce equal results
2021-12-14 19:16:34 -05:00
Clebert Suconic 1857017abe Revert "ARTEMIS-3574 multiple bindings for embedded webserver"
This reverts commit 182334359c.
2021-12-14 15:18:16 -05:00
Domenico Francesco Bruscino ca1accc202 ARTEMIS-3605 Fix RestDeserializationTest 2021-12-14 10:04:55 -05:00
Marlon Müller 182334359c ARTEMIS-3574 multiple bindings for embedded webserver
* Add BindingDTO to allow configuring multiple addresses to listen on
* Start a new ServerConnector for each binding and deploy the corresponding web-applications
* Update documentation and tests
* Add tests to verify old and new configuration style produce equal results
2021-12-14 09:38:59 -05:00