Commit Graph

1814 Commits

Author SHA1 Message Date
Clebert Suconic 78c0792989 ARTEMIS-3065 AMQP Anonymous producer would eventually block 2021-01-13 15:46:54 -05:00
franz1981 22dbeb8022 ARTEMIS-3049 Simplify PagePosition API 2021-01-12 17:28:13 -05:00
franz1981 54b0094cd6 ARTEMIS-3049 Simplify PageCache API 2021-01-12 17:28:13 -05:00
franz1981 19b04531c6 ARTEMIS-3049 Reduce live page lookup cost 2021-01-12 17:28:13 -05:00
Justin Bertram 9aa7a10744 ARTEMIS-3058 improper AddressSettings merge
The merge method in AddressSettings should *not* use any getters. It
should reference the relevant variables directly. Using any getters will
return default values in the underlying value is null. This can cause
problems for hierarchical settings.

Also fixed a few potential NPEs exposed by the test-case.
2021-01-11 11:38:59 -05:00
Clebert Suconic b4d66b684a ARTEMIS-3054 Fix inconsistencies between replica catchup and page cleanup 2021-01-08 13:48:41 -05:00
gtully 546bbfebfb ARTEMIS-3033 - implement address tree map for wildcards in place of linked addresses 2021-01-06 20:31:46 +00:00
Justin Bertram 9fc22675df ARTEMIS-3031 add new callback for broker deactivation
The existing deactivation callback happens *after* several important
services are shutdown (e.g. the remoting service which allows client
connectivity). This commit adds a new callback which is invoked *before*
any services are stopped. This is useful for embedded use-cases where
applications want to stop gracefully before any part of the broker is
stopped.

A default, empty method implementation is provided so that existing
callback implementations don't need to change.
2021-01-06 10:49:02 -05:00
Andy Taylor ea7f001776 ARTEMIS-3043 - improvements on new console
https://issues.apache.org/jira/browse/ARTEMIS-3043
2021-01-06 10:47:57 -05:00
Clebert Suconic a6160dac14 ARTEMIS-3052 Not block on Binding operations
There no need to test on this commit,
since current tests are enough coverage on this change.
2021-01-06 10:27:01 -05:00
franz1981 2b5d99bbd1 ARTEMIS-3016 Refactored duplicate ids cache 2021-01-06 09:05:01 -05:00
franz1981 b3b5d4893c ARTEMIS-3016 Reduce DuplicateIDCache memory footprint 2021-01-06 09:05:01 -05:00
Clebert Suconic 372220ad3f NO-JIRA Avoiding NPE on ManagementServiceImpl 2020-12-22 13:12:15 -05:00
Domenico Francesco Bruscino 0456b8845a ARTEMIS-3041 Allow encrypted data source property values 2020-12-22 11:07:30 -05:00
Domenico Francesco Bruscino d7fc2fb8b8 ARTEMIS-3040 Fix reloading large messages paged before 2.12 2020-12-21 11:03:11 -05:00
Clebert Suconic 6b7d963f45 ARTEMIS-3039 Fixing network isolation signal on replication 2020-12-18 16:56:14 -05:00
Clebert Suconic 29e65d87da ARTEMIS-3039 Fixing network isolation signal on replication
This is fixing BackupAuthenticationTest
2020-12-18 12:30:31 -05:00
Clebert Suconic 3337d253a6 NO-JIRA Fixing Intermittent failures 2020-12-18 09:24:29 -05:00
franz1981 2b585508cc ARTEMIS-3025 JsonReader char[] leak 2020-12-09 10:55:09 -06:00
Tadayoshi Sato c0b4a10526 ARTEMIS-3017 ArtemisJMXSecurity bulk canInvoke operation always returns true 2020-12-09 10:48:53 -06:00
Clebert Suconic 825341734a ARTEMIS-3024 Expiry or DLQ Retry not working with AMQP 2020-12-08 14:13:53 -05:00
Clebert Suconic 6a6a3b3863 ARTEMIS-3023 Avoid opening AMQP Large Message for final parsing 2020-12-07 21:24:45 -05:00
Clebert Suconic e6a6e81b02 ARTEMIS-3019 expiry changes in AMQP Large Message 2020-12-07 10:44:51 -05:00
Domenico Francesco Bruscino 7eb22c18db ARTEMIS-3014 Fix JMX RBAC guard 2020-11-30 11:12:25 -06:00
gtully 7b9641dc9a ARTEMIS-3009 - reference remoteBinding loadbalancing type on add binding, rather then doing a second pass via the po and address manager. rework ARTEMIS-1680 2020-11-25 10:28:11 +00:00
gtully a5d7a043dc ARTEMIS-2990 - alway be getBiased and only publish complete records and only calculate linked addresses once ARTEMIS-2990 2020-11-24 13:33:21 +00:00
Clebert Suconic 686036b1a4 ARTEMIS-3007 Checking if a message becomes large during copy
This is to avoid shutting down the server on a critical failure in case the message is a few bytes shy
from beyond the max buffer size.

