Commit Graph

668 Commits

Author SHA1 Message Date
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