Commit Graph

370 Commits

Author SHA1 Message Date
Dmitry Volodin dbb3a90fe6 ARTEMIS-2322: Expose Queue.getRate() data as JMX metric 2019-07-15 16:34:31 -04:00
Clebert Suconic 2a84a6fd22 ARTEMIS-2390 Small improvement on UUID Conversion 2019-06-27 10:40:45 -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
Clebert Suconic b7047faea5 NO-JIRA Adding checking for leaking server socket 2019-05-31 19:06:15 -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 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
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 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
Jiri Danek 4014aa0157 ARTEMIS-2320 AtomicFieldUpdater field not declared 'static final' 2019-04-29 11:28:10 +01:00
Jiri Danek b33874488b ARTEMIS-2320 Assorted small code fixes, mostly from IntelliJ autofixes 2019-04-29 11:28:10 +01:00
Jiri Danek 7820011d63 ARTEMIS-2320 Fix MathAbsoluteRandom errorprone warning
Math.abs does not always give a positive result. Please consider other methods for positive random numbers.
2019-04-29 11:27:29 +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
Michael André Pearce 98b3177e6e ARTEMIS-2306 Make key used for group first for consumer configurable
Add tests
Add implementation details
2019-04-16 15:43:16 -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
Clebert Suconic cf2540ebb1 ARTEMIS-2301 Minor change on Epoll and kQueue.isAvailable
just checking for NoClassDefFound and return false
2019-04-11 18:06:50 -04:00
Clebert Suconic 720f60ace2 ARTEMIS-2297 Avoiding Split Brains during replication catch up when no quorum is established 2019-04-10 07:52:08 -04: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 fb549ebe44 ARTEMIS-2273 Adding Audit Log
The Audit log allows user to log some important actions,
such as ones performed via management APIs or clients,
like queue management, sending messages, etc.
The log tries to record who (the user if any) doing what
(like deleting a queue) with arguments (if any) and timestamps.