This will prevent the issue.
2020-11-22 23:42:25 -05:00
Domenico Francesco Bruscino 27392b1d7e ARTEMIS-3005 Fix scaling down AMQP messages routing 2020-11-20 14:48:40 -05:00
Justin Bertram ec2cb19f2d ARTEMIS-3003 NPE when reloading persisted security-setting 2020-11-20 10:08:39 -05:00
Luis De Bello a2d827e23f ARTEMIS-2991 Removing HttpAcceptorHandler from HttpKeepAliveRunnable when upgrade to websocket connection 2020-11-18 15:04:52 -06:00
sebthom 80c51803da ARTEMIS-3001 Provide address and queue count via ActiveMQServerControl
See https://issues.apache.org/jira/browse/ARTEMIS-3001
2020-11-17 15:55:50 -05:00
franz1981 923fcb7fe4 ARTEMIS-2990 Improve scalability of wildcard address manager add/remove 2020-11-17 14:39:17 -05:00
Justin Bertram 4bb9ed2d4e ARTEMIS-2986 deleting scheduled messages not permanent
When deleting a durable scheduled message via the management API the
message would be removed from memory but it wouldn't be removed from
storage so when the broker restarted the message would reappear.

This commit fixes that by acking the message during the delete
operation.
2020-11-16 23:46:32 -05:00
gtully d0bf65ea65 ARTEMIS-2990 - update wildcard address map on creation only, avoid duplicates and duplicate checks 2020-11-13 11:15:09 +00:00
gtully 683879495c ARTEMIS-2990 - avoid auto boxing on binding id used as map key 2020-11-13 10:03:28 +00:00
gtully 9675ecae42 ARTEMIS-2985 - don't block netty threads for mqtt protocol actions 2020-11-12 21:01:00 +00:00
Domenico Francesco Bruscino 14ec3cb7b0 ARTEMIS-2976 Remove password before creating server locator 2020-11-05 11:39:35 -05:00
Justin Bertram ecead9b130 ARTEMIS-2974 audit logger can print wrong user info
Using a ThreadLocal for the audit user information works in most cases,
but it can fail when dispatching messages to consumers because threads
are taken out of a pool to do the dispatching and those threads may not
be associated with the proper credentials. This commit fixes that
problem with the following changes:

 - Passes the Subject explicitly when logging audit info during dispatch
 - Relocates security audit logging from the SecurityManager
implementation(s) to the SecurityStore implementation
 - Associates the Subject with the connection properly with the new
