Commit Graph

509 Commits

Author SHA1 Message Date
gtully fa04881c6f ARTEMIS-2888 ARTEMIS-2859 ARTEMIS-2768 - new page-store-name addressSetting to allow wildcard subscriptions share a single page store 2020-09-24 09:39:31 +01:00
Justin Bertram 246bf08391 ARTEMIS-2909 revert ARTEMIS-2322
This reverts commit dbb3a90fe6.

The org.apache.activemq.artemis.core.server.Queue#getRate method is for
slow-consumer detection and is designed for internal use only.

Furthermore, it's too opaque to be trusted by a remote user as it only
returns the number of message added to the queue since *the last time
it was called*. The problem here is that the user calling it doesn't
know when it was invoked last. Therefore, they could be getting the
rate of messages added for the last 5 minutes or the last 5
milliseconds. This can lead to inconsistent and misleading results.

There are three main ways for users to track rates of message
production and consumption:

 1. Use a metrics plugin. This is the most feature-rich and flexible
way to track broker metrics, although it requires tools (e.g.
Prometheus) to store the metrics and display them (e.g. Grafana).

 2. Invoke the getMessageCount() and getMessagesAdded() management
methods and store the returned values along with the time they were
retrieved. A time-series database is a great tool for this job. This is
exactly what tools like Prometheus do. That data can then be used to
create informative graphs, etc. using tools like Grafana. Of course, one
can skip all the tools and just do some simple math to calculate rates
based on the last time the counts were retrieved.

 3. Use the broker's message counters. Message counters are the broker's
simple way of providing historical information about the queue. They
provide similar results to the previous solutions, but with less
flexibility since they only track data while the broker is up and
there's not really any good options for graphing.
2020-09-23 12:08:57 -04:00
Andy Taylor c29a8cda5c ARTEMIS-2902 - expose at queue control messages held in a prepared tx
https://issues.apache.org/jira/browse/ARTEMIS-2902
2020-09-15 11:08:59 -04:00
Clebert Suconic c0c638d61f NO-JIRA Fixing intermittent failure on a REST test 2020-09-15 08:56:07 -04:00
Clebert Suconic c3887ed710 ARTEMIS-2887 Adding back Message.toString on audit logger 2020-08-26 21:48:30 -04:00
Justin Bertram 90853409a0 ARTEMIS-2886 optimize security auth
Both authentication and authorization will hit the underlying security
repository (e.g. files, LDAP, etc.). For example, creating a JMS
connection and a consumer will result in 2 hits with the *same*
authentication request. This can cause unwanted (and unnecessary)
resource utilization, especially in the case of networked configuration
like LDAP.

There is already a rudimentary cache for authorization, but it is
cleared *totally* every 10 seconds by default (controlled via the
security-invalidation-interval setting), and it must be populated
initially which still results in duplicate auth requests.

This commit optimizes authentication and authorization via the following
changes:

 - Replace our home-grown cache with Google Guava's cache. This provides
simple caching with both time-based and size-based LRU eviction. See more
at https://github.com/google/guava/wiki/CachesExplained. I also thought
about using Caffeine, but we already have a dependency on Guava and the
cache implementions look to be negligibly different for this use-case.
 - Add caching for authentication. Both successful and unsuccessful
authentication attempts will be cached to spare the underlying security
repository as much as possible. Authenticated Subjects will be cached
and re-used whenever possible.
 - Authorization will used Subjects cached during authentication. If the
required Subject is not in the cache it will be fetched from the
underlying security repo.
 - Caching can be disabled by setting the security-invalidation-interval
to 0.
 - Cache sizes are configurable.
 - Management operations exist to inspect cache sizes at runtime.
