Commit Graph

855 Commits

Author SHA1 Message Date
Justin Bertram a9e6dbb0e3 NO-JIRA reconcile STOMP prop names b/w code & doc 2020-03-05 20:49:25 -06:00
Justin Bertram e9ee9956bd ARTEMIS-2639 lost notif props with OpenWire+divert
Historically speaking, all message properties starting with AMQ HDR
would not be passed to OpenWire messages. However, that blocked the
properties from management notifications so ARTEMIS-1209 was raised and
the solution there was to pass properties that started with _AMQ *if*
the consumer was connected to the management notification address.
However, in this case messages are diverted to a different address so
this check fails and the properties are removed. My solution will be to
check the message itself to see if it has the _AMQ_NotifType property
(which all notification messages do) rather than checking where the
consumer is connected.
2020-03-05 21:38:51 -05:00
brusdev c0f3ea66a9 ARTEMIS-2641 Openwire client runs out of credits after reconnection
Clear the messagePullHandler on setting prefetchSize.
2020-03-04 09:14:53 +01:00
Clebert Suconic ddd8ed4402 ARTEMIS-1975 Real Large Message support into AMQP
This is a Large commit where I am refactoring largeMessage Body out of CoreMessage
which is now reused with AMQP.

I had also to fix Reference Counting to fix how Large Messages are Acked

And I also had to make sure Large Messages are transversing correctly when in cluster.
2020-02-25 15:25:01 +01:00
Justin Bertram a8cf6b04b4 ARTEMIS-2607 interceptor returns false but processing continues 2020-02-14 13:23:05 -05:00
Justin Bertram daae7e750a ARTEMIS-2619 allow disabling STOMP 'server' header 2020-02-12 19:38:38 -06:00
Francesco Nigro d42267f05a ARTEMIS-2617 Lazy scan AMQP message data 2020-02-12 13:29:51 -05:00
Francesco Nigro 5897909dc9 ARTEMIS-2617 use core pools to reduce GC on journal loading 2020-02-12 13:29:51 -05:00
Sebastian Thomschke 26b5ad439c NO-JIRA Remove redundant instanceof check in CoreAmqpConverter
message is of type ServerJMSMessage, thus the test `if (message instanceof ServerJMSMessage)` always yields true.
2020-02-03 09:56:39 -06:00
brusdev 1716655214 ARTEMIS-2597 Memory Leak when closing AMQP Consumers in the context
Remove server senders on remote link close.
2020-01-15 09:56:21 +01:00
Justin Bertram 97735ca72c [maven-release-plugin] prepare for next development iteration 2020-01-10 09:00:58 -06:00
Justin Bertram 25a947f6cb [maven-release-plugin] prepare release 2.11.0 2020-01-10 08:57:46 -06:00
Keith Wall 39cd9d56f6 ARTEMIS-2497: [AMQP] Allow handling of the reject disposition to be configured. 2020-01-08 11:56:23 -05:00
Clebert Suconic 13278cc45f ARTEMIS-2581 Duplicate Detection on AMQP should be configurable
There is an optimization in AMQP, that properties are only parsed over demand.