security caching
2020-11-05 11:38:08 -05:00
Clebert Suconic 4e7bb97df7 [maven-release-plugin] prepare for next development iteration 2020-11-02 17:45:51 -05:00
Clebert Suconic 9768017530 [maven-release-plugin] prepare release 2.16.0 2020-11-02 17:45:38 -05:00
franz1981 e4a2a20c22 ARTEMIS-2941 Fixing query timeout value 2020-10-30 17:57:28 +01:00
franz1981 b39c9c9221 ARTEMIS-2823 Apply default datasource configs if not overridden 2020-10-30 17:57:28 +01:00
Clebert Suconic 28919b6ad8 [maven-release-plugin] prepare for next development iteration 2020-10-30 10:16:29 -04:00
Clebert Suconic af5ca9f1e6 [maven-release-plugin] prepare release 2.16.0 2020-10-30 10:16:17 -04:00
Clebert Suconic 9b0f7605cb ARTEMIS-2969 / ARTEMIS-2937 Dealing with Connection Timeout properly on AMQP Broker Connections 2020-10-29 21:55:10 -04:00
Clebert Suconic dc7eb5c23d ARTEMIS-2937 Broker connection improvements
- Adding a paragraph about addressing and distinct queue names
- Renaming match on peers, senders and receivers as "address-match"
- Changing qpid dispatch test to use a single listener
- Fixing reconnect attemps message
2020-10-29 15:01:51 -04:00
Clebert Suconic bf52134dc0 ARTEMIS-2937 Fixing Tests and some review 2020-10-28 15:08:48 -04:00
Clebert Suconic 8499eac76c ARTEMIS-2937 Server Side AMQP Connectivity with options to transfer queues or replicate data 2020-10-28 11:37:25 -04:00
gtully 647151b0af ARTEMIS-2941 - renew tasks are nearly always a little late, make this test more tolerant of that 2020-10-28 12:21:31 +00:00
Clebert Suconic f6ef285859 ARTEMIS-2927 LVQ broken after restart 2020-10-22 13:32:19 -04:00
franz1981 b5753a0000 ARTEMIS-2958 Timed out waiting pool stop on backup restart
BackupManager::activated should correctly unblock
unauthorized blocking requests to allow a backup broker
to prompty restart in case of live failback
2020-10-22 12:44:42 -04:00
franz1981 0c8dd598b7 ARTEMIS-2957 ManagementContext is started twice 2020-10-21 07:33:22 +02:00
Emmanuel Hugonnet fdfc58171b [ARTEMIS-2939]: Artemis should not delete corrupt log files.
* Moving corrupted journal files to the attic folder.

Jira: https://issues.apache.org/jira/browse/ARTEMIS-2939
2020-10-20 18:39:06 -04:00
franz1981 4545749969 ARTEMIS-2941 Improve JDBC HA connection resiliency 2020-10-20 17:23:48 -04:00
franz1981 6932b4674d ARTEMIS-2949 Reduce GC on OperationContext::checkTasks 2020-10-20 12:28:10 -04:00
franz1981 769101ac69 ARTEMIS-2955 commons-dbcp2 performance issue with Derby Embedded DBMS
This commit is fixing:
- a missing commit that can make leak a connection
- restricting default specific commons-dbcp2 to the default data source
- setting poolPreparedStatements true by default
- configured embedded Derby to be in-memory to speedup tests
2020-10-20 10:48:12 +02:00
gtully c4832c3209 ARTEMIS-2953 - drop the use of non deterministic finalize 2020-10-19 13:55:52 -04:00
Justin Bertram 75e12b5e1d ARTEMIS-2947 Implement SecurityManager that supports replication 2020-10-19 10:07:57 -04:00
gtully 583bd3602a ARTEMIS-2888 ARTEMIS-2859 ARTEMIS-2768 - revert new page-store-name addressSetting, when the page store respects the target address and the size is tallied on the target address store, it is no longer neecessary 2020-10-19 14:04:35 +01:00
Clebert Suconic 621b845d16 ARTEMIS-2951 Fixing Large Message reference counting 2020-10-15 00:07:07 -04:00
gtully 4e8ce9ed10 ARTEMIS-2859 - track owning page store as in a message reference to ensure correct usage tracking, only track size on the owning store, reference everywhere else via refUp 2020-10-15 00:06:43 -04:00
Luis Alves 4584ab16df ARTEMIS-2886 pass FQQN regardless of match 2020-10-14 12:26:19 -05:00
Andy Taylor 0ce173dcb5 ARTEMIS-2838 - migrate to HawtIO 2
https://issues.apache.org/jira/browse/ARTEMIS-2838
2020-10-09 09:20:29 +01:00
Clebert Suconic 8fe4bfb29a ARTEMIS-2936 Adding logging.info on when to enable trace on critical analyzer 2020-10-07 10:40:55 -04:00
franz1981 b4532d944d ARTEMIS-2823 Use datasource with JDBC store db connections fixes
It add additional required fixes:
- Fixed uncommitted deleted tx records
- Fixed JDBC authorization on test
- Using property-based version for commons-dbcp2
- stopping thread pool after activation to allow JDBC lease locks to release the lock
- centralize JDBC network timeout configuration and save repeating it
- adding dbcp2 as the default pooled DataSource to be used
2020-10-06 10:19:06 +02:00
Mikko Uoti 2faafec737 ARTEMIS-2823 Use datasource with JDBC store db connections
Replaces direct jdbc connections with dbcp2 datasource. Adds
configuration options to use alternative datasources and to alter the
parameters. While adding slight overhead, this vastly improves the
management and pooling capabilities with db connections.
2020-10-06 08:32:58 +03:00
gtully 7a472d2782 ARTEMIS-2768 - fix up conditional to include null pageStoreName option, it was a little over eager 2020-09-28 15:53:06 +01:00
Andy Taylor c77bf50db4 ARTEMIS-2908 - Persist Divert Configuration in Bindings journal
https://issues.apache.org/jira/browse/ARTEMIS-2908
2020-09-25 10:03:40 -04:00
gtully 77d1c8cd7f ARTEMIS-2768 - add warning if wildcard subscription does not have a matching page-store-name address setting 2020-09-24 13:52:57 -04:00
Justin Bertram 0f60b5a8e4 ARTEMIS-2906 add lastAckTimestamp to message counter 2020-09-24 12:51:00 -04:00
franz1981 69fa4f3e93 ARTEMIS-2912 Handle NPE due to uninitialized members 2020-09-24 10:26:50 -04:00
franz1981 207c2265bf ARTEMIS-2912 Server start exception before activation can cause a zombie broker 2020-09-24 10:26:50 -04:00
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 beaacbfa8d ARTEMIS-2904 prevent acceptor from automatically starting 2020-09-23 20:19:16 -04:00
Justin Bertram f07ad09c07 NO-JIRA fix internal QueueControl method spelling 2020-09-23 12:08:57 -04: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
Bernd Gutjahr 100d070942 ARTEMIS-2878 Add numberOfPages as metric
Added metric 'number.of.pages' to provide numberOfPages for an address.
2020-09-16 09:16:55 -05:00
Justin Bertram 9a90248f49 ARTEMIS-2889 better support for JMS topics with legacy LDAP plugin 2020-09-16 10:14:57 -04:00
Justin Bertram e47eb5ae20 ARTEMIS-589 flow control for individual STOMP subscribers 2020-09-16 10:13:47 -04:00
Justin Bertram 276a8bb029 ARTEMIS-2893 concurrent user admin actions can corrupt properties
When performing concurrent user admin actions (e.g. resetUser, addUser,
removeUser on ActiveMQServerControl) when using the
PropertiesLoginModule with reload=true the underlying user and role
properties files can get corrupted.

