Commit Graph

1122 Commits

Author SHA1 Message Date
Justin Bertram 22e3b09b9c ARTEMIS-4370 update existing topic alias for MQTT 5 publisher 2023-07-24 12:55:05 -05:00
Justin Bertram 7048d9d4a5 [maven-release-plugin] prepare for next development iteration 2023-07-20 14:39:21 -05:00
Justin Bertram f05b63b8a1 [maven-release-plugin] prepare release 2.30.0 2023-07-20 14:36:44 -05:00
Justin Bertram c8d685ee87 ARTEMIS-4365 MQTT retain flag not set correctly 2023-07-19 12:50:05 +01:00
Clebert Suconic 29deb30c73 ARTEMIS-4366 Some Adjustment to class names on Mirror
This is in relation to comments from PR #4555
2023-07-18 13:11:24 -04:00
Clebert Suconic 677d71b8e7 ARTEMIS-4366 Missing Mirrored ACKs with MULTICAST and subscriptions 2023-07-17 20:19:06 -04:00
Justin Bertram cce565e78f ARTEMIS-4353 clean up Maven dependencies
This commit contains the following changes:
 - eliminate used, undeclared dependencies
 - eliminate unused, declared dependencies
 - fix scope for test dependencies
 - eliminate org.hamcrest completely as its use involved deprecated code
   as well as dependencies from multiple versions
2023-07-14 14:03:41 +01:00
Justin Bertram 2d1a8661fd ARTEMIS-4338 STOMP inoperable w/resource audit logging
When resource audit logging is enabled STOMP is completely inoperable
due to an NPE during the protocol handshake. Unfortunately the failure
is completely silent. There are no logs to indicate a problem.

This commit fixes this problem via the following changes:
 - Mitigate the original NPE via a check for null
 - Move the logic necessary to set the "protocol connection" on the
   "transport connection" to a class shared by all implementations.
 - Add exception handling to log failures like this in the future.
 - Add tests to ensure the audit logging is correct.
2023-07-06 12:08:16 +01:00
Artyom Tarasenko fb4c68681e ARTEMIS-4095: fix delivering message size accounting
Signed-off-by: Artyom Tarasenko <atar4qemu@gmail.com>
2023-07-05 12:35:33 -05:00
Justin Bertram 69ae79ad84 ARTEMIS-4277 upgrade checkstyle 2023-06-20 18:04:05 +01:00
Justin Bertram b316272e14 ARTEMIS-4311 fix typo 2023-06-20 17:50:19 +01:00
Clebert Suconic ae554b43db [maven-release-plugin] prepare for next development iteration 2023-06-14 18:20:58 -04:00
Clebert Suconic 2be5c54cd0 [maven-release-plugin] prepare release 2.29.0 2023-06-14 18:20:45 -04:00
Peter Brady 2f5463c960 ARTEMIS-4309 Read all bytes of compressed objmsg
Continually read from the compressed byte[] into
the decompressed object

Add test to validate large (>1024 bytes) compressed data can be
deserialized properly
2023-06-13 05:50:37 -07:00
Clebert Suconic cea9ff6667 ARTEMIS-4259 JMS consumer + FQQN + selector not working
co-authored with Justin Bertram
2023-06-07 15:15:21 -07:00
Gary Tully b664022a1e ARTEMIS-4284 - sync operwire remove consumer with the operation context to ensure prefetched messages are available to the next consumer in order
This closes #4483
2023-05-18 09:33:05 -04:00
Justin Bertram 6ba54964bd ARTEMIS-4258 delayBeforeDispatch not working with OpenWire 2023-05-08 15:11:52 -05:00
Alexey Markevich 383345a4f6 ARTEMIS-4239 use StandardCharsets.UTF_8 2023-05-08 15:10:23 -05:00
Clebert Suconic 589157ca5f ARTEMIS-4268 AMQPMessage copy constructor shouldn't copy all message annotations
During redistribution, we should not copy all message annotations.

In particular we should not copy any of the x-opt-ORIG annotations used on DLQ and other copies.

this was broken after f632e8104b (ARTEMIS-3833 Preserve JMSCorrelationID of distributed AMQP large messages)

The change preserved too much, and as a result of that AmqpLargeMessageRedistributionTest::testSendMessageToBroker0GetFromBroker2 is intermittently failing.

There is no test in this commit as this is fixing AmqpLargeMessageRedistributionTest
2023-05-02 05:27:14 -07:00
Justin Bertram 74fa4ca758 ARTEMIS-4212 fix sending msgs to address w/mismatching routing types
When sending, for example, to a predefined anycast address and queue
from a multicast (JMS topic) producer, the routed count on the address
is incremented, but the message count on the matching queue is not. No
indication is given at the client end that the messages failed to get
routed - the messages are just silently dropped.

Fixing this problem requires a slight semantic change. The broker is now
more strict in what it allows specifically with regards to
auto-creation. If, for example, a JMS application attempts to send a
message to a topic and the corresponding multicast address doesn't exist
already or the broker cannot automatically create it or update it then
sending the message will fail.