It happens that after ARTEMIS-2294 (commit 2dd0671698),
every send would request for the property on the message, resulting the properties to always be parsed upon send.
Even when there's no use of application properties.
2019-12-19 17:54:21 -05:00
Justin Bertram eeaeba6354 ARTEMIS-2557 don't export openwire-protocol JMS spec dep 2019-12-16 14:29:32 -05:00
Keith Wall 7bd710520d ARTEMIS-2494: [AMQP] Allow Modified disposition to be used signal address full to a sending peer 2019-12-03 11:05:23 -05:00
Howard Gao 044319da05 ARTEMIS-2560 Duplicate amqp messages over cluster
When AMQPMessages are redistributed from one node to
another, the internal property of message is not
cleaned up and this causes a message to be routed
to a same queue more than once, causing duplicated
messages.
2019-12-03 09:46:28 -05:00
Howard Gao d02da18dab ARTEMIS-2506 MQTT doesn't cleanup underlying connection for bad clients
When a bad MQTT clients drop its connection without proper closing
it the broker doesn't close the underlying physical connection.
2019-09-27 19:41:15 +08:00
Clebert Suconic 91f4d0a633 [maven-release-plugin] prepare for next development iteration 2019-09-23 11:19:54 -04:00
Clebert Suconic 86a975fdad [maven-release-plugin] prepare release 2.10.1 2019-09-23 11:19:42 -04:00
Ulf Lilleengen 2ec96bf46d ARTEMIS-2488: Handle the case where source address is null 2019-09-18 20:49:16 -04:00
Howard Gao 05a93314cd ARTEMIS-2493 OpenWire session close doesn't cleanup consumer refs
When an openwire client closes the session, the broker doesn't
clean up its server consumer references even though the core
consumers are closed. This results a leak when sessions within
a connection are created and closed when the connection keeps open.
2019-09-17 09:44:25 +08:00
Clebert Suconic 7263e820f3 NO-JIRA Fixing intermittent failure on CreditsSemaphoreTest 2019-09-05 15:41:33 -04:00
Clebert Suconic 5016f69daa [maven-release-plugin] prepare for next development iteration 2019-08-26 10:42:13 -04:00
Clebert Suconic f092d5396a [maven-release-plugin] prepare release 2.10.0 2019-08-26 10:42:01 -04:00
Clebert Suconic c929d34eed ARTEMIS-2454 Fixing body re-encoding 2019-08-25 23:03:53 -04:00
Michael Pearce 25d0b511ce ARTEMIS-2458 Fix AMQP Transaction Session Close Ordering 2019-08-21 09:34:08 -04:00
Clebert Suconic 61eb379741 ARTEMIS-2458 Fix AMQP Transaction Rollback Ordering by using a sorted add 2019-08-21 09:34:07 -04:00
Timothy Bish 448f72738b ARTEMIS-2437 Allow extended types in annotations in AMQP to Core
When converting from AMQP to core and back again support annotations that
aren't able to be placed into Core message properties by storing the bytes
from encoding the types to AMQP encodings and then decoding them again
when converting back into AMQP messages.