This commit fixes the issue via the following changes:
 - Add synchronization to the management commands
 - Add concurrency controls to underlying file access
 - Change CLI user commands to use remote methods instead of modifying
   the files directly. This avoids potential concurrent changes. This
   change forced me to modify the names of some of the commands'
   parameters to disambiguate them from connection-related parameters.
2020-09-16 10:11:23 -04:00
Justin Bertram 6be8966164 ARTEMIS-2901 support namespace for temporary queues 2020-09-16 10:10:28 -04:00
Howard Gao fe5b81fd55 ARTEMIS-2854 Non-durable subscribers stop receiving after failover
In a cluster scenario where non durable subscribers fail over to
backup while another live node forwarding messages to it,
there is a chance that the the live node keeps the old remote
binding for the subs and messages go to those
old remote bindings will result in "binding not found".
2020-09-16 10:03:36 -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 27c7385315 NO-JIRA using correct queue on RefOperation::rollback and remove TODO
this does not represent an issue as there are no semantic changes here.
I am doing this for correctness
2020-09-15 08:15:07 -04:00
Clebert Suconic 7cf5289efa ARTEMIS-2900 Expose property (getWholeMessageSize) so users can intercept size of messages and large messages 2020-09-14 15:35:46 -04:00
Justin Bertram cf92c16339 ARTEMIS-2886 put address/FQQN into new security manager interface
The default JAAS security manager doesn't need the address/FQQN for
authorization, but I'm putting it back into the interface because there
are other use cases which *do* need it.
2020-09-14 15:35:24 -04:00
gtully ec1c5a96c7 ARTEMIS-2895 - ensure propagated credentials are visible for bind and removed for subsequent mapping operations 2020-09-07 16:32:57 +01:00
Justin Bertram f5a6189e2d ARTEMIS-2890 FQQN security-settings + JMS not working 2020-09-03 16:52:51 -04:00
Luis De Bello 5087471ed3 ARTEMIS-2696 Releasing ByteBuf after reading content on WebSocket 2020-09-03 16:05:27 -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
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
franz1981 40f20cfe6a ARTEMIS-2877 Fix journal replication scalability
This is allowing journal appends to happen in burst
during replication, by batching replication response
into the network at the end of the append burst.
2020-08-17 13:01:41 -04:00
Justin Bertram fa5b56ef1d ARTEMIS-2881 deadlock when destroying q and depaging
I couldn't reproduce this with a test, but static code analysis led me
to this solution which is similar to the fix done for ARTEMIS-2592 via
e397a17796.
2020-08-17 10:34:20 -05:00
Clebert Suconic c551df770c ARTEMIS-2868 Protect Topology Updates from Split Brain on broker shutdown as well 2020-08-07 12:39:20 -04:00
Clebert Suconic 27cb9b37b1 ARTEMIS-2868 Protect Topology Updates from Split Brain 2020-08-06 17:40:57 -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
Michael Pearce 486896d99e ARTEMIS-2873 Config-managed queues are auto-deleted
auto-delete-queues and auto-delete-created-queues should only apply to
NON configuration managed queues.
2020-08-06 15:19:57 -05:00
Justin Bertram 8473946646 ARTEMIS-2865 LegacyLDAPSecuritySettingPlugin can change default security match 2020-08-06 15:36:05 -04:00
Justin Bertram 1ae8069864 ARTEMIS-2869 JDBC XML conf can't use custom pwd codec 2020-08-04 17:05:19 -05: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
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
Clebert Suconic 3d86d78828 ARTEMIS-2587 Exposing ActiveMQServer::isActivate through management at ActiveMQServerControl 2020-07-29 11:41:41 -04:00
brusdev 18b8df0f09 ARTEMIS-2855 Define a new broker plugin to track XA transactions 2020-07-29 10:40:55 -04:00
Justin Bertram cd7f52d4ba ARTEMIS-2856 consumer can be created on closed session
Due to a lack of concurrency protections it's possible to create a
consumer on a closed session. I've not been able to reproduce this with
a test, but I've seen it in the wild. Static code analysis points to a
need for better concurrency controls around closing the session and
creating consumers.
2020-07-29 10:40:33 -04:00
franz1981 f2d0d300f5 ARTEMIS-2853 page-max-concurrent-io cannot be disabled 2020-07-24 14:35:08 +02:00
Clebert Suconic ccc0fa7100 ARTEMIS-2843 non-destructive LVQ not delivering msg to consumer 2020-07-20 12:01:23 -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
Howard Gao 8c25daee98 ARTEMIS-2835 Porting HORNETQ-1575 and HORNETQ-1578
2 of 2) - Porting of HORNETQ-1578