2020-08-26 13:36:24 -05:00
Domenico Francesco Bruscino 32bf9680f2 [maven-release-plugin] prepare for next development iteration 2020-08-24 16:03:24 +02:00
Domenico Francesco Bruscino a549fcedde [maven-release-plugin] prepare release 2.15.0 2020-08-24 16:03:12 +02:00
Justin Bertram d86067a65b ARTEMIS-2872 support FQQN syntax for security-settings 2020-08-22 18:24:40 -05:00
Clebert Suconic 365663e368 NO-JIRA javadoc on NetUtil 2020-08-20 08:58:55 -04:00
Michael Pearce 2c506cc52a [ARTEMIS-2863] Add support to pause dispatch when group rebalance
Add test case
Add implementation
Add docs
2020-08-19 12:04:50 -04:00
Clebert Suconic 9842f45a49 ARTEMIS-2867 Do not cache IPs on DNS Entries for NetworkHealthCheck
In case of a DNS outage, the pinger should still fail
If we cache the InetAddress this would not be possible
2020-08-06 17:40:41 -04:00
Clebert Suconic df2f48a481 NO-JIRA update RandomUtil.randomInterval to deal with (max==min) 2020-08-06 17:08:54 -04:00
Francesco Nigro 60e25b763c ARTEMIS-2844 Improve binding query performance by reusing AddressImpl instances 2020-07-30 23:32:10 -04:00
Justin Bertram 4c79b25dc2 ARTEMIS-2840 missing AddressControl audit logging 2020-07-30 12:01:25 -04:00
Justin Bertram a45f383e1a ARTEMIS-2839 audit logging typo for resuming queue 2020-07-30 12:01:25 -04:00
Clebert Suconic c00b210629 ARTEMIS-2858 DNS Tests on reconnects and backups
There are no fixes as part of this test addition.  As I wrote this test as I was debugging DNS issues.
2020-07-29 17:56:55 -04:00
Francesco Nigro 41efeb2669 ARTEMIS-2845 ConcurrentAppendOnlyChunkedList cannot be queried while resizing 2020-07-28 23:49:34 -04:00
Clebert Suconic 6690ba1d24 [maven-release-plugin] prepare for next development iteration 2020-07-09 12:49:08 -04:00
Clebert Suconic a76f41a7ed [maven-release-plugin] prepare release 2.14.0 2020-07-09 12:48:54 -04:00
Clebert Suconic fbeb9a492c Revert "ARTEMIS-2801 Fix ByteUtil.getHumanReadableByteCount() giving inconsistent results"
I merged this one by accident