Requires update to proton-j 0.33.2 for encoding fix
2019-08-18 22:13:35 -04:00
Clebert Suconic 5f75f68129 ARTEMIS-2454 Message Body damaged after re-encoding 2019-08-18 17:17:12 -04:00
Clebert Suconic f303cd7ca9 NO-JIRA Adding log.warn on AMQPMessage 2019-08-09 14:05:41 -04:00
Clebert Suconic 205a1399e7 ARTEMIS-2440 Call timeout should retry the connection asynchronously 2019-08-05 12:12:33 -04:00
Clebert Suconic cd723aa528 ARTEMIS-2440 Connection.fail on sendBlock should be asynchronous
This is following up on ARTEMIS-2327.
2019-08-02 16:37:12 -04:00
Wei Yang edace8845e ARTEMIS-2414 Sync before closing file in case data loss 2019-07-29 14:44:26 -04:00
Clebert Suconic 8a1f267bd5 Revert "ARTEMIS-2423 Improving Consumer/Queue Delivery lock"
This reverts commit 7507a9fd4b.
2019-07-27 10:45:08 -04:00
Clebert Suconic 7507a9fd4b ARTEMIS-2423 Improving Consumer/Queue Delivery lock 2019-07-26 15:05:51 -04:00
brusdev 022b5895ef ARTEMIS-2394 Improve scheduling sync for AMQPConnectionContext
Remove synchronized blocks using an AtomicReference.
2019-07-22 10:55:18 -04:00
Justin Bertram 8484c8a43b ARTEMIS-2389 add details to conn failure logging 2019-07-22 09:56:55 -04:00
Tomas Hofman 1c45d1758d ARTEMIS-2409 Convert HornetQ field names in consumer/queue selector strings 2019-07-17 11:34:04 -04:00
Howard Gao c66d62e4b0 ARTEMIS-2390 JMSMessageID header can be null when messages are cross-protocol
If a jms client (be it openwire, amqp, or core jms) receives a message that
is from a different protocol, the JMSMessageID maybe null when the
jms client expects it.
2019-06-27 10:26:34 -04:00
brusdev d14c0de335 ARTEMIS-2385 Log header for rejecting message with too large header
Fix test and warning condition to avoid false issues.
2019-06-20 16:20:11 +02:00
brusdev 74c79625b8 ARTEMIS-2002 Proton transport objects leaked
Remove scheduled tasks when a client disconnects to allow garbage
collector to delete the unused proton objects. Add a the unity test
AMQPConnectionContextTest to check leaks after close.
2019-06-19 10:38:00 -05:00
Andy 6a2e964f5b ARTEMIS-2386 - use internal session for management queues for QOS2
https://issues.apache.org/jira/browse/ARTEMIS-2386
2019-06-18 08:21:39 +01:00
gtully d1add00b00 ARTEMIS-2378 respect openwire removeInfo lastSequenceId when dealing with delivery count 2019-06-17 22:32:33 -04:00
Justin Bertram dbb2b54fa7 [maven-release-plugin] prepare for next development iteration 2019-05-29 22:02:00 -05:00
Justin Bertram 88c686cc99 [maven-release-plugin] prepare release 2.9.0 2019-05-29 21:59:18 -05:00
Clebert Suconic b8a2580410 ARTEMIS-2360 IOOBE when dealing with older clients concurrently 2019-05-29 15:02:13 -04:00
Clebert Suconic 500aa09360 NO-JIRA Improving HornetQInterceptor test with modifications 2019-05-23 12:49:41 -04:00
brusdev e533bf876e ARTEMIS-2344 return security errors for unauthorized anonymous sasl
When user attempts unauthorized anonymous sasl the broker can return an
error of 'failed' instead of the security error that is expected in
these cases.
2019-05-17 15:52:37 -04:00
Clebert Suconic 2ae732cfc8 [maven-release-plugin] prepare for next development iteration 2019-05-16 09:58:27 -04:00
Clebert Suconic 481b9824a8 [maven-release-plugin] prepare release 2.8.1 2019-05-16 09:58:15 -04:00
Clebert Suconic 7f7194f779 ARTEMIS-2333 Making tests more reliable 2019-05-08 21:10:05 -04:00
Clebert Suconic 408cd3745c ARTEMIS-2333 Applying proper fix on Stomp delivery
When connection is dead, the StompSession may deliver a message and if AUTO-ACK it would ack and lose the message
2019-05-08 18:16:23 -04:00
Emmanuel Hugonnet ee7d5bd0f1 ARTEMIS-2319 Upgrading jboss-logging dependencies
* Upgrading versions
* Adding wildfly-common dependency as jboss-logmanager now depends on it
for simple common operations such as getting hostname or process id
* Updating bootclasspath with wildfly-common
2019-05-07 16:13:48 -04:00
Clebert Suconic 0e40984145 NO-JIRA speeding up a few tests 2019-05-06 20:22:47 -04:00
Clebert Suconic 6f0380097e ARTEMIS-2330 Fixing Possible NPE on HQPropertiesConversionInterceptor 2019-05-02 19:20:40 -04:00
Clebert Suconic 56152a9e7c [maven-release-plugin] prepare for next development iteration 2019-05-02 16:39:10 -04:00
Clebert Suconic a8e7f9d07a [maven-release-plugin] prepare release 2.8.0 2019-05-02 16:38:58 -04:00
Justin Bertram f584efd574 ARTEMIS-2326 remove pwd params before creating protocol mgr 2019-04-29 20:53:15 -04:00
Jiri Danek f508a25566 ARTEMIS-2320 Standard Charset object can be used 2019-04-29 11:28:10 +01:00
Clebert Suconic 228f6af4ca [maven-release-plugin] prepare for next development iteration 2019-04-25 16:52:09 -04:00
Clebert Suconic 09d2ba18a7 [maven-release-plugin] prepare release 2.8.0 2019-04-25 16:51:57 -04:00
Clebert Suconic e0815438d5 ARTEMIS-2316 Reverting change on AMQPMessage, and changing test to be accurate
This (kind of) reverts commit bd1162d9b8.
2019-04-25 11:23:43 -04:00
Clebert Suconic 15a335df01 ARTEMIS-2318 HornetQ Protocol Manager should copy the messages before replacing message properties 2019-04-24 16:27:32 -04:00
Luis De Bello bd1162d9b8 ARTEMIS-2316 AMQPMessage missing ApplicationProperties from custom transformer 2019-04-23 21:57:21 +01:00
Clebert Suconic 1e35175a4d ARTEMIS-2311 Dealing with Protocol conversions and JMSReplyTo 2019-04-22 21:45:24 -04:00
Clebert Suconic da4f95cf71 ARTEMIS-2305 ACK counters to only increment after commit
Also including a new metric for ack attempts that will keep the former semantic.
2019-04-12 14:34:51 -04:00
Justin Bertram 2dd0671698 ARTEMIS-2294 dupe detection for AMQP same as core 2019-04-12 09:39:52 -04:00
Michael André Pearce d9b3d0fe4c ARTEMIS-2286 AMQP to Core Conversion doesn't map routing type always
Add test that exhibits the issue when sending AMQP (non JMS) to Artemis that one mapping to Core JMS the destination is not resolving as the RoutingType can be missing.
Add fix.
2019-04-02 11:22:43 -04:00
Justin Bertram 304ff79712 ARTEMIS-2289 SUBSCRIBE w/receipt returns 2 receipt-ids 2019-04-02 14:13:25 +08:00
Clebert Suconic 516b1a1b9f [maven-release-plugin] prepare for next development iteration 2019-03-14 12:41:04 -04:00
Clebert Suconic c3eb6c12ad [maven-release-plugin] prepare release 2.7.0 2019-03-14 12:40:52 -04:00
Howard Gao 9f7d23c36c ARTEMIS-2229 turns out a valid bug. So restore the fix commit.
this was reverted previously on commit f4436a9f72.