Exceptions are swallowed, making it hard to diagnose issues
2020-07-08 11:27:36 -04:00
Clebert Suconic 61d2f58aab ARTEMIS-2828 Fixing ManagementServiceImplTest 2020-07-07 21:35:06 -04:00
Clebert Suconic a7aafc0ab4 NO-JIRA small tweak on ActiveMQTestBase 2020-07-07 15:26:35 -04:00
Clebert Suconic 832bd85941 ARTEMIS-2828 Fixing tests after main change on ManagementServiceImpl
This is almost a NO-JIRA, but since I'm fixing ManagementServiceImplTest.testGetResources broken after this
I'm commiting this change associated with ARTEMIS-2828
2020-07-07 12:22:38 -04:00
Justin Bertram f5d5710133 ARTEMIS-2834 leaking meters
Move all of the meter registration code into the ManagementServer
implementation to provide better life-cycle management.
2020-07-07 08:18:28 -04:00
Justin Bertram fd207e75b0 ARTEMIS-2829 wrong return type for getDiskStoreUsage
Since getDiskStoreUsage on the ActiveMQServerControl is converting a
double to a long the value is always 0 in the management API. It should
return a double instead.
2020-07-07 08:18:28 -04:00
Justin Bertram cb7cd729d7 ARTEMIS-2828 add addressSize metric
Adding this metric required moving the meter registration code from the
AddressInfo class to the ManagementService in order to get clean access
to both the AddressInfo and AddressControl classes.
2020-07-07 08:18:28 -04:00
Justin Bertram ac8ffedf66 ARTEMIS-2827 add addressMemoryUsagePercentage as metric 2020-07-07 08:18:28 -04:00
Justin Bertram 26091f1907 ARTEMIS-2825 wrong calc for DiskStoreUsagePercentage
The calculation used by
ActiveMQServerControlImpl.getDiskStoreUsagePercentage() is incorrect. It
uses disk space info with global-max-size which is for address memory.
Also, the existing getDiskStoreUsage() method *already* returns a
percentage of total disk store usage so this method seems redundant.
2020-07-07 08:18:28 -04:00
Clebert Suconic 3f99c4b846 ARTEMIS-2797 Fixing updateQueue on filter / fixing ActiveMQServerControlTest 2020-07-06 21:45:27 -04:00
Jan Šmucr 6cc370e169 ARTEMIS-2797 Fixing redeploy mechanism
Queue settings are reset to their default values upon broker.xml reload ONLY.
Regular calls to PostOfficeImpl#updateQueue are no longer affected.
2020-07-06 15:02:03 -04:00
brusdev d02f5db9b8 ARTEMIS-2833 Fix metrics configuration backwards compatibility 2020-07-01 08:35:17 -04:00
Clebert Suconic 257d353896 ARTEMIS-2797 Logging redeployment errors and speeding RedeployTest 2020-07-01 08:33:01 -04:00
Clebert Suconic 562bb965ae ARTEMIS-2797 Fixing user update Null
UpdateQueueTest::testUpdateQueueWithFilter was broken.
2020-06-29 22:58:35 -04:00
Clebert Suconic f79a4be4c1 ARTEMIS-2831 Avoiding StackOverFlowException when setDLAOnNoRoute(true) 2020-06-29 16:50:00 -04:00
Clebert Suconic 51d1ed4e11 ARTEMIS-2819 Proper fix (previous fix was breaking the testsuite) 2020-06-29 15:37:55 -04:00
Jan Šmucr 85e07a8afe ARTEMIS-2820 Undeploy diverts by removing them from broker.xml 2020-06-24 22:01:56 +01:00
qihongxu e6343b604e ARTEMIS-2806 deployQueue missing address argument 2020-06-24 14:35:07 -05:00
Bas Elzinga 5621c403ad ARTEMIS-2821 Stop the timeout future when channel is closed 2020-06-24 13:33:30 -05:00
Keith Wall efb1bd3f9f ARTEMIS-2819 exact match address setting removal ineffective 2020-06-24 12:54:05 -05:00
Jan Šmucr 5070e7a72c ARTEMIS-2797 - Reset queue properties by unsetting them in broker.xml
Now it is possible to reset queue parameters to their defaults by removing them
from broker.xml and redeploying the configuration.