This reverts commit ffb117d159.
2020-07-08 18:08:23 -04:00
Jan Šmucr ffb117d159 ARTEMIS-2801 Fix ByteUtil.getHumanReadableByteCount() giving inconsistent results
HumanReadableByteCountTest test is no longer failing under environments with locales defining different number format.
The function now returns values according to the Locale.ROOT locale specification.
2020-07-08 11:39:21 -04:00
Justin Bertram 6b589b1e78 ARTEMIS-2801 make HumanReadableByteCountTest locale sensitive 2020-07-08 11:36:35 -04:00
Robbie Gemmell d2c46762e8 ARTEMIS-2109: fix javadoc errors, remove doclint config for JDK8, remove superfluous plugin versions, update to 3.0.1 javadoc plugin
Using 3.0.1 like the current apache parent pom [not being used], and also as newer ones break build.
2020-06-11 18:50:01 +01:00
Emmanuel Hugonnet efe0f468de ARTEMIS-2109: Updating the build to be able to execute it on Java 11 and Java 8. 2020-06-11 18:50:01 +01:00
Michael Pearce 99f6c7bf20 ARTEMIS-2787 - Add ability to disable and enable a queue
Add feature
Add tests
Add docs
Add missing bits noticed in ring-size
Address comments
2020-06-08 18:02:48 -04:00
brusdev 1ee0bbf34c ARTEMIS-2792 Fix default network pinger command for linux 2020-06-04 08:28:23 -04:00
Francesco Nigro 99c819b776 ARTEMIS-2785 removed unused and leak-prone readBytes method 2020-05-29 18:43:21 +02:00
Francesco Nigro c72b226bfb ARTEMIS-2785 io.netty.util.internal.OutOfDirectMemoryError during uncompress 2020-05-29 18:17:11 +02:00
brusdev 9a7620fd71 ARTEMIS-2770 Update diverts using the management API 2020-05-26 20:31:19 -04:00
Clebert Suconic faa83b2ba6 [maven-release-plugin] prepare for next development iteration 2020-05-16 18:38:47 -04:00
Clebert Suconic 5f49d89264 [maven-release-plugin] prepare release 2.13.0 2020-05-16 18:38:34 -04:00
Clebert Suconic c99fcd501b [maven-release-plugin] prepare for next development iteration 2020-05-15 16:42:54 -04:00
Clebert Suconic 47fafac760 [maven-release-plugin] prepare release 2.13.0 2020-05-15 16:42:41 -04:00
brusdev 71d311322a ARTEMIS-2759 Warn ignored connection factory URI parameters 2020-05-14 09:04:49 -04:00
Clebert Suconic 4fe4220ff0 ARTEMIS-2372 / ARTEMIS-2740 Improving Message Annotations support in AMQP
- when sending messages to DLQ or Expiry we now use x-opt legal names
- we now support filtering thorugh annotations if using m. as a prefix.
- enabling hyphenated_props: to allow m. as a prefix
2020-05-13 10:55:36 -04:00
Andy Taylor 2ab381565c ARTEMIS-2749 - Broadcast Group Control Improvements
https://issues.apache.org/jira/browse/ARTEMIS-2749
2020-05-04 16:20:08 +01:00
Andy Taylor 8a04ee07de ARTEMIS-2648 - audit logging improvements
https://issues.apache.org/jira/browse/ARTEMIS-2648
2020-05-04 15:19:08 +01:00
Justin Bertram 0b155cf5ea ARTEMIS-2666 mngmnt for duplicate ID cache 2020-05-01 13:13:45 -05:00
Clebert Suconic 9918cd02fb NO-JIRA Adding option to RetryRule to retry on success
This means retry a test until it failed, if the option is chosen.
2020-04-30 12:03:54 -04:00
Clebert Suconic ca4c4068df ARTEMIS-2732 Logging cleanup 2020-04-23 17:49:08 -04:00
Clebert Suconic 77d250bec8 ARTEMIS-2732 Bridging Apache Logger into JBoss Logging for the testsuite 2020-04-23 16:51:22 -04:00
Clebert Suconic 3541ebf218 ARTEMIS-2732 Cleanup on testsuite logging 2020-04-22 23:08:46 -04:00
Clebert Suconic 11a3e810bb [maven-release-plugin] prepare for next development iteration 2020-04-21 17:06:21 -04:00
Clebert Suconic 30272e0c2f [maven-release-plugin] prepare release 2.12.0 2020-04-21 17:06:08 -04:00
brusdev 21d9e3bbbf ARTEMIS-2723 Read the default CLI connector from the related broker
Read the CLI connector from the related broker instance if it isn't set by user.
2020-04-20 14:24:24 -04:00
Clebert Suconic 576e01dba6 ARTEMIS-2725 Implementing retries policy on tests 2020-04-20 11:41:20 -04:00
Clebert Suconic d231e2ac63 [maven-release-plugin] prepare for next development iteration 2020-04-16 16:16:41 -04:00
Clebert Suconic 9636f4a3b0 [maven-release-plugin] prepare release 2.12.0 2020-04-16 16:16:28 -04:00
Francesco Nigro e4c5ea719f ARTEMIS-2713 Added ReplicatedMultipleFailbackTest 2020-04-15 21:56:34 -04:00
Justin Bertram 2efa44daf5 ARTEMIS-2692 refactor queue creation
This commit does the following:
- Deprecates existing overloaded createQueue, createSharedQueue,
  createTemporaryQueue, & updateQueue methods for ClientSession,
  ServerSession, ActiveMQServer, & ActiveMQServerControl where
  applicable.
