Commit Graph

1085 Commits

Author SHA1 Message Date
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
Justin Bertram ba2cbddd6b
ARTEMIS-3871 fix MQTT shared sub q naming semantics 2022-12-13 14:45:13 -06:00
Justin Bertram b5e25eb4fe ARTEMIS-3871 uniquely name MQTT share sub queues 2022-12-13 11:59:08 -05:00
Justin Bertram 76b9c62311 ARTEMIS-4098 AMQP messages missing correlation ID in console 2022-12-13 09:06:01 -05:00
Justin Bertram ef04cec95d ARTEMIS-4106 do not set prop w/empty key when converting to OpenWire 2022-12-13 09:04:57 -05:00
Robbie Gemmell f790911c44 ARTEMIS-4110: insert standard ASF licence header comment in various cases, such as to replace a javadoc header 2022-12-07 10:21:25 +00:00
Clebert Suconic 33567fca8d ARTEMIS-4108 Improving flush on large message fix 2022-12-06 16:28:41 -05:00
Clebert Suconic eb11b044af ARTEMIS-4108 AMQP Drain fails under load with Large Messages 2022-12-05 16:47:08 -05:00
Clebert Suconic 4f79eb42f5 ARTEMIS-4089 Check on AutoCreation during routing 2022-11-14 15:25:42 -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
Robbie Gemmell 3a55ac72e5 ARTEMIS-4076: handle EventLoop becoming AutoClosable via ExecutorService parent on Java 19, and default method impl causing AllClassesTest to infinite loop
Adds a timeout to the test to prevent similar future issues.
2022-10-27 16:16:42 +01:00
Clebert Suconic 87ec9b5465 ARTEMIS-4045 Fixing in Handler ACKRunner on Mirror 2022-10-26 13:10:07 -04:00
AntonRoskvist a44b415395 NO-JIRA - Fix typo in OpenWireMessageConverter 2022-10-26 10:34:38 -04:00
Robbie Gemmell cd6a895c38 ARTEMIS-4061: have simplest protocol modules use the jar plugin for packaging, picks up the project.build.outputTimestamp 2022-10-19 17:32:15 +01:00
Robbie Gemmell fbc6dd066b ARTEMIS-4020: add Log4j as a test dep in some modules with no SLF4J impl, supressing noop fallback+warning 2022-10-18 12:43:37 +01:00
Clebert Suconic ec00def02b ARTEMIS-4025 Fixing testsuite by adding json missing dependencies 2022-10-14 15:42:42 -04: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 ea04426bcd ARTEMIS-4037 refactor MQTTRetainMessageManagerTest
Commit 5a42de5fa6 called my attention to
this test. It really needs to be refactored because:

 - It belongs in the integration-tests module rather than the MQTT
   protocol module.
 - It is using a lot of non-standard components (e.g.
   EmbeddedJMSResource, Awaitility, etc.).
 - It is overly complicated (e.g. using its own MqttClientService).

This commit resolves all those problems. The new implementation is quite
a bit different but still equivalent. I reverted the original fix from
ARTEMIS-2476 and the test still fails.
2022-10-13 17:33:43 +01:00
Clebert Suconic e951ce67ca NO-JIRA small tweak on javadoc 2022-10-11 15:42:43 -04:00
Domenico Francesco Bruscino 5a42de5fa6 ARTEMIS-4037 Use random alphanumeric strings for MQTTRetainMessageManagerTest 2022-10-11 16:57:57 +01: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 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 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 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 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
Justin Bertram 6b5a73db8a
ARTEMIS-3913 custom MQTT client ID rejection
Sometimes users want to perform custom client ID validation, and in the
case of an invalid client ID the proper reason code should be returned
in the CONNACK packet.
2022-09-14 11:50:36 -05:00
Timothy Bish 289587f004 ARTEMIS-3990 Ensure that readable buffer string read consumes the bytes
Ensures that when reading a string the readable buffer consumes the
bytes by advancing the read index as defined in the interface API docs.
2022-09-13 17:17:11 -04:00
Clebert Suconic 902c0cb62b NO-JIRA Removing dead code - AmqpReadableBuffer 2022-09-13 17:16:51 -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
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
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