Originally this PR covered the "filter" parameter only.
2020-06-23 11:20:03 +02:00
Havret 3e394b45e9 ARTEMIS-2815: Fix null pointer exception on attempt to update queue without filter 2020-06-23 09:36:45 +01:00
Justin Bertram 0908cac668 ARTEMIS-2810 support all address-settings via mgmnt 2020-06-18 09:15:53 -04:00
Robbie Gemmell 0f72455349 ARTEMIS-2109: add StaticQualifiedUsingExpression check in place of older removed StaticAccessedFromInstance, and fix error. 2020-06-17 16:31:09 -04:00
Justin Bertram 79e05774b8 ARTEMIS-2807 avoid notifications on critical IO error 2020-06-17 13:52:36 -04:00
Justin Bertram 9d4ec41935 ARTEMIS-2803 fix semantic change 2020-06-15 14:20:35 -04:00
Justin Bertram 51ecab5141 ARTEMIS-2803 avoid NPE w/o cluster-connection 2020-06-15 09:28:43 -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
Francesco Nigro 65c4c45fc2 ARTEMIS-2793 quorum logging implies it happens when single pair 2020-06-05 09:16:41 +02:00
Justin Bertram 7096bc187a ARTEMIS-2649 always over-write ORIG message props
ORIG message propertes like _AMQ_ORIG_ADDRESS are added to messages
during various broker operations (e.g. diverting a message, expiring a
message, etc.). However, if multiple operations try to set these
properties on the same message (e.g. administratively moving a message
which eventually gets sent to a dead-letter address) then important
details can be lost. This is particularly problematic when using
auto-created dead-letter or expiry resources which use filters based on
_AMQ_ORIG_ADDRESS and can lead to message loss.

