Commit Graph

577 Commits

Author SHA1 Message Date
Timothy Bish fc32bc0b07 ARTEMIS-1780 Handle conversion of large ObjectMessage types
Make sure the correct buffer is used when decoding the stored Core
message that originated from the conversion of an AMQP message sent and
annotated as a JMS ObjectMessage which trips the large message boundary.
2018-04-03 22:27:43 -04:00
Francesco Nigro f6e8345dbe ARTEMIS-1772 Reduce memory footprint and allocations of QueueImpl
It includes:
- Message References: no longer uses boxed primitives and AtomicInteger
- Node: intrusive nodes no longer need a reference field holding itself
- RefCountMessage: no longer uses AtomicInteger, but AtomicIntegerFieldUpdater
2018-04-03 11:01:38 -04:00
Clebert Suconic e86acd4824 ARTEMIS-1765 Fixing Large Message Compression and Conversion 2018-03-22 16:11:11 -04:00
Ulf Lilleengen be6cb7a22f ARTEMIS-1748: Cleanup connections when client connector is destroyed 2018-03-22 10:46:40 -05:00
gtully 72ec6c8e0b [ARTEMIS-1758] support SASL EXTERNAL with TextCertLoginModule
- rework proton handler to use saslListener
2018-03-22 10:09:58 -04:00
Clebert Suconic a7333bcf9d ARTEMIS-1286 Fixing MQTT Bytes message encode 2018-03-14 18:39:58 -04:00
Clebert Suconic 920af19adb [maven-release-plugin] prepare for next development iteration 2018-03-12 12:46:27 -04:00
Clebert Suconic 5f5b1dcf8f [maven-release-plugin] prepare release 2.5.0 2018-03-12 12:46:16 -04:00
Timothy Bish 169d0b7fa7 ARTEMIS-1722 Don't copy message bytes unless needed
Alternate patch that doesn't copy the message bytes unless doing a
redelivery or skipping delivery annotations in the original version of
the message.  Proton-J will copy the bytes provided to the Sender's send
method so a copy isn't necessary on most common sends.
2018-03-06 18:44:22 -05:00
Christopher L. Shannon (cshannon) 29250466ae ARTEMIS-1727 - Make sure transport is stopped on failed OpenWire
connection

To prevent a socket from hanging open by a bad client the broker should
make sure to stop the transport if a connection attempt fails by an
OpenWire client
2018-03-05 07:45:42 -05:00
Christopher L. Shannon (cshannon) da3dd29101 ARTEMIS-1726 - check proper permissions when using OpenWire
Ensure that on queue creation and deletion that the proper permissions
are checked
2018-03-02 16:47:23 -05:00
Timothy Bish 79674ca5db ARTEMIS-1504 Update Qpid JMS to 0.30.0 and proton-j to 0.26.0
Updates to latest Qpid JMS and the latest Proton-J release
2018-03-02 08:57:20 -05:00
Christopher L. Shannon (cshannon) 8e9ee80892 ARTEMIS-1711 - Fix openwire exlusive divert
Fixing the failure on send from an OpenWire producer when an exclusive
divert exists
2018-02-28 17:35:56 -05:00
Christopher L. Shannon (cshannon) d4041b5a72 ARTEMIS-1713 - Fix NPE inside OpenWireConnection
fix NPE inside getClientId() in OpenWireConnection
2018-02-28 14:06:36 -05:00
Timothy Bish 8fc1e00d88 ARTEMIS-1712 Add additional null check in TX rollback handler
Check for AMQSession being null before handling various TX state checks
in order to ensure the correct errors are thrown and TX rollback is
handled properly.
2018-02-28 10:46:31 -05:00
Timothy Bish 38fb17703b ARTEMIS-1707 Check for already exists exceptions and ignore
For address and queue create check for the already exists exceptions and
ignore as another client might have just created the same
2018-02-27 16:30:45 -05:00
Francesco Nigro b5fa5ed3b7 ARTEMIS-1656 OpenWire scalability improvements
OpenWireFormat instances are shared between OpenWire connections/sessions/consumers, preventing the clients to scale due to the synchronized marshal/unmarshal on it.