It seems it is ok after further changes into FQQN, so this is being reapplied
2019-03-13 15:56:01 -04:00
onlyMIT 971f673c60 ARTEMIS-2206 The MQTT consumer reconnection caused the queue to not be cleared, and caused Artemis broker to throw a NullPointerException.
When the MQTT consumer client (cleanSession property set to true) reconnected, there are certain probabilities that these two bugs will occur.
This is because the MQTT consumer client thinks that its connection has been disconnected and triggers reconnection, but the MQTT connection is still alive at Artemis broker. This bug occurs when new and old connections occur while operating the same queue for unsafe behavior.
2019-03-12 17:51:12 -04:00
onlyMIT 4484d05cf0 ARTEMIS-2226 last consumer connection should close the previous consumer connection
Multiple consumers using the same clientId in the cluster, the last consumer connection should close the previous consumer connection!

ARTEMIS-2226 last consumer connection should close the previous consumer connection

to address apache-rat-plugin:0.12:check

ARTEMIS-2226 last consumer connection should close the previous consumer connection

to address checkstyle

ARTEMIS-2226 last consumer connection should close the previous consumer connection

adjust the code structure

ARTEMIS-2226 last consumer connection should close the previous consumer connection

adjust the code structure

ARTEMIS-2226 last consumer connection should close the previous consumer connection

adjust the code structure

ARTEMIS-2226 last consumer connection should close the previous consumer connection

adjust the code structure

ARTEMIS-2226 last consumer connection should close the previous consumer connection

adjust the code structure

ARTEMIS-2226 last consumer connection should close the previous consumer connection

add javadoc
2019-03-12 19:57:31 +00:00
Francesco Nigro 5b2c47567d ARTEMIS-1604 Artemis deadlock using MQTT Protocol
MQTT shouldn't support direct deliveries
2019-03-12 12:36:25 -04:00
Keith Wall 95bcfaeb70 ARTEMIS-2262: Correlate management response messages with the request 2019-03-08 12:11:58 -05:00
Otavio R. Piske 16909584c3 ARTEMIS-1952 NPE logged at warn if MQTT subscriber disconnects abruptly
Prevent a NullPointerException if no connection by the given clientId is
found on the cache of stored sessions
2019-02-21 19:36:37 +01:00
Clebert Suconic e1c1d6ef66 NO-JIRA Removing Debug Message from code 2019-02-19 14:44:40 -05:00
Clebert Suconic f4436a9f72 ARTEMIS-2242 Reverting regression caused by ARTEMIS-2229
Revert "ARTEMIS-2229 Qpid jms consumer cannot receive from multicast queue using FQQN"

This reverts commit 882da19c8a.
2019-01-29 10:50:46 -05:00
Michael André Pearce 7dfa0fe7f4 ARTEMIS-196 Implement Consumer Priority
Add consumer priority support
Includes refactor of consumer iterating in QueueImpl to its own logical class, to be able to implement.
Add OpenWire JMS Test - taken from ActiveMQ5
Add Core JMS Test
Add AMQP Test
Add Docs
2019-01-23 11:19:24 -05:00
Howard Gao b5e7b703b5 ARTEMIS-2230 Exception closing advisory consumers when supportAdvisory=false
When broker's advisory is disabled (supportAdvisory=false) any
advisory consumer won't get created at broker and the advisory
consumer ID won't be stored.

Legacy openwire clients can have a reference of advisory consumer
regardless broker's settings and therefore when it closes the
advisory consumer the broker has no reference to it.
Therefore broker throws an exception like:

javax.jms.IllegalStateException: Cannot
remove a consumer that had not been registered