Also, part of this commit moves a chunk of auto-create logic into
ServerSession and adds an enum for auto-create results. Aside from
helping fix this specific issue this can serve as a foundation for
de-duplicating the auto-create logic spread across many of the protocol
implementations.
2023-04-25 16:08:31 -05:00
Clebert Suconic fea84e39f5 ARTEMIS-4247 BrokerClustering vs Mirror code improvements 2023-04-25 08:10:58 -07:00
Justin Bertram fde9d223ae ARTEMIS-4249 failure to create internal MQTT consumer can orphan sub q 2023-04-21 12:32:21 -05:00
Clebert Suconic 2a81a0a3c6 ARTEMIS-4247 Inconsistencies between Broker Clustering and AMQP Mirror
- activemq.notifications are being transferred to the target node, unless an ignore is setup
- topics are being duplicated after redistribution
- topics sends are being duplicated when a 2 node cluster mirrors to another 2 node cluster, and both nodes are mirrored.
2023-04-21 10:30:32 -05:00
Clebert Suconic 4eb978b931 ARTEMIS-4233 Disabling RefCounting debug and error after paged messages 2023-04-12 16:40:26 -07:00
Justin Bertram 8abdee29e9 ARTEMIS-4235 fix map msg conversion from OpenWire->core 2023-04-10 10:28:07 +01:00
Clebert Suconic 6d3dbc4383 ARTEMIS-4233 Large Message Issues After Failed Clients
- interrupted message breaking reference counting
After the server writing to the client is interrupted in AMQP, the reference counting was broken what would require the server restarted
in order to cleanup the files of any interrupted sends.

- Removed consumer during large message delivery damaging large messages
If the consumer failed to deliver messages for any reason, the message on the queue would be duplicated. what would wipe out the body of the message
and other journal errors would happen because of this.

extra debug capabilities added into RefCountMessage as part of ARTEMIS-4206 in order to identify these issues
2023-04-06 07:40:01 -07:00
Clebert Suconic 80cc8030d3 ARTEMIS-4208 OpenWire chunk receive should not issue a flush 2023-03-15 13:46:42 -07:00
Justin Bertram 68c5bed159 ARTEMIS-4200 configurable link-stealing for MQTT 2023-03-10 17:51:24 -06:00
Justin Bertram 9b4204b345 ARTEMIS-4201 send proper MQTT disconnect code on stolen link 2023-03-10 17:51:24 -06:00
Clebert Suconic 257dd86ae2 ARTEMIS-4193 Large Message Files orphaned after server killed
This fix is scanning journal and paging for existing large messages. We will remove any large messages that do not have a corresponding record in journals or paging.
2023-03-09 08:35:51 -08:00
Gary Tully 00cae02ca4 ARTEMIS-4196 - set message routing type in mqtt publish 2023-03-08 14:30:30 -06:00
Clebert Suconic 3032bb9b0f NO-JIRA Adding more information on exception to track failing tests 2023-03-07 21:17:06 -05:00
Justin Bertram 97c78525da ARTEMIS-4181 make try-with-resources style consistent 2023-03-03 08:40:51 -06: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 7fe1a20909 ARTEMIS-4170 remove redundant queue creation for OpenWire
o.a.a.a.c.p.o.a.AMQConsumer#init will *always* try to create a core
queue when creating a consumer for a JMS queue. However, this is
already done in o.a.a.a.c.p.o.a.AMQSession#createConsumer.
2023-02-16 13:40:15 -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
Clebert Suconic 69e21a0eb7 ARTEMIS-4163 Fixing openwire race while chunkSend is happening 2023-02-09 19:58:40 -05:00
Timothy Bish d1b3610f68 ARTEMIS-2431 Stop processing Begin and Attach frames if open fails
For pipelined open cases the events processing should ignore additional begin
and attach events if the open event handler closes the connection to avoid the
processing throwing additional exceptions and replacing the error condition in
the connection with an unrelated error about NPE from the additional events.
2023-02-01 17:53:32 -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
Justin Bertram bea8d21ecd ARTEMIS-4145 MQTT shared sub queue may be inadvertently removed
o.a.a.a.c.p.m.MQTTSubscriptionManager#removeSubscription() had a chunk
of code from 971f673c60 removed. That code
was added under the assumption that there should only ever be one
consumer per queue. That was true for MQTT 3.x, but it's not always true
for MQTT 5 due to shared subscriptions. However, the tests from that
commit all still pass even with it removed now (as well as all the other
MQTT tests) so I think it's safe.
2023-01-30 12:09:40 -05:00
Timothy Bish 4785995f58 ARTEMIS-3357 Properly compare the subscription address on client re-attach
If the client is using address prefixes to define the routing type along with
durable subscriptions then on re-attach the compairon to check if the subscription
address has changed needs to remove the prefix when comparing against the address
since the prefix isn't propagated when creating the address and will always fail
resulting in the subscription queue being deleted in error.
2023-01-27 16:28:02 -05:00
Timothy Bish ca66028b2a ARTEMIS-4132 AMQP Receiver default to ANYCAST when creating an address
When an AMQP client subscribes to a new address (non-existing) with a receiver link, the
address is created with routing type ANYCAST regardles of the default address creation
configuration of the broker, and ignores even the broker wide default of MULTICAST.
2023-01-23 13:09:36 -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 3ef2fbe93a ARTEMIS-4130 remove redundant log on AMQP cxn auth failure 2023-01-23 16:15:11 +01:00
Justin Bertram 8a974fe89c ARTEMIS-4133 msg w/null prop value can't be consumed via STOMP 2023-01-17 12:18:49 -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
Justin Bertram e531c61c95 ARTEMIS-4126 address not auto-created when sending MQTT msg 2023-01-09 10:46:06 -06:00
Justin Bertram 038e95adb9 ARTEMIS-4109 unable to auto-delete q for MQTT retained msg 2022-12-15 13:44:55 -06:00