It includes:
- direct transport buffer pooling
- groupId SimpleString pooling
- clientId SimpleString pooling
- reduced ActiveMQDestination[] and AtomicLong allocations on AMQSession:send
- reduced ActiveMQDestination allocations
- refactored shouldBlockProducer path of AMQPSession::send to reduce method size
- exclusive OpenWireFormat per session and connection (in/out) to avoid contention
- refactored trace log to favour inlining
- changed lastSent volatile set into lazy set to avoid full barrier cost on x86
- stateless OpenWireMessageConverter
- send's lock removal thanks to thread-safe NettyConnection
2018-02-27 20:41:24 +08:00
Christopher L. Shannon (cshannon) 2ea0dce6c7 ARTEMIS-1695 - Improve STOMP compatiblity with 5.x clients
Also make sure on authentication error in version 1.0 a client will
disconnect
2018-02-22 16:22:40 -05:00
Dejan Bosanac 1f06ec07e6 ARTEMIS-1685 Set MQTT connection clientID before session creation 2018-02-20 23:54:08 -05:00
Clebert Suconic 5480d7bc5b NO-JIRA Fixing Deadlock on MQTTConnection
Found during a testsuite run
2018-02-14 10:59:23 -05:00
Clebert Suconic 996871e37c ARTEMIS-1675 Adding --safe option on print-data
This is good when you are a customer and an artemis engineer (e.g. me) asks your journal print-data but you can't do it because that would expose your user's data. If you do artemis data print --safe, that will only expose the journal structure without exposing user's data and eliminate any liability between the engineer and users.
2018-02-12 16:01:09 -05:00
Christopher L. Shannon (cshannon) ea70af15a3 ARTEMIS-1663 - Add new message count and size metrics
Adding new metrics for tracking message counts and sizes on a Queue.
This includes tracking metrics for pending, delivering and scheduled
messages.  The paging store also tracks message size now.
2018-02-08 11:35:12 -05:00
Michael André Pearce dc41f3ca49 ARTEMIS-853 Support for exclusive consumers
Support exlusive consumer
Allow default address level settings for exclusive consumer
Allow queue level setting in broker.xml
Add the ability to set queue settings via Core JMS using address. Similar to ActiveMQ 5.X
Allow for Core JMS client to define exclusive consumer using address parameters
Add tests
2018-02-07 15:27:29 +00:00
Stanislav Knot a259b6972c ARTEMIS-1646 fix for browsing messages sent via JS client 2018-02-05 16:10:02 +00:00
Justin Bertram 9c8bf2f2ca ARTEMIS-1644 legacy clients can't access resources with old prefixes 2018-01-31 18:13:29 -05:00
Clebert Suconic 5653ec9980 ARTEMIS-1639 Simplifying/fixing test and improving update topology 2018-01-31 18:05:32 -05:00
Howard Gao 1693db0177 ARTEMIS-1639 HornetQClientProtocolManager sending unsupported packet
HornetQClientProtocolManager is used to connect HornteQ servers.
During reconnect, it sends a CheckFailoverMessage packet to the
server as part of reconnection. This packet is not supported by
HornetQ server (existing release), so it will break the backward
compatibility.