This commit simply over-writes the existing ORIG properties rather than
preserving them so that the most recent information is available.
2020-06-01 15:19:34 -04:00
Justin Bertram 0443128b81 ARTEMIS-2783 user not set on shared queue 2020-05-28 16:38:26 -04:00
Clebert Suconic 39b3dd1044 ARTEMIS-2781 Adding getAllQueueNames; fixing tests 2020-05-28 16:36:59 -04:00
brusdev a7df87adf9 ARTEMIS-2778 AcceptorControl returns only transport parameters
Fix AcceptorControl to return all acceptor parameters.
2020-05-28 14:01:00 -05:00
Clebert Suconic 2fbd801e78 NO-JIRA Fixing intermittent failure on PagingReceiveTest 2020-05-28 13:38:42 -04:00
Clebert Suconic 06276ff26f NO-JIRA Fixing intermittent failure on PagingReceiveTest 2020-05-28 12:41:19 -04:00
brusdev 9a7620fd71 ARTEMIS-2770 Update diverts using the management API 2020-05-26 20:31:19 -04:00
Justin Bertram fd11a1e079 ARTEMIS-2781 return only local queue names for AddressControl.getQueueNames() 2020-05-26 17:30:38 -05:00
brusdev 3bcea4e78e ARTEMIS-2774 Remove the divert transformer on divert destroying 2020-05-21 16:27:54 -04:00
Justin Bertram 4b7b612eb9 ARTEMIS-2771 support JVM GC & thread metrics 2020-05-20 15:53:15 -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 55582772f9 ARTEMIS-2767 Perf Improvement. Routing = null should still reuse context 2020-05-16 11:39:15 -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
Emmanuel Hugonnet a88815d9b3 [ARTEMIS-2704]: Provide a SPI to manage and cache SSLContext.
* Adding a new SPI to allow for SSLContext reuse accross the broker.
 * Providing a default behaviour similar to the existing one.

[ARTEMIS-2718]: Take advantage of ARTEMIS-2704 to cache SSLContexts.
* Adding a cache for SSLContexts and reusing them accross acceptors and
  connectors.

Issue: https://issues.apache.org/jira/browse/ARTEMIS-2704
Issue: https://issues.apache.org/jira/browse/ARTEMIS-2718
2020-05-15 16:19:50 -04:00
Justin Bertram 3bd0d8bf38 ARTEMIS-2758 support disabling metrics per address 2020-05-14 15:16:23 -04:00
brusdev be41019b50 ARTEMIS-2760 Filter AddressQueueReaper misleading error messages 2020-05-13 15:01:25 -05: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
Christopher L. Shannon (cshannon) 80ce96768e ARTEMIS-2752: Properly cleanup Federated Address Divert consumers
DivertBindings are now properly cleaned up when a queue binding is
removed that matches the divert. The correct key is now used to remove
the queue address from the set and the correct address is now used to
remove the remote consumer.
2020-05-11 14:56:24 -04:00
Andy Taylor 5737f965d2 ARTEMIS-2749 - Broadcast Group Control Improvements
added some default behaviour for when overridden

https://issues.apache.org/jira/browse/ARTEMIS-2749
2020-05-11 10:28:19 -05:00
Clebert Suconic 7438d7ff07 ARTEMIS-2750 Fixing out of order cancellations in AMQP 2020-05-04 13:15:56 -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
Justin Bertram ea09a0fd39 ARTEMIS-2638 retro resources created recursively w/# match 2020-05-01 11:56:02 -05:00
Justin Bertram d53b2bcef6 ARTEMIS-2745 queue registering wrong metrics 2020-04-30 14:53:36 -05:00
Clebert Suconic 4c28297685 ARTEMIS-2741 Passing call timeout to cluster connection bridge
This one should improve eventual failures on ClusterConnectionControlTest
to validate this, run ClusterConnectionControlTest::testNotifications in a loop