- Deprecates QueueAttributes, QueueConfig, & CoreQueueConfiguration.
- Deprecates existing overloaded constructors for QueueImpl.
- Implements QueueConfiguration with JavaDoc to be the single,
  centralized configuration object for both client-side and broker-side
  queue creation including methods to convert to & from JSON for use in
  the management API.
- Implements new createQueue, createSharedQueue & updateQueue methods
  with JavaDoc for ClientSession, ServerSession, ActiveMQServer, &
  ActiveMQServerControl as well as a new constructor for QueueImpl all
  using the new QueueConfiguration object.
- Changes all internal broker code to use the new methods.
2020-04-13 14:25:30 -05:00
brusdev 0f200a4798 ARTEMIS-2698 Expose queue group attributes 2020-04-08 12:53:56 -04:00
brusdev 38a79be314 ARTEMIS-2691 Improve critical analyzer LOG policy
Reset the critical component timer after the expiration to allow further LOG
actions after the first expiration.
2020-04-04 18:19:46 -04:00
Atri Sharma 405eb969c1 ARTEMIS-2636: Introduce Disk Usage Metrics
ARTEMIS-2636: This commit introduces metrics to publish the amount of disk used currently
2020-03-30 22:27:58 -04:00
Clebert Suconic f874a02d17 ARTEMIS-2673 PageStore should only be removed when Address is removed
& ARTEMIS-2674 AMQP should use a separate executor for IO
2020-03-23 20:02:17 -04:00
Francesco Nigro a5bd0065a9 ARTEMIS-2617 Fixing KMPNeedle::searchInto API and specializing it
KMPNeedle::searchInto has been specialized and copied
to handle ReadableBuffer in order to save polymorphic
calls on it that would make it slower on hot paths.
2020-03-17 16:30:12 -04:00
Francesco Nigro 0ae8c63d41 NO-JIRA Let SparseArrayLinkedList to reuse the last empty array 2020-03-17 10:48:59 -04:00
Francesco Nigro 2105479304 ARTEMIS-2658 AMQP message read from page has wrong encode size 2020-03-16 18:20:39 +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
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
Francesco Nigro 3282f105bb ARTEMIS-2604 Optimize journal loading
- Avoid some Properties Decoding, checking if we need certain properties like scheduled delivery
- Avoid creating some unnecessary SimpleString instances
- Removed some intermediate ActiveMQBuffer allocation
- Removed some intermediate UnreleasableByteBuf allocation
2020-02-05 11:13:53 -05:00
Francesco Nigro 4cc6464ddd ARTEMIS-2602 Improve Journal loading heap usage 2020-01-17 14:31:52 -05: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
brusdev 9c858c6ba2 ARTEMIS-2593 Thread leak test failure with OpenJ9 JVM
Add an exception for the thread with name `MemoryMXBean`.
2020-01-10 13:58:10 +01:00
Clebert Suconic e397a17796 ARTEMIS-2592 Fixing DeadLock between deleteMessages and depage
This was happening through purge
2020-01-09 19:41:14 -06:00
Francesco Nigro 6cc5749c7b ARTEMIS-2569 LinkedListImpl tests should not rely on the GC mechanism 2020-01-09 13:40:43 -05:00
Justin Bertram 0293d80574 NO-JIRA support 0 in human readable byte calculation 2020-01-08 12:37:30 -06:00
Justin Bertram 2a452bd7a3 ARTEMIS-2578 clarify storage capacity messages
This is a surprisingly large change just to fix some log messages, but
the changes were necessary in order to get the relevant data to where it
was being logged. The fact that the data wasn't readily available is
probably why it wasn't logged in the first place.
2019-12-17 20:27:10 -05:00
brusdev 42fe6a8ee2 ARTEMIS-2577 Thread leak test failure with IBM JRE
Add the thread with name `MemoryMXBean` as expected on IBM JDK.
2019-12-16 14:35:44 +01:00
Clebert Suconic 0b1afd35dc ARTEMIS-2421 Using ActiveMQScheduledComponent 2019-11-26 16:15:06 -05:00
Christopher L. Shannon (cshannon) fb54707e2d ARTEMIS-2549 - Add Downstream support to Federation
This commit introduces the ability to configure a downstream connection
for federation.  This works by sending information to the remote broker
and that broker will parse the message and create a new upstream back
to the original broker.
2019-11-20 08:47:16 -05:00
Justin Bertram 84067d8fef ARTEMIS-2504 implement retroactive addresses
A new feature to preserve messages sent to an address for queues that will be
created on the address in the future. This is essentially equivalent to the
"retroactive consumer" feature from 5.x. However, it's implemented in a way
that fits with the address model of Artemis.
2019-10-28 09:01:42 -04:00
Christopher L. Shannon (cshannon) a74036361d ARTEMIS-2519: Use proper enum type inside ActiveMQUnexpectedRoutingTypeForAddress 2019-10-14 14:06:15 -04: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
Clebert Suconic 60a15f3b50 ARTEMIS-2424 Testing functionality where we disable isReacheable if a ping custom command is used 2019-08-29 18:41:34 -04:00
Tom 90e4384a41 ARTEMIS-2424 Add option to override isReachable()
Added check for non default ping command(s)
Bypass InetAddress.isReachable() to allow exclusive use of user defined
ping command(S).
2019-08-29 18:25:31 -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
Justin Bertram 51c2022f38 ARTEMIS-2457 implement ring queue 2019-08-25 23:29:44 -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
Clebert Suconic 5f75f68129 ARTEMIS-2454 Message Body damaged after re-encoding 2019-08-18 17:17:12 -04:00
Justin Bertram 9d44c40037 ARTEMIS-2449 limit size of producer details
The core server session tracks details about producers like what
addresses have had messages sent to them, the most recent message ID
sent to each address, and the number of messages sent to each address.
This information is made available to users via the
listProducersInfoAsJSON method on the various management interfaces
(JMX, web console, etc.). However, in situations where a server session
is long lived (e.g. in a pool) and is used to send to many different
addresses (e.g. randomly named temporary JMS queues) this info can
accumulate to a problematic degree. Therefore, we should limit the
amount of producer details saved by the session.
2019-08-08 14:24:28 -04:00
brusdev aeecb6f70b ARTEMIS-2408 Too many opened FDs after server stops
Limit acceptors stop time.

reapplying after commit 20ca827d79
2019-07-18 16:17:03 -04:00
Tomas Hofman 1c45d1758d ARTEMIS-2409 Convert HornetQ field names in consumer/queue selector strings 2019-07-17 11:34:04 -04:00
Dmitry Volodin 602d659241 ARTEMIS-2322: Fixing misprint in getProducedRate call 2019-07-16 23:07:28 +03:00
brusdev 29bbb94b5e ARTEMIS-2408 Too many opened FDs after server stops
Wait netty event loop group shutdown to avoid too many opened FDs after
server stops, when netty configuration is used. Clear server
activateCallbacks to avoid reactivation of previous nodeManager and
consequent FD leaks on restart. Fix LargeServerMessageImpl.copy to avoid
FD leaks when a large message expiry or it is sent to DLA. Terminate
HawtDispatcher global queue to avoid pipes and eventpolls leaks after a
MQTT test.

cherry-picking commit 9617058ba0649af4eea15ce8793f86de827c4b7f
NO-JIRA adding check for open FD on the testsuite

cherry-picking commit 0facb7ddf4d3baa14a3add4290684aff7fd46053
NO-JIRA addressing connections leaks on integration tests
2019-07-16 13:36:42 -04:00
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