By default the audit log is disabled. Through configuration can
be easily turned on.
2019-03-14 12:24:59 -04:00
Francesco Nigro 79ca203d6d Revert "ARTEMIS-2240 ActiveMQThreadPoolExecutor should use LinkedTransferQueue"
This reverts commit ea29483449
2019-03-13 13:47:19 -04:00
Clebert Suconic 596b9eea23 ARTEMIS-2211 fixing checkstyle 2019-03-12 19:58:34 -04:00
Francesco Nigro 89c02f1cc0 ARTEMIS-2211 Refactor ByteBuffer pooling, alignment and zeroing
Refactored thread local ByteBuffer pooling, alignment
and zeroing in order to avoid duplicate code and
improve code coverage with tests.
In addition are being provided faster branchless
alignment operations and optional zeroing of
pooled ByteBuffers for both ASYNCIO and
NIO/MAPPED journal types.
2019-03-12 18:32:53 -04:00
Michael André Pearce 4a5af776d8 ARTEMIS-2265 Support Federated Queues and Addresses
Implement Federated Queue (builds on recent consumer priority)
Implement Federated Address (builds on recent queue level auto-delete)
Add Functional Tests
Add Failure Tests (remote and local shutdowns)
Add Documentation
2019-03-07 14:37:00 -05:00
Michael André Pearce 9b01e9521c ARTEMIS-2263 Support queue level auto-delete configuration
Add ability to configure when creating auto created queues at the queue level
Add support for configuring message count check
Add test cases
Update docs
2019-02-27 08:13:19 +00:00
Michael André Pearce c4e68b6046 ARTEMIS-2118 Enhanced Message Groups Support
Support using group buckets on a queue for better local group scaling
Support disabling message groups on a queue
Support rebalancing groups when a consumer is added.
2019-02-21 19:58:34 -05:00
Jiri Danek b8df8dead3 NO-JIRA Fix a "Dereference null return value" Coverity Scan warning
The value checked for null was not the one that was subsequently used.
2019-02-19 17:34:59 -05:00
Jiri Danek 6fc6787227 NO-JIRA Fix a "Computation of average could overflow" SpotBugs warning
https://spotbugs.readthedocs.io/en/stable/bugDescriptions.html#im-computation-of-average-could-overflow-im-average-computation-could-overflow
2019-02-14 13:22:11 +01:00
Clebert Suconic b80a78d885 ARTEMIS-1058 Fixing testsuite
Possible NPE that will happen on ReplicatedFailoverTest only
2019-02-12 09:42:31 +01:00
Clebert Suconic 8edca409f6 ARTEMIS-2246 Fixing testsuite 2019-02-08 18:42:02 -05:00
Clebert Suconic 59ada66033 ARTEMIS-1058 Improving web temporary cleanup
* Using SpawnedVMSupport (used to be on testsuite, moving it to Utils)
* Building the classpath for ./lib, similar to what happens on Bootstrap
* Using Path as much as possible to avoid issues encoding files
2019-02-06 09:36:04 -05:00
Francesco Nigro ea29483449 ARTEMIS-2240 ActiveMQThreadPoolExecutor should use LinkedTransferQueue 2019-01-30 08:14:57 +00:00
Michael André Pearce cf65912bcc ARTEMIS-2170 Optimized CoreMessage clearInternalProperties
Ensure only iterate properties, if internal property is set.
2019-01-24 08:31:10 +00:00
Francesco Nigro 6446d01a15 ARTEMIS-2170 Optimized CoreMessage check and cleanup methods
Any checkProperties();<usage of this.properties> pattern has been
replaced by an atomic checkProperties().<usage of returned properties>
to help both performance and consistency.
The cleanup is now performed into CoreTypedProperties both
for performance reasons (avoid lock/unlock many times)
and consistency, given that the operation is now atomic.
2019-01-24 08:31:10 +00: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
Michael André Pearce d4c41e45bc ARTEMIS-2236 Address Latency Impact caused by ARTEMIS-1451
Readdress ARTEMIS-1451 concern of sync blocks, remove synchronization by simplifying original code and using atomics.
2019-01-23 10:01:40 +00:00
Michael André Pearce b9a063f2e7 ARTEMIS-2236 - Revert Original ARTEMIS-1451
This reverts commit f8b758d1
2019-01-23 09:54:19 +00: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 7fe45dea0b NO-JIRA Fix possible IOE
This array access might be out of bounds, as the index might be equal to the array length.
2019-01-18 08:33:49 +00:00
Justin Bertram bfefd1f1ed NO-JIRA fix lgtm.com errors
Errors enumerated at
https://lgtm.com/projects/g/apache/activemq-artemis/alerts/?mode=tree&severity=error
2019-01-17 22:37:01 +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
Francesco Nigro e541126ca6 ARTEMIS-2224 lock-free LivePageCache + tests
LivePageCacheImpl has been reimplemented to be
lock-free, multi-producer and multi-consumer
in any of its operations.
2019-01-14 11:40:41 -05:00
Justin Bertram 3e5a2f4951 NO-JIRA improve logging for test System prop cleanup 2018-11-15 20:18:19 -05:00
Emmanuel Hugonnet 80525f1c91
[ARTEMIS-2163]: Classloading issue if artemis-commons is not in the same classloader as artemis-client-* or artemis-server.
* Passing the owner class to define the classloader to load classes via ClassLoadingUtil with artemis-commons in a different classloader..

JIRA: https://issues.apache.org/jira/browse/ARTEMIS-2163
2018-11-14 18:23:30 +01: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
Clebert Suconic 8f9b75cc5d ARTEMIS-2157 Extra information on CriticalAnalyzer and its components 2018-10-31 11:41:55 -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
Justin Bertram cbace51d6c ARTEMIS-2121 reload logging config at runtime
Many thanks to James Perkins who supplied the guts of the reload logic.
2018-10-11 11:28:25 -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 1369690f57 ARTEMIS-1894 Avoiding apache.org URL on codebase 2018-09-27 14:51:19 -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
Justin Bertram 5d329a70d1 ARTEMIS-2087 fix NPE; mask password in example 2018-09-26 09:20:24 -04:00
henock 153e0a0260
NO-JIRA - Update SimpleString to give a more useful error message
Currently we get.
java.lang.IndexOutOfBoundsException: null
at org.apache.activemq.artemis.api.core.SimpleString.readSimpleString(SimpleString.java:183)
at org.apache.activemq.artemis.api.core.SimpleString$ByteBufSimpleStringPool.create(SimpleString.java:584)
....