If the broker stores the consumer info (even it doesn't create
it) the exception can be avoided.
2019-01-22 17:42:57 -05:00
Justin Bertram 61e0354b1a ARTEMIS-1867 FQQN for producers
There's a *slight* semantic change with the behavior of the queue query
and binding query to make them consistent with the address query, namely
that they will return the name of the queue and the name of the address
in every case and the returned names will be not use the FQQN syntax but
will be parsed to reflect their actual names in the broker.
2019-01-18 09:03:30 +00:00
Michael André Pearce 07fa93dfae NO-JIRA Check data != null during encode
Picked up by code analysis checks
2019-01-18 00:47:44 +00:00
Michael André Pearce 300ba4ecda NO-JIRA Fix String and SimpleString equals check 2019-01-18 00:24:20 +00:00
Justin Bertram 6c0f9f8d3d ARTEMIS-2221 avoid unnecessary Bindings instance creation
When trying to get the bindings for an address the getBindingsForAddress
method will create a Bindings instance if there are no bindings for the
address. This is unnecessary in most circumstances so use the
lookupBindingsForAddress method instead and check for null.
2019-01-17 22:49:35 +00:00
Justin Bertram 57aacf784c NO-JIRA fix lgtm.com warnings
Warnings enumerated at
https://lgtm.com/projects/g/apache/activemq-artemis/alerts/?mode=tree&severity=warning
2019-01-17 22:30:28 +00:00
Chao Wang b0886f09bf ARTEMIS-2227 add Implementation-Version for artemis-protocols module 2019-01-16 15:11:53 -05:00
Howard Gao 882da19c8a ARTEMIS-2229 Qpid jms consumer cannot receive from multicast queue using FQQN
If a client sends a message to a multicast address and using a qpid-jms
client to receive the message from one of the queues using fully
qualified queue name will fail with following error message:

Address xxxx is not configured for queue support
[condition = amqp:illegal-state]

It should be able to receive the message without any error.
2019-01-15 14:31:45 -05:00
Francesco Nigro 8281e3b58f ARTEMIS-2205 Optimizing some Lambda usages
https://issues.apache.org/jira/browse/ARTEMIS-2205
2019-01-10 16:39:56 +01:00
Clebert Suconic d79762fa04 ARTEMIS-2205 Refactor AMQP Processing into Netty Thread
These improvements were also part of this task:
- Routing is now cached as much as possible.
- A new Runnable is avoided for each individual message,
  since we use the Netty executor to perform delivery

https://issues.apache.org/jira/browse/ARTEMIS-2205
2019-01-10 16:39:56 +01:00
Justin Bertram 14e8b49558 ARTEMIS-2217 remove state on clean MQTT session disconnect 2019-01-09 16:48:55 -05:00
Carsten Lohmann d3233e45f6 ARTEMIS-2045 Add support for setting delivery annotations on outgoing message 2018-12-17 10:30:12 -06:00
Jiri Danek 56c7fb1a95 NO-JIRA Add forgotten @Test annotation and make helper methods private 2018-12-13 10:53:34 -06:00
Jiri Danek 94c158ebee NO-JIRA Fix errorprone error (duplicated expression in condition) 2018-12-13 10:53:34 -06:00
Timothy Bish 593348b9ad ARTEMIS-1938 Update proton-j to 0.30.0 and Qpid JMS 0.37.0
Update to latest proton-j release and refactor the dispostion code to use
the new type enums to better deal with the dispistions.  Updates to Qpid JMS
0.37.0 which still uses the current netty 4.1.28.Final dependency.
2018-11-15 20:18:37 -05:00
Justin Bertram e81453e660 ARTEMIS-2140 queue creation race w/AMQP shared subs 2018-11-14 10:49:15 -05:00
Michael André Pearce 5ac87609e7 ARTEMIS-2142 Refactor of Patchfix ServerJMSMessage
Refactor ServerJMSMessage so it correctly transposes all JMSX headers.
Push common JMSX mappings for JMS to Message Interface mappings into MessageUtil to avoid duplication in ActiveMQMessage and ServerJMSMessage
2018-11-14 09:58:34 -05:00
Michael André Pearce 14451a79eb ARTEMIS-2142 Patch Fix ServerJMSMessage for JMSXGROUPSEQ
This is a patch fix for JMSXGROUPSEQ.
2018-11-14 09:54:28 -05:00
Justin Bertram 2e53d8f5fb ARTEMIS-1929 race in STOMP w/identical durable subs 2018-11-08 07:55:29 +08:00
Howard Gao 72eadb201d ARTEMIS-1850 QueueControl.listDeliveringMessages returns empty result
With AMQP protocol when some messages are received in a transaction,
calling JMX QueueControl.listDeliveringMessages() returns empty list
before the transaction is committed.
2018-11-06 20:23:32 +08:00
Francesco Nigro b71c144891 ARTEMIS-2100 address routing-type overridden on attaching AMQP sender
AMQPSender has to honor an already existing multicast routingType
of an address while attempting to create a fresh new queue on it
2018-11-05 10:50:28 +00:00
Francesco Nigro 270b383e80 ARTEMIS-1710 Allow management msgs to exceed global-max-size limit 2018-11-03 23:34:59 +01:00
Clebert Suconic c62146802e ARTEMIS-2159 Fixing OpenWire Blocker Producer
Previous change on Flow control in OpenWire broke Blocked cases
This is a better fix.
2018-11-01 15:43:17 -04:00
Clebert Suconic 2f52e3ce2a Revert "ARTEMIS-2100 address routing-type overridden on attaching AMQP sender"
There are too many failures because of the semantic change here.