Also fixed a failover issue where a hornetq NettyConnector's
ConnectorFactory is serialized to the clients who cannot
instantiate it because class not found exception.
2018-01-31 18:05:32 -05:00
jostbg 6483f139f3 ARTEMIS-1629 Set cxn clientID before validating 2018-01-23 16:37:03 -06:00
Justin Bertram 439761d6b8 ARTEMIS-1408 document synchronization 2018-01-23 17:07:33 +00:00
Francesco Nigro 56d68f0b72 ARTEMIS-1607 OpenWire is sending responses too early with durable messages
AMQSession is sending response back without waiting past I/O tasks on StorageManager to be finished
2018-01-23 11:51:41 -05:00
Francesco Nigro 0387b1a842 ARTEMIS-1616 OpenWire improvements
Refactored OpenWireMessageConverter::inbound into a private static method
2018-01-22 18:02:03 -05:00
Francesco Nigro c6b6dd95d1 ARTEMIS-1616 OpenWire improvements
Refactored OpenWireMessageConverter::toAMQMessage into smaller methods
2018-01-22 18:02:03 -05:00
Francesco Nigro e7a1dca7b5 ARTEMIS-1616 OpenWire improvements
Used SimpleString on AMQSession with HDR_DUPLICATE_DETECTION_ID and CONNECTION_ID_PROPERTY_NAME
2018-01-22 18:02:03 -05:00
Francesco Nigro 9650c80ba7 ARTEMIS-1616 OpenWire improvements
Cached Notification Destination check on AMQConsumer to avoid expensive ActiveMQDestination::toString
2018-01-22 18:02:03 -05:00
Francesco Nigro 64724c3520 ARTEMIS-1616 OpenWire improvements
Used SimpleString on OpenWireMessageConverter to avoid translations on CoreMessage
2018-01-22 18:02:03 -05:00
Francesco Nigro 17c0a331ac ARTEMIS-1616 OpenWire improvements
Added existing queues cache to avoid multiple expensive AMQSession::checkAutoCreateQueue calls
2018-01-22 18:02:03 -05:00
Francesco Nigro 54d0161850 ARTEMIS-1616 OpenWire improvements
Refactored OpenWireMessageConverter::inbound into smaller methods
2018-01-22 18:02:03 -05:00
Francesco Nigro 2db4eafc4d ARTEMIS-1616 OpenWire improvements
Avoided copy of CoreMessage when not needed and cached lambda on hot path
2018-01-22 18:02:03 -05:00
gtully 82e4f465ee [ARTEMIS-1030] add support for auto mapping openwire virtual topic consumer destinations to FQQN 2018-01-22 11:10:46 +00:00
gtully b6612c9505 [ARTEMIS-1552] differenciate empty frame from no frame such that a null response is accepted when valid 2018-01-19 14:19:54 +00:00
Christopher L. Shannon (cshannon) 3aef7caac6 ARTEMIS-1617 - Properly set autoCreated flag on address
Flag needs to be set when auto creating an address so that the address
can be removed later if auto delete is configured when creating a
subscription with MQTT
2018-01-18 08:59:35 -06:00
jostbg 3334863e81 ARTEMIS-1589 ActiveMQProtonRemotingConnection#getClientID() now returns remote client Id instead of server client Id 2018-01-17 16:54:43 -05:00
gtully ea266cd74b [ARTEMIS-1241] check for FQQN to parse out address and queue for auto creation 2018-01-17 13:23:23 -05:00
Michael André Pearce 98028cdecc ARTEMIS-1586 Refactor to make more generic
* Move byte util code into ByteUtil
* Re-use the new equals method in SimpleString
* Apply same pools/interners to client decode
* Create String to SimpleString pools/interners for property access via String keys (producer and consumer benefits)
* Lazy init the pools on withing the get methods of CoreMessageObjectPools to get the specific pool, to avoid having this scattered every where.
* reduce SimpleString creation in conversion to/from core message methods with JMS wrapper.
* reduce SimpleString creation in conversion to/from Core in OpenWire, AMQP, MQTT.
2018-01-17 09:33:41 +01:00
Justin Bertram 6b033b5b8d ARTEMIS-1602 avoid potential NPE if property is null 2018-01-16 10:04:37 -05:00
jostbg dffc66496e ARTEMIS-1596 wrong routing-type for STOMP autocreated address/queue 2018-01-12 15:12:03 -06:00
jostbg b8f591b6b9 ARTEMIS-1601 deal with race in Stomp sendMessage
If the Stomp consumer was closed at or near the same time a message was
dispatched then an NPE might result. Throwing an exception is a
relatively expensive operation in the JVM because of the stacktrace
information that needs to be generated, so in cases where it is known
that a null value could be returned one should check and handle it
appropriately.
2018-01-11 11:42:56 -06:00
Justin Bertram 14d6c30852 ARTEMIS-1576 anon AMQP producer creates address w/wrong routing-type 2018-01-05 12:47:01 +00:00
Howard Gao 6792dcdf27 ARTEMIS-1566 Openwire client can't receive compressed messages
When openwire client uses compressed option to send messages
(jms.useCompression=true) openwire client failed to receive them.
The reason is in OpenwireMessageConverter.toAMQMessage():

1. message.setContent() should be called after setting properties
 (It will cause the compressed content to decompressed before delivering to clients)
2. message.onSend() should not be called here (it should be used
by producers. If used here it changes the internal flags of the
message and cause receive to fail).
2017-12-20 16:00:14 -05:00
Stanislav Knot 45b25d6847 ARTEMIS-1329 fix openwire noLocal flag 2017-12-20 15:59:36 -05:00