Should be
java.lang.IndexOutOfBoundsException: Error reading in simpleString, length=YYY is greater than readableBytes=XXX
at org.apache.activemq.artemis.api.core.SimpleString.readSimpleString(SimpleString.java:183)
at org.apache.activemq.artemis.api.core.SimpleString$ByteBufSimpleStringPool.create(SimpleString.java:584)
...
2018-09-11 14:48:17 +01:00
Clebert Suconic 55b0d5b0ea ARTEMIS-2047 Compatible option for ActiveMQJMSClient 2018-08-21 22:05:29 -04:00
Clebert Suconic 63e6cd98f8 ARTEMIS-2046 Fixing issues with JournalStorageManager.stop in replication, JDBC and shared storage 2018-08-20 21:25:57 -04:00
Clebert Suconic 6bdfcd04f5 ARTEMIS-2021 setting flag before shutdown 2018-08-09 19:16:23 -04:00
Clebert Suconic 26208b76c7 ARTEMIS-2021 NetworkHealthCheck should only restart servers after net outages 2018-08-09 19:08:02 -04:00
Michael André Pearce 5d8079845e ARTEMIS-1482 Enhance test to ensure len check is done before byte[] init
Set the int to Integer.MAX_VALUE thus if the len check is not done before byte[] initialization the test would blow with an OOM.
2018-08-09 15:54:54 +01:00
Francesco Nigro 64cf5357e1 ARTEMIS-2015 PriorityLinkedListImpl::isEmpty is not thread-safe
PriorityLinkedListImpl::size access is changed to be safely
observable by a thread different from the one allowed to write
the list.
2018-08-08 14:25:28 -04:00
Martyn Taylor 985d1e1fcb ARTEMIS-1482 Add back check for SimpleString 2018-08-08 14:23:53 -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
Michael André Pearce 8a9835a394 ARTEMIS-856 - Support consumersBeforeDispatch and delayBeforeDispatch
https://issues.apache.org/jira/browse/ARTEMIS-856

This is equivalent to consumersBeforeDispatchStarts and timeBeforeDispatchStarts in ActiveMQ 5.x

http://activemq.apache.org/message-groups.html