This reverts commit 1c17a4d59d.
2018-11-01 14:24:52 -04:00
Clebert Suconic 02a6d5bb49 ARTEMIS-2159 OpenWire would allow one extra send
Thanks to Otavio Piske collaborating a test change here.
2018-10-31 12:46:12 -04:00
Michael André Pearce faa6ffa3b4 ARTEMIS-2151 JMS Selectors broken in some cases
Create Test Case
Fix OpenWire so selectors are translated
Fix GroupID to call groupId method
2018-10-31 11:55:22 -04:00
Michael André Pearce f30ca44c82 ARTEMIS-2142 Support JMSXGroupSeq -1 to close/reset group.
Add test cases
Add GroupSequence to Message Interface
Implement Support closing/reset group in queue impl
Update Documentation (copy from activemq5)

Change/Fix OpenWireMessageConverter to use default of 0 if not set, for OpenWire as per documentation http://activemq.apache.org/activemq-message-properties.html
2018-10-30 16:24:33 -04:00
Francesco Nigro 1c17a4d59d ARTEMIS-2100 address routing-type overridden on attaching AMQP sender
An already existing address routing type should be taken
in consideration while chosing which routing type use when none
is configured
2018-10-30 16:22:10 -04:00
Michael André Pearce 547b2aa592 ARTEMIS-2117 Add custom LVQ Key and Non Destructive Queue into Broker
Implement custom LVQ Key and Non-Destructive in broker - protocol agnostic
Make feature configurable via broker.xml, core apis and activemqservercontrol 
Add last-value-key test cases
Add non-destructive with lvq test cases 
Add non-destructive with expiry-delay test cases
Update documents
Add new methods to support create, update with new attributes
Refactor to pass through queue-attributes in client side methods to reduce further method changes for adding new attributes in future and avoid methods with endless parameters. (note: in future this should prob be done server side too)

Update existing test cases and fake impls for new methods/attributes
2018-10-17 20:53:13 -04:00
Clebert Suconic 48d8a54135 ARTEMIS-2135 Test avoiding NPE under race 2018-10-17 17:24:51 -04:00
Ville Skyttä 74951d9221 NO-JIRA Log STOMP transaction starts with debug level instead of error 2018-10-11 13:43:39 -04:00
Justin Bertram b3529dcea4 ARTEMIS-1018 de-duplicate logging codes 2018-10-10 18:48:53 -04:00
gtully b812bfdbed ARTEMIS-2103 - use the full openwire consumer queue for the mapped virtual topic queue binding, fix and test 2018-10-10 18:48:11 -04:00
Clebert Suconic fceb9ea718 ARTEMIS-1898 Proper fix on AtomicRunnables and avoiding leaks
GlobalDiskFullTest was broken before this fix.
Basically when using multiple addresses over a session you would miss flow credits on all your producers except to the first one
that ran out of credit.
2018-10-10 18:32:58 -04:00
Clebert Suconic 48b5563241 ARTEMIS-2096 Fixing DivertTopicToQueueTest
This is fixing the test org.apache.activemq.artemis.tests.integration.amqp.DivertTopicToQueueTest