you will see eventually the test taking longer to shutdown the executor as the call could be blocked.
2020-04-28 22:56:21 -04:00
Clebert Suconic 54c4611229 NO-JIRA test output cleanup 2020-04-28 21:48:21 -04:00
Justin Bertram 6709883d0e ARTEMIS-2738 implement per-acceptor security domains 2020-04-28 21:45:38 -04:00
Clebert Suconic 2ebf3c8e1b ARTEMIS-2372 Filtering on Message Annotations 2020-04-28 11:18:30 -04:00
Francesco Nigro 0abb06322c ARTEMIS-2717 Isolate the current Quorum Vote implementation 2020-04-23 18:24:11 -04:00
Justin Bertram 4b97e06890 ARTEMIS-2726 implement min/max expiry-delay 2020-04-23 17:56:51 -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
Clebert Suconic 974609d206 ARTEMIS-2728 Fixing Deadlock with LargeServerMessage
verified by LargeMessageTest::testTwoBindingsAndRestart
2020-04-20 14:40:46 -04:00
brusdev 1d8e9f7fff ARTEMIS-2724 The setting auto-delete-created-queues doesn't work
Set the default auto-delete for created queues.
2020-04-20 14:16:37 -04:00
Clebert Suconic d81c0f44eb NO-JIRA Fixing intermittent failures 2020-04-20 11:38:03 -04:00
Clebert Suconic a000164169 ARTEMIS-2721 Activation keeps retrying even after server.stop()
This won't be an issue on a real server (Production system)

however, on the testsuite or while embedded this could cause issues,
if a same instance is stopped then started.

This is the reason why BackupAuthenticationTest was intermittently failing.

I also adapted the test since I would need to stop the server and reactivate it in order to change the configuration.
The previous test wasn't acting like a real server.
2020-04-17 18:26:22 -04:00
Clebert Suconic 45a4f6fc39 ARTEMIS-2720 Additional test
I wrote a small / quick test while I was testing the PR #3089
and I decided to keep it with the PR
2020-04-17 16:33:04 -04:00
Justin Bertram 6441068b95 ARTEMIS-2720 optimize match searching 2020-04-17 16:31:52 -04:00
Justin Bertram c841b84b3e ARTEMIS-2720 optimize cache clearing 2020-04-17 16:31:52 -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
Clebert Suconic d9aacec8bb ARTEMIS-1975 Fixing Typo on QueueImpl::errorProcessing 2020-04-16 10:52:45 -04:00
Justin Bertram 410a552894 ARTEMIS-2711 use peer host:port for acceptor SSL engine 2020-04-16 10:32:54 -04:00
Clebert Suconic ad60a0b02b ARTEMIS-1975 Dealing with connection drops on AMQP Large Message 2020-04-15 22:26:58 -04:00
Francesco Nigro 46060b89ff ARTEMIS-2676 PageCursorProviderImpl::cleanup can save decoding pages without large messages 2020-04-15 22:20:50 -04:00
Francesco Nigro 5a829ff1f4 ARTEMIS-2713 Master failback can trigger a useless quorum vote on slave failover 2020-04-15 21:56:34 -04:00
Francesco Nigro e4c5ea719f ARTEMIS-2713 Added ReplicatedMultipleFailbackTest 2020-04-15 21:56:34 -04:00
Justin Bertram f0b4afa672 ARTEMIS-2714 log details for 'Address already in use'
Currently when the broker hits the common 'Address already in use' issue
when starting the process terminates with a vague exception. The user is
left to guess which acceptor actually failed. If the broker has lots of
acceptors it is a tedious process to identify the problematic
configuration. This commit adds details to the exception message about
which acceptor failed and which host:port it was attempting to bind to.
2020-04-15 15:48:59 -04:00
Justin Bertram 40a6bab898 ARTEMIS-2708 JDK bug causes missed props reload 2020-04-13 16:02:35 -04:00
Justin Bertram 701b4e4794 ARTEMIS-2692 refactor queue creation
This commit changes all tests to use the new methods.
2020-04-13 14:25:30 -05: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
Clebert Suconic 679bc1a3a0 ARTEMIS-2698 Fixing Typos on exposed group properties 2020-04-08 16:00:26 -04:00