This is addressing one of the items on the artemis roadmap: http://activemq.apache.org/activemq-artemis-roadmap.html
2018-07-31 16:16:51 +01:00
Clebert Suconic af56b67e38 [maven-release-plugin] prepare for next development iteration 2018-05-16 11:03:26 -04:00
Clebert Suconic bcaa11c2ee [maven-release-plugin] prepare release 2.6.0 2018-05-16 11:03:14 -04:00
Michael André Pearce aad45ad592 ARTEMIS-1783 Remove need for guava
Replace guava Preconditions with artemis Preconditions
Replace guava Predicate with java Predicate
Replace guava Ordering with java Comparator
Replace guava Immutable, with ArrayList/Set and then wrap with unmodifiable
2018-05-14 09:45:41 -04:00
Michael André Pearce 19418630d4 ARTEMIS-1783 Remove need for guava in client
Refactor away from Guava memorize based on Guava Supplier to using java.util.Supplier and our own memorizer code.
2018-05-14 09:45:41 -04:00
Clebert Suconic bc09a8011d NO-JIRA More Strict settings for test thread leaks
I'm investigating thread leakages and previous change on this class here is biting me.
2018-05-04 22:43:56 -04:00
Timothy Bish 8f4b1a6c18 ARTEMIS-1847 Fix test after netty upgrade
Missing call to resetReadIndex causes IndexOutOfBoundsException after
netty fixed to correctly throw on vilation of the contract.
2018-05-03 14:47:55 -04:00
Clebert Suconic 2a3b67d921 ARTEMIS-1801 Fixing checkstyle after NullCheck fix 2018-05-03 13:14:50 -04:00
Stanislav Knot b67008c4ca ARTEMIS-1801 removing null-unchecked dereferences 2018-05-03 12:42:42 -04:00
Justin Bertram a294dc9493 ARTEMIS-1701 strip zone id from IPv6 host 2018-04-06 14:00:02 -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 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
Clebert Suconic 9ae059baeb ARTEMIS-1345 Making TestProperties a little easier on slow CIs
using less iterations, making it less risky on slow hypervisors
2018-03-08 10:50:56 -05:00
Clebert Suconic 8831a570de ARTEMIS-1345 ConcurrentModificationException after copy 2018-03-07 18:05:35 -05:00
Justin Bertram 44305694f7 ARTEMIS-1719 fix ThreadLeakCheckRule after Netty upgrade 2018-03-05 21:12:55 -06:00
Clebert Suconic e4e864d88e NO-JIRA Speeding up ReattachTest 2018-03-01 14:40:30 -05:00
Clebert Suconic c6028c779f NO-JIRA Adding known threads to stick around 2018-02-27 13:06:35 -05:00
Francesco Nigro 60dbeae438 ARTEMIS-1702 ConcurrentLongHashMap and ConcurrentLongHashSet should avoid volatile set cost on put/remove
Most of the visibility guarantees of size/capacity fields modifications are already provided through optimistic locking, hence it could be used it instead of volatile set(s) on put/remove, making those methods more efficient.
2018-02-26 17:38:36 -05:00
Clebert Suconic ecf4110b1b ARTEMIS-1700 Fixed deadlock in paging state
This closes #1894
2018-02-26 16:06:04 -05:00
Michael André Pearce 2c32dda39e ARTEMIS-1664 fix npe bug while getting element in the process of rehash
Apply same fix to ConcurrentLongHashSet
2018-02-22 20:47:42 -05:00
yang wei 6509c078fb ARTEMIS-1664 fix npe bug while getting element in the process of rehash 2018-02-22 20:47:42 -05:00
Justin Bertram c1900e5ac3 ARTEMIS-1684 disable problematic tests 2018-02-21 11:06:25 -06:00
Clebert Suconic 55521e85c9 NO-JIRA Changing port on test as it will clash with the CI if running at 8080 2018-02-21 11:38:47 -05:00
Justin Bertram 5748627477 ARTEMIS-1687 reduce logging for fast-tests
Logging for the "fast-tests" profile used for PR builds could be reduced
significantly. This would save time as well as prevent log truncation
(Travis CI only supports logs up to 4MB).
2018-02-20 15:12:43 -05:00
Michael André Pearce 38c45c9214 ARTEMIS-853 Support for exclusive consumers
Rationalise and re-use URISupport.
2018-02-07 15:27:29 +00: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
Martyn Taylor 7576b9d586 ARTEMIS-1611 Added support for 1.x transformer API 2018-02-05 16:32:03 +00:00
Clebert Suconic 8e058d2a76 ARTEMIS-1626 Thread check will not throw leaks failures for previously failed tests
This closes #1800
2018-01-23 10:17:53 -05:00
Francesco Nigro 051a3cae49 ARTEMIS-1616 OpenWire improvements
Optimized SimpleString::split because heavily used into AddressImpl::new
2018-01-22 18:02:03 -05:00
Francesco Nigro 3f646474c2 ARTEMIS-1622 Reduce memory footprint of QueueImpl
LinkedListImpl is turned into an optionally intrusive linked list by allowing message references to extend Node.
2018-01-22 17:30:45 +00:00
Howard Gao bb84f67936 ARTEMIS-1600 Support masked passwords in bootstrap.xm and login.config
We provide a feature to mask passwords in the configuration files.
However, passwords in the bootstrap.xml (when the console is
secured with HTTPS) cannot be masked. This enhancement has
been opened to allow passwords in the bootstrap.xml to be masked
using the built-in masking feature provided by the broker.

Also the LDAPLoginModule configuration (in login.config) has a
connection password attribute that also needs this mask support.

In addition the ENC() syntax is supported for password masking
to replace the old 'mask-password' flag.
2018-01-18 08:59:00 -06:00
Francesco Nigro 57e93ff9d0 ARTEMIS-1615 Duplicate TypedProperties::checkCreateProperties 2018-01-17 15:21:10 +01:00
Francesco Nigro 52f7a698d9 ARTEMIS-1573 Improve UTF translation allowing zero copy
The UTF translations has been improved by:
- zero copy on array based buffers
- zero copy UTF length calculation
- faster array access using Netty PlatformDependent.get|putByte
- improved perf tests UTF8Test
2018-01-17 09:36:42 +01:00
Francesco Nigro a3c418183a ARTEMIS-1586 Added String Pools unit tests
- SimpleString::toSimpleString String pooling test
- ByteBufSimpleStringPool test
- StringSimpleStringPool test
- ByteBufStringValuePool test
2018-01-17 09:33:41 +01: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