This test was broken because the copy wouldn't use the Buffer view gotten by data.duplicate().
2018-10-10 12:27:45 -04:00
Michael André Pearce 8e40b2d4f4 ARTEMIS-2095 - Typed Properties ThreadSafety
Add Concurrency Test to expose concurrency errors seen in logs.
Add Fix to ensure TypedProperties to ensure threadsafety
Add forEach and forEachKey to allow for provide a thread safe way of iterating through keys and values, without needing to duplicate the collection.
Add getMapNames method to remove code duplication and to ensure thread safe
2018-09-26 15:41:52 +01:00
Timothy Bish a851a8f93f ARTEMIS-2096 Refactor AMQMessage abstraction
Major refactoring of the AMQPMessage abstraction to resolve
some issue of message corruption still present in the code and
improve the API handling of message changes and re-encoding.

Improves handling of decoding of message sections limiting the
work to only the portions needed and ensuring the state data
is always updated with what has been done.  Fixes issues of
corrupt state on copy of message or other changes in filters.
2018-09-26 09:19:40 -04:00
andytaylor 82795b7bff ARTEMIS-1898 - make sure tosend credits on rejected messages
And also to run the credit runnables once memory is free in fail mode

https://issues.apache.org/jira/browse/ARTEMIS-1898
2018-09-13 16:22:28 -04:00
Timothy Bish 369e475af6 ARTEMIS-2083 Decode only the relavent portions of the message
Ensure that the Body of the message is never decoded in the partial
decode phase of the message processing and also gaurd against the
decode of ApplicationProperties which should be done lazily.  Add
lazy decode of DeliveryAnnotations as they are not used at present.
2018-09-12 16:50:00 -04:00
Timothy Bish d1939620c0 ARTEMIS-2067 Clean up some code in the AMQP protocol handling paths
Cleans up some of the code on the proton event handler, most noteable:

1. Fix IOCallback creation on each outbound send, use single instance
as the handler only ever does a flush and has no attached state.
2. Fix redundent locking and unlocking of connection lock on the event
path that already ensures that lock is held.
3. Set presettle state on the server sender at attach as it cannot
change afterwards so checking on every message is not needed.
4. Improve buffer type checking on receive to reduce amount of work
2018-09-12 12:23:49 -04:00
Francesco Nigro 3c7252adbc ARTEMIS-2068 save reading any file to get AMQP large msg size
ServerJMSBytesMessage::getBodyLength can save reading
the whole large message file by reading just its
file size
2018-09-11 16:36:45 -04:00
Francesco Nigro 7a7304bb28 ARTEMIS-2078 AMQP large msg aren't consumed by clusters without persistence
NullStorageLargeServerMessage is not correctly exposing its body buffer
to allow CoreAmqpConverter to convert it into an AMQPMessage
2018-09-11 16:35:15 -04:00
Timothy Bish e065e3e960 ARTEMIS-2082 Reset buffer valid flag after re-encoding the message
Once a re-encode of the message is done the buffer is not being marked
as valid and so subsequent checks on the buffer are all assuming the
message data is not valid and re-encoding over and over.  This can lead
to poor performance in some cases and corrupted data in others.
2018-09-11 15:45:51 -04:00
Justin Bertram 24fa0f9203 ARTEMIS-2072 refactor logic to fix tests 2018-09-06 12:53:57 -05:00
Justin Bertram d91da412c3 ARTEMIS-2072 eliminate unnecessary binding queries 2018-09-04 13:27:28 -04:00
Carsten Lohmann fab96c4b1c ARTEMIS-2058 Support any kind of extraProperties in AmqpCoreConverter 2018-09-04 13:17:22 -04:00
andytaylor f4b77a2cb4 ARTEMIS-2073 - make sure connection gets set for interceptors
https://issues.apache.org/jira/browse/ARTEMIS-2073
2018-09-04 12:54:21 -04:00
Clebert Suconic 34fa0dded6 ARTEMIS-2052 Fixing initial credit negotiation 2018-08-29 13:37:48 -04:00
Timothy Bish 960833d2be ARTEMIS-2062 Only attempt to refill credit when needed
Avoid firing the offerProducerCredit code when we know that the credit
isnt low enough that a refill is needed, which avoids lock contention
and garbage creation as each inbound message is processed.
2018-08-29 10:51:18 +01:00
Timothy Bish 34254095c8 ARTEMIS-2057 Fix runaway credit grants
Ensure the broker looks at local receiver credit when checking for
credit top off threshold and then do a proper top off back to the high
water mark to sync with how client receivers manage their credit.
2018-08-28 12:45:31 -04:00
Timothy Bish 2c7896cef6 ARTEMIS-1938 Update Qpid JMS along with Proton and Netty
Update the Qpid JMS and Proton dependencies to lastest and sync Netty
with the 4.1.28.Final version used by Qpid JMS to avoid clash that
breaks a test.  Adds override of new Proton-J WritableBuffer API that
allows it to use the Netty String encoder when needed instead of the
slower default version.

Update Qpid JMS to v0.36.0
Proton-J to v0.29.0
Netty to 4.1.28.Final
2018-08-25 07:22:53 +01:00
Robbie Gemmell e1ba608d64 ARTEMIS-2027: handle aborted AMQP deliveries 2018-08-13 14:01:01 +01:00
Howard Gao e15f3901e4 ARTEMIS-2013 Can't create durable subscriber to a composite topic
An OpenWire client can use a compound destination name of the form
"a,b,c..." and consume from, or subscribe to, multiple destinations.
Such a compound destination only works for topics when the subscriber
is non-durable. Attempting to create a durable subscription on a
compound address will end up with an error.

The cause is when creating durable subs to multiple topics/addresses
the broker uses the same name to create internal queues, which
causes duplicate name conflict.
2018-08-09 19:38:36 -04:00
Clebert Suconic e290071ced ARTEMIS-1732 Fixing AMQPSenderTest 2018-08-01 22:14:15 -04:00
Clebert Suconic 0e36e072bd ARTEMIS-1732 I simplified some of the changes performed at the previous commit.
Also I changed GlobalDiskFullTest to actually block the senders.
I moved the Runnables from PagingManager into the Util as AtomicRunnable.
2018-07-31 21:39:04 -04:00
Howard Gao 53e1d60160 ARTEMIS-1732 AMQP anonymous producer not blocked on max-disk-usage
Anonymous senders (those created without a target address) are not
blocked when max-disk-usage is reached. The cause is that when such
a sender is created on the broker, the broker doesn't check the
disk/memory usage and gives out the credit immediately.
2018-07-31 21:39:01 -04:00
Benjamin Graf 4ae8c7bab3 ARTEMIS-1985: Switch from XA_RDONLY to XA_OK as return value for prepare transaction via OpenWire 2018-07-31 12:41:53 -04:00
Justin Bertram e2bae7856d ARTEMIS-1941 fix failing tests 2018-07-09 17:35:51 -04:00
Timothy Bish a63b0315c4 ARTEMIS-1941 Preserve AMQP body section type on "large" messages
When "large" messages are converted to / from core in order to be stored
in the large message store the type of the AMQP body section is being
lost and reconstituted incorrectly in some cases.  The message needs to
be annotated with the original AMQP type for the body and that used to
manage the conversion back to AMQP from Core.
2018-07-02 13:58:45 -05:00
Clebert Suconic efd966d88d ARTEMIS-1928 Fixing body conversion of LargeMessages to AMQP 2018-06-22 15:48:15 -04:00
Justin Bertram c0d28432ad NO-JIRA STOMP frame logging 2018-06-22 15:47:14 -04:00
Justin Bertram 1ed7a616ee ARTEMIS-1930 require STOMP durable sub name to unsubscribe 2018-06-22 15:47:14 -04:00
Robbie Gemmell ed2a18f1c4 ARTEMIS-1940: restore use of copying send in certain edge cases
Avoids pooling corner cases interacting with ARTEMIS 1843 + ARTEMIS 1861 improvements.

Also tagging ARTEMIS-1941 to note test needs altered along with it.
2018-06-18 19:30:26 +01:00
Robbie Gemmell 9a3442f0bd ARTEMIS-1934: fix handling/accounting of sent amqp connection data
updates max frame size tests to verify behaviour seen with standalone
brokers rather than non represenative test-only conditions, as well
as more closely validate the recieved messages
2018-06-15 20:27:28 +01:00
Clebert Suconic b360fa6063 ARTEMIS-1935: Close of openwire connection should closes all open sessions
This is my ammending to the last commit
I'm adding some extra verifications to the test
and I fixed a leak that already existed on the previous map
2018-06-15 10:33:55 -04:00
Benjamin Graf 39871157b4 ARTEMIS-1935: Close of openwire connection should closes all open sessions 2018-06-15 10:33:55 -04:00
Keith Wall 89f6350c1c ARTEMIS-1893: Treat the detach of a link with expiry policy of link-detatch as if closed flag were true. 2018-06-12 10:12:19 -04:00
Clebert Suconic cb793e0e98 ARTEMIS-1924 Add amqpIdleTimeout 2018-06-11 18:37:11 -04:00
Clebert Suconic de0747a9a4 ARTEMIS-1920 AMQP throw NPE if can't find a backup server 2018-06-08 17:42:37 -04:00