Commit Graph

1174 Commits

Author SHA1 Message Date
Justin Bertram 2b5d8f3b80 ARTEMIS-1912 big doc refactor
- Split protocols into individual chapters
- Reorganize summary to flow more logically
- Fill in missing parameters in configuration index
- Normalize spaces for ordered and unordered lists
- Re-wrap lots of text for readability
- Fix incorrect XML snippets
- Normalize table formatting
- Improve internal links with anchors
- Update content to reflect new address model
- Resized architecture images to avoid excessive white-space
- Update some JavaDoc
- Update some schema elements
- Disambiguate AIO & ASYNCIO where necessary
- Use URIs instead of Objects in code examples
2018-06-07 11:26:36 -04:00
Clebert Suconic dfb41aed4c ARTEMIS-1915 Expiry Scanner is holding a lock on the queue
No tests required as there is no semantic changes here.
Current tests should validate this change.
2018-06-06 15:41:49 -04:00
Andrey Arkaev 1d89bc7dd2 ARTEMIS-1914 Fix NPE on ConfigurationImpl.hashCode() 2018-06-06 15:19:15 -04:00
Justin Bertram be36d3078c ARTEMIS-1902 decrement before returning 2018-06-04 15:01:04 -05:00
Justin Bertram 45ebe4e63d NO-JIRA allow enabling security at runtime 2018-06-04 12:01:02 -04:00
Justin Bertram ef6e3948fd ARTEMIS-1896 centralize authn failure logging
Authentication failures are currently only logged for CORE clients.
This change puts the logging in a central location which all protocols
use for authentication so that authentication failures are logged for
all protocols.
2018-06-04 12:01:02 -04:00
Justin Bertram 9183172de3 ARTEMIS-1892 allow whitespace in acceptor and connector URIs 2018-06-04 10:07:19 -04:00
Christopher L. Shannon (cshannon) 40ade11981 ARTEMIS-1895 - Add duplicate metadata failure callback to ActiveMQServerPlugin
Add a callback on duplicate metadata which will allow extra
functionality to be added.
2018-06-04 10:01:46 -04:00
Martyn Taylor dde60b136a ARTEMIS-1902 Ensure ServerConsumer close done once
Calling close multiple times on ServerConsumer can result in multiple
notifications being routed around the cluster.  This causes cluster
topology info to become skewed.  Which affects a number of components
such as message redistribution, metrics and can eventually cause OOM
should multiple queues be redistributing at the same time.
2018-06-04 09:33:26 -04:00
Johan Stenberg 0ea84ef9ff [ARTEMIS-1890] Fix any-word wildcard matching in AddressImpl to match zero words 2018-05-31 18:57:49 -04:00
Clebert Suconic 1ae2784dc6 ARTEMIS-1858 Expiry messages are not transversing clustering with AMQP 2018-05-30 18:57:38 -04:00
yang wei 06eb82cb14 ARTEMIS-1891 use io executor to send replicate packet
After sending pages, the thread will hold the storage manager write lock
and send synchronization finished packet(use the parent thread pool) to
the backup node. At the same time, thread pool is full bcs they are
waiting for the storage manager read lock to write the page or journal,
leading to replication starting failure. Here we use io executor to send
replicate packet to fix thread pool starvation problem.
2018-05-29 10:15:50 +08:00
saurabhrai d11eed2f9e ARTEMIS-1866 Make Quorum vote result wait time configurable.
Quorum voting is used by both the live and the backup to decide what to do if a replication connection is disconnected.
Basically, the server will request each live server in the cluster to vote as to whether it thinks the server it is replicating to or from is still alive.
You can also configure the time for which the quorum manager will wait for the quorum vote response.
Currently, the value is hardcoded as 30 sec. We should change this 30-second wait to be configurable.
2018-05-25 12:29:02 -04:00
saurabhrai fd3baf1ea2 ARTEMIS-1887 Setting default-max-consumers in address-setting not working
When setting "default-max-consumers" in addressing setting in broker.xml
It has no effect on the "max-consumers" property on matching address queues.

Tests added as part of a previous commit

This closes #2107
2018-05-24 14:36:23 -04:00
Shailendra Kumar Singh 390a07e391 [ARTEMIS-1885] max-consumers attribute in queue definition does not work for AMQP client.
Tests being added as part of another commit

This closes #2106
2018-05-24 14:36:23 -04:00
Michael André Pearce 659d23cb28 ARTEMIS-1872 Fixing address security checks
Ensure CREATE_ADDRESS is honored and behavior is consistent across protocols.
2018-05-24 05:23:41 +01:00
Michael André Pearce a9d9731f0a ARTEMIS-1872 Check for queue exists before creating shared queue
1. Add tests case to verify issue and fix, tests also tests for same behavior using CORE, OPENWIRE and AMQP JMS Clients.
2. Update Core Client to check for queue before creating, sharedQueue as per createQueue logic.
3. Update ServerSessionPacketHandler to handle packets from old clients to perform to implement the same fix server side for older clients.
4. Correct AMQP protocol so correct error code is returned on security exception so that amqp jms can correctly throw JMSsecurityException
5. Correct AMQP protocol to check for queue exists before create
6. Correct OpenWire protocol to check for address exists before create
2018-05-23 13:11:25 -04:00
Francesco Nigro f886c0bdb4 ARTEMIS-1876 InVMNodeManager shouldn't be used if no JDBC HA is configured
When database persistence and no shared store option is being used,
Artemis is choosing to use InVMNodeManager, that is not providing
the same behaviour of FileLockNodeManager.
2018-05-22 09:35:48 +02:00
Martyn Taylor 4b04b53bc9 ARTEMIS-1875 Add message address if not set during redistribution 2018-05-21 18:23:42 +01: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
Robbie Gemmell f0bac1bf18 ARTEMIS-1862: fix 'amqpLowCredits' XML config, update related code defaults 2018-05-11 21:07:02 +01:00
Justin Bertram ecb9d462ce ARTEMIS-1851 avoid exception in isReplicaSync() 2018-05-11 12:11:52 -04:00
Clebert Suconic 69ca189439 NO-JIRA Improvements on ReplicatedMultipleServerFailoverExtraBackupsTest 2018-05-08 18:55:59 -04:00
Clebert Suconic eaf935ecec NO-JIRA avoiding possible NPE on SharedNothingBackupActivation 2018-05-08 18:55:59 -04:00
Justin Bertram 90a604da20 ARTEMIS-1834 don't alter STOMP 'destination' header when using prefix 2018-05-08 15:28:46 -05:00
Clebert Suconic 50e170b7ec NO-JIRA Fixing ReplicatedFailoverTest testFailBack 2018-05-07 20:03:29 -04:00
Francesco Nigro d31d6e8131 ARTEMIS-1852 PageCursorProvider is leaking cleanup tasks while stopping
PageCursorProviderImpl is not handling any pending cleanup tasks
on stop, leaving paging enabled due to the remaining pages to be
cleared up.
PagingStoreImpl is responsible to trigger the flushing of pending
tasks on PageCursorProviderImpl before stopping it and to try to
execute any remaining tasks on the owned common executor, before
shutting it down.
It fixes testTopicsWithNonDurableSubscription.
2018-05-07 15:28:45 +02:00
Justin Bertram 893f219919 ARTEMIS-1847 another test fix after Netty upgrade 2018-05-03 14:22:19 -05: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
Ingo Weiss c3fbd1b9e4 [ARTEMIS-1819] Missing fields on listAllConsumersAsJSON, listConsumersAsJSON and listConnectionsAsJSON
Issue: https://issues.apache.org/jira/browse/ARTEMIS-1819
2018-05-03 12:39:35 -04:00
Shailendra Kumar Singh 32c6759c25 [ARTEMIS-1845]Timestamp header field should display in human readable format on console.
no tests needed as this is an UI change
2018-05-03 12:08:08 -04:00
Francesco Nigro 2eef0fbb10 ARTEMIS-1842 make sure quorum vote loops exits
The stopped flag used to stop the quorum vote loop needs to be volatile
in order to be safely published between threads.
2018-05-03 10:22:09 +01:00
andytaylor 2de1e49e5f ARTEMIS-1842 make sure quorum vote loops exits 2018-05-02 11:38:50 -04:00
Clebert Suconic e8a1e43ea2 ARTEMIS-1842 Always use Executor on Topology 2018-05-02 11:38:50 -04:00
Clebert Suconic fef6d5fc65 NO-JIRA Adding threadDump in case of failure 2018-05-02 11:38:50 -04:00
Clebert Suconic e8104586b4 ARTEMIS-1837 Replication Initial catchup deadlocks if clients disconnect
This is fixing existing tests, so no more tests are needed.
2018-04-30 11:27:51 -04:00
Clebert Suconic 86183d7b57 NO-JIRA Adding proper parameter on JdbcLeaseLockTest 2018-04-30 11:27:51 -04:00
JiriOndrusek 04d8390513 [ARTEMIS-1823] - Log warning on boot when persistence is disabled and paging enabled
no tests are needed as this is a simple logging change.
2018-04-26 09:48:06 -04:00
Francesco Nigro 5b6a8d2b59 ARTEMIS-1829 Remove deprecated plugin's messageExpired implementations
NotificationActiveMQServerPlugin and LoggingActiveMQServerPlugin are
implementing the deprecated version of
ActiveMQServerPlugin::messageExpired that is not called by the
new version of the method or any other part of the code

This fixing test org.apache.activemq.artemis.tests.integration.management.NotificationTest#testMessageExpired
2018-04-26 09:38:19 -04:00
Justin Bertram 6598ab271f ARTEMIS-1830 only return prepared txns with listPreparedTxns mgmnt op 2018-04-25 12:45:23 -05:00
Justin Bertram a2ade00a54 ARTEMIS-1821 LDAPLoginModule always returns true on commit() 2018-04-24 11:16:53 +08:00
Stanislav Knot 60264346da ARTEMIS-1805 fix for broker operations in hawtio 2018-04-24 10:58:15 +08:00
Francesco Nigro fdb63df392 ARTEMIS-1784 JDBC NodeManager should just use DMBS clock
It avoid using the system clock to perform the locks logic
by using the DBMS time.
It contains several improvements on the JDBC error handling
and an improved observability thanks to debug logs.
2018-04-18 09:54:34 -04:00
Tomas Hofman a8d0db2c14 ARTEMIS-1781 Connector parameters not backward compatible (Fix) 2018-04-17 11:38:19 -04:00
Francesco Nigro e310bb68b1 ARTEMIS-1808 LargeServerMessageImpl leaks direct ByteBuffer
largeMessagesFactory::newBuffer could create a pooled direct ByteBuffer
that will not be released into the factory pool: using a heap ByteBuffer
will perform more internal copies, but will make it simpler to be garbage
collected.
2018-04-17 11:00:45 -04:00
Howard Gao f29eeee167 NO-JIRA: Fix test regression
QuorumFailOverTest.testQuorumVotingLiveNotDead fails
because the quorum vote takes longer time to finish than
the test expects to.
(The test used to pass until commit ARTEMIS-1763)
2018-04-17 10:59:05 -04:00
Francesco Nigro c7651853cd ARTEMIS-1653 Allow database tables to be created externally
The previous commit about this feature wasn't using the row count query
ResultSet.
The mechanics has been changed to allow the row count query
to fail, because DROP and CREATE aren't transactional and immediate
in most DBMS.
It includes a test that stress its mechanics if used with DBMS like
DB2 10.5 and Oracle 12c.
Additional checks and logs have been added to trace each steps.
2018-04-17 10:41:14 -04:00
Francesco Nigro 469d6baa93 ARTEMIS-1788 JDBC HA should use JDBC Network Timeout
JdbcNodeManager is configured to use the same network timeout
value of the journal and to validate all the timeout values
related to a correct HA behaviour.
2018-04-17 10:40:20 -04:00
Francesco Nigro bbb2f708dd ARTEMIS-1806 JDBC Connection leaks
The JDBC Connection leaks on:
- JDBCFileUtils::getDBFileDriver(DataSource, SQLProvider)
- SharedStoreBackupActivation.FailbackChecker::run on a failed awaitLiveStatus
2018-04-17 10:38:53 -04:00
Michael André Pearce af91d3ac82 ARTEMIS-857 Add JMX endpoints to view and reset groups
Expose method to return current mappings of groups to consumers
Expose methods to reset (remove) specific group mapping from groupID to Consumer
Expose methods to reset (remove) all group mappings
2018-04-17 15:54:33 +08:00
Christopher L. Shannon (cshannon) bddfa4892b ARTEMIS-1803 - Pass ServerConsumer to messageExpired and
messageAcknowledged plugin callback methods

Knowing the consumer that expired or acked a message (if available) is
useful and right now a message reference only contains a consumer id
which by itself is not unique so the actual consumer needs to be passed
2018-04-14 10:34:09 -04:00
Lionel Cons 1e81361a88 ARTEMIS-1740: Add support for regex based certificate authentication 2018-04-12 12:55:20 -04:00
Howard Gao 6818762da8 ARTEMIS-1790 Improve Topology Member Finding
When finding out if a connector belong to a target node it compares
the whole parameter map which is not necessary. Also in understanding
the connector the best place is to delegate it to the corresponding
remoting connection who understands it. (e.g. INVMConnection knows
whether the connector belongs to a target node by checking it's
serverID only. The netty ones only need to match host and port, and
understanding that localhost and 127.0.0.1 are same thing).
2018-04-11 14:37:44 -04:00
Christopher L. Shannon (cshannon) 70f0908b4e ARTEMIS-1800 - Fix metrics decrement on scheduled message cancel
The queue metrics were being decremented improperly because on iteration
over the cancelled scheduled messages because the flag for fromMessageReferences was not
set to false. Setting the flag to false skips over the metrics update
which is what we want as the scheduled messages were never added to the
message references in the first place so the metrics don't need updating
2018-04-10 15:54:29 -04:00
Howard Gao 1175d777b3 ARTEMIS-1797 Auto-create-address flag shouldn't avoid temp destination creation
When creating a temp destination and auto-create-address set to false, the
broker throws an error and refuse to create it. This doesn't conform to
normal use-case (like amqp dynamic flag) where the temp destination should
be allowed even if the auto-create-address is false.
2018-04-10 13:38:27 -04:00
Christopher L. Shannon (cshannon) 4795f7c6d0 ARTEMIS-1799 - Add a NotificationActiveMQServerPlugin
Adds a new plugin that will support sending new types of notifications
for broker events which will allow enhanced broker monitoring
2018-04-10 09:43:02 -04:00
Clebert Suconic 396056ce04 ARTEMIS-1796 AMQP flush during handshake can break SASL 2018-04-09 13:11:41 -04:00
Howard Gao de5c0d51b9 ARTEMIS-1791 Large message files are not removed after redistribution across a cluster 2018-04-09 11:06:27 -04:00
Clebert Suconic e5bce13316 ARTEMIS-1776 Blocked Bridge is not resuming after reconnect
This is still part of ARTEMIS-1776 fix, which still part of the same release as we are on now.
Hence I'm not opening a new JIRA for this one.
2018-04-06 13:17:13 -04:00
Clebert Suconic 0bd99dfff7 ARTEMIS-1779 Fixing CoverityScan finding
There was a logic to validate if member is null.
Which seemed a bit weird considering the else would throw a NPE.
Fixing it proactively based on Coverity-scan findings.
2018-04-04 17:55:26 -04:00
Clebert Suconic f3e1ab337c ARTEMIS-1779 Small refactoring to logic on BridgeImpl::nodeUp logic 2018-04-03 16:22:13 -04:00
Howard Gao 262990fa67 ARTEMIS-1779 ClusterConnectionBridge may connect to other nodes than its target
The cluster connection bridge has a TopologyListener and connects to a new node
each time it receives a nodeUp() event. It needs to put a check here to make
sure that the cluster bridge only connects to its target node and it's backups.

This issue shows up when you run LiveToLiveFailoverTest.testConsumerTransacted
test.

Also in this commit improvement of BackupSyncJournalTest so that it runs more
stable.
2018-04-03 16:22:13 -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 70bdfe7603 ARTEMIS-1776 Asynchronous Flow control on the bridge 2018-03-28 19:09:20 -04:00
Francesco Nigro 1a7a2cf5b4 ARTEMIS-1774 Node Manager Store table name should be configurable
It exposes the table name configuration for:
- CLI command
- configuration file

The docs are updated as well.
2018-03-28 11:52:30 -04:00
Francesco Nigro af3917247a ARTEMIS-1760 JDBC HA should have configurable tolerance of DB time misalignment
It allows a user to customize the max allowed distance between system and DB time,
improving HA reliability by shutting down the broker when the misalignment
exceeds configured limit.
2018-03-27 10:36:56 -04:00
Niels Lippke b95afbf936 ARTEMIS-1653 Allow database tables to be created externally
In some environments it is not allowed to create a schema
by the application itself. With this change the AbstractJDBCDriver
now tests if an existing table is empty and executes further
statements in the same way as if the table does not exist.
2018-03-27 10:12:14 -04:00
Francesco Nigro b89fa74f8a ARTEMIS-1762 JdbcNodeManager shouldn't be used if no HA is configured
It forces to use InVMNodeManager when no HA option is selected with JDBC persistence and includes the checks that the only valid JDBC HA options are SHARED_STORE_MASTER and SHARED_STORE_SLAVE.
2018-03-27 10:10:35 -04:00
Francesco Nigro 8842ac3638 ARTEMIS-1757 Improve DB2 compatibility
It includes:
- Fixed AUTO_INCREMENT not supported on DB2
- Added proper stop/teardown of driver
- Fixed recursive SQLException formatting
2018-03-27 09:59:56 -04:00
Radovan STANCEL 373c3db2ac [ARTEMIS-1761] Log one warning if cluster could not be formed because it's not possible to connect to other cluster node 2018-03-26 10:32:17 -04:00
saurabhrai 6c05a81ba2 ARTEMIS-375:When use ./artemis data exp, the xml printed to stdout mixed with logging information 2018-03-23 13:59:58 +05:30
saurabhrai f045ffbcf8 ARTEMIS-370: Make JDBC Journal Sync period configurable 2018-03-22 16:29:00 -04:00
andytaylor 3a548a9df5 ARTEMIS-1763 - Remove 'quick check' before quorum
https://issues.apache.org/jira/browse/ARTEMIS-1763
2018-03-22 16:22:17 -04:00
Martyn Taylor f8547aecf1 ARTEMIS-1764 Ignore Ack for Prepared Tx when Queue deleted 2018-03-22 16:21:16 -04:00
Michael André Pearce a9d84a7dad ARTEMIS-1766 - Persist LastValue queue config in bindings.
Added Integration tests for the issue.
Add lastvalue to the queue bindings that get persisted.
2018-03-22 16:20:14 -04:00
Francesco Nigro b775cb251f ARTEMIS-1767 JDBC Lock Acquisition Timeout should behave like the file based version
The JDBC Lock Acquisition Timeout is no longer exposed to any user configuration and defaulted to infinite to match the behaviour of the journal (file-based) one.
2018-03-22 16:19:35 -04:00
andytaylor a1c76e8d61 ARTEMIS-1752 - avoid null pointer in BridgeImpl
https://issues.apache.org/jira/browse/ARTEMIS-1752
2018-03-22 11:01:32 +00:00
Clebert Suconic fe0e6c2b28 ARTEMIS-1754 Avoiding Leaks from LargeServerMessageImpl.getPersistentSize 2018-03-20 15:45:09 -04:00
Howard Gao 38ba5d797a ARTEMIS-1754 LargeServerMessageImpl.toString() may leak files 2018-03-20 15:40:44 -04:00
Martyn Taylor 772156dd35 ARTEMIS-1753 Prevent NPE on 1.x Client Topic Sub
When creting a durable topic subscription using the Artemis 1.x JMS
client library.  The client sends a QueueQuery to the server to see if
the durable subsciption queue already exists.  The broker then performs
some transformation of the queue addresses to suit the 1.x naming
scheme.  However, if the queue does not already exist the transform is
attempted on a null string causing NPE.  To fix we simply check that the
result return isExists=true.
2018-03-19 13:35:02 +00:00
Michael André Pearce c7622d58c0 ARTEMIS-1747 - Fix Configuration change loss when network Issue
Add Test Case to stop and restart server after config reload and check state, this re-creates network health check issue where config changes are lost when network health check de-activates the server and then re-activates.

Add fix to update the held configuration thats used when initialisation steps during start are done.
2018-03-15 10:05:11 -04:00
andytaylor 3c6876ece6 ARTEMIS-1741 - log warning if a node isnt configured for quorum voting
https://issues.apache.org/jira/browse/ARTEMIS-1741
2018-03-09 09:10:55 -06:00
Clebert Suconic 91c0452d60 ARTEMIS-1737 Fixing semantic of ServerControl.forceFailover
This closes #1940
2018-03-08 23:42:29 -05:00
Stanislav Knot dc096f950d ARTEMIS-1737 fix for inaccessible slave console after failover 2018-03-08 23:32:44 -05:00
andytaylor e849471c83 ARTEMIS-1736 - make sure access methods are ordered when used
https://issues.apache.org/jira/browse/ARTEMIS-1736
2018-03-08 16:12:08 +00:00
Clebert Suconic 8831a570de ARTEMIS-1345 ConcurrentModificationException after copy 2018-03-07 18:05:35 -05:00
Justin Bertram 92cb69513e ARTEMIS-1198 add listAllSessionsAsJSON mgmnt method 2018-03-06 18:46:20 -05:00
Justin Bertram b638748ae3 NO-JIRA ignore exception when deleting temp queue 2018-03-06 12:39:43 -05:00
Michael André Pearce cbe4e27cb8 ARTEMIS-1731 Support offline validation
Copy in https://www.w3.org/2005/08/xml.xsd so validation of broker.xml works offline
2018-03-06 12:38:41 -05:00
huaishk 7f606a4690 ARTEMIS-1728 Reclaim memory when page cursor complete
Free hash set used to hold page position for acks and removed refs.
The two set is cleared, but they still hold a big array.

It is safe to replace the old one with empty set.
2018-03-06 10:20:32 -05:00
Ilkka Virolainen 66e81c500a ARTEMIS-1730 fix expiry without address or bindings 2018-03-05 15:00:07 -05:00
Justin Bertram 2123f85ea9 ARTEMIS-1717 create/delete address permissions ignored in broker.xml 2018-03-01 14:02:57 -06:00
Clebert Suconic e4e864d88e NO-JIRA Speeding up ReattachTest 2018-03-01 14:40:30 -05:00
17103355 c808f246e5 ARTEMIS-1705 Only messages from MessageReferences are subtracted from the queueMemorySize 2018-03-01 09:53:58 -05:00
Christopher L. Shannon (cshannon) 642654ff7a ARTEMIS-1706 - Add support for wantClientAuth
Support setting wantClientAuth on a netty acceptor
2018-02-28 06:44:24 -05:00
Clebert Suconic d7b7797843 NO-JIRA Improving test and queue.flush() 2018-02-27 19:13:35 -05:00
Clebert Suconic 158eb9d3bf NO-JIRA Using force option on deleteTopics and deleteQueues on JoramTests 2018-02-27 16:13:42 -05:00
Clebert Suconic 7e06a2b192 ARTEMIS-1700 Using IOExecutors for more IO tasks 2018-02-27 12:42:20 -05:00
Michael André Pearce 9d1c59cdff ARTEMIS-1661 Support splitting of broker.xml
Support XML standard XInclude thus allowing splitting of the broker.xml
Added test cases with split out config using include.
2018-02-27 11:24:36 +00:00
Justin Bertram 36fc14a30d ARTEMIS-1704 clear activate callbacks when stopping 2018-02-26 17:36:17 -05:00
Clebert Suconic ecf4110b1b ARTEMIS-1700 Fixed deadlock in paging state
This closes #1894
2018-02-26 16:06:04 -05:00
Justin Bertram 03709fc7cf ARTEMIS-1694 fix graceful-shutdown doc 2018-02-26 19:14:44 +00:00
Justin Bertram 92ca12a3d8 ARTEMIS-1696 allow empty 'address' for grouping-handler 2018-02-26 19:13:23 +00:00
Justin Bertram 1e57a8e70a ARTEMIS-1697 give ActivateCallback default methods 2018-02-22 21:37:33 +00:00
Stanislav Knot bf2688c55f ARTEMIS-1692 fixed filtering consumers in hawtio console 2018-02-22 20:33:07 +00:00
Justin Bertram c26c970ddc ARTEMIS-1666 refactor to avoid duplicate code and fix bug 2018-02-21 13:23:06 -05:00
Justin Bertram 0121741e2a ARTEMIS-872 fix potential negative space calc 2018-02-20 23:51:34 -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
Justin Bertram ab602351a1 ARTEMIS-1688 fix cluster when auto-create-addresses=false 2018-02-20 11:19:55 -05:00
Clebert Suconic 34146c0cef Revert "ARTEMIS-1688 fix cluster when auto-create-addresses=false"
Revert #1875

This reverts commit 5ad45369ce.

The storage manager is broken now as the AddressManager change here is trying to insert a record on the journal before startup.
2018-02-19 18:03:21 -05:00
Justin Bertram 5ad45369ce ARTEMIS-1688 fix cluster when auto-create-addresses=false 2018-02-19 11:36:11 -05:00
raul.valdoleiros 13e071158d ARTEMIS-1680 - Synchronize message load balacing type between brokers
This guarantees the update of message load balancing type between addresses and linked adresses
2018-02-19 11:33:09 -05:00
Clebert Suconic b5bf5afde7 NO-JIRA Test fixes
- LargeServerMessageImpl.finalize is eventually causing deadlocks
- CoreMessage needs to check properties before decoding
- PagingTest tweaks
- ServerLocatorImpl can deadlock eventually, avoiding a lock and using actors
- ActiveMQServerImpl.finalize is also evil and can cause deadlocks on the testsuite
- MqttClusterRemoteSubscribeTest needs to setup the Address now on the setup
2018-02-14 10:56:44 -05:00
Dejan Bosanac 88f43e9342 ARTEMIS-1651 Allow custom etc and data directories to be used
initial support for custom etc location

fixing windows distribution

fixing StreamClassPathTest

ARTEMIS-1651 fix tests and add docs
2018-02-14 09:17:08 -06:00
Clebert Suconic 9b104930c2 ARTEMIS-1663 Fixing Encoding on PageCountPendingImpl
The PageCountPendingImpl was increasing the encode size without using its full allocation.
This was causing issues on replication as the encode is also used to determine the size of the packets.
however the packets were not receive the full allocated data causing missing packets on the replication
and test failures.

This is fixing the issue
2018-02-14 09:57:15 -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
yang wei 5dc0777f52 ARTEMIS-1667 init pagingFactory with journalBufferTimeout_NIO 2018-02-12 09:37:56 -06:00
Clebert Suconic 63e0c0d310 ARTEMIS-1650 Fixing Testsuite on PageReference
Transactions may initialize a PagedReference without a valid message yet
during load of prepared transactions.

Caching has to be lazy on this case and it should load on demand.
2018-02-09 12:09:10 -05:00
Michael André Pearce 70406bf21c ARTEMIS-1659 - Only reload configuration if the node is Active. 2018-02-09 09:05:53 -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
huaishk 822445a717 ARTEMIS-1650 Improve paged message acknowledge
Cache `messageID`, `transactionID` and `isLargeMessage`
in PagedReference, so that when acknowledge, we do not have to
get PagedMessage which may be GCed and cause re-read entire page.
2018-02-08 09:12:57 -05:00
Christopher L. Shannon (cshannon) 33b265ca6b ARTEMIS-1633 - Include populated RoutingContext in beforeMessageRoute
call

There was a small bug in the previous commit, the beforeMessageRoute
callback was being executed too early so the RoutingCountext wasn't
being filled in
2018-02-08 07:08:50 -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
rico.pahlisch 6501c3de1f ARTEMIS-1649 - enable openssl provider for Netty 2018-02-05 14:42:04 -06:00
Martyn Taylor 7576b9d586 ARTEMIS-1611 Added support for 1.x transformer API 2018-02-05 16:32:03 +00:00
Andy Taylor 032210a7c6 ARTEMIS-1654 - fix brige reconnect logic
Make sure that if a bridge disconnects and there is no record in the topology that it uses the original bridge connector to reconnect.

Originally the live broker that disconnected was left in the Topology, thie broke quorum voting as when th evote happened all brokers when asked though th etarget broker was still alive.
The fix for this was to remove the target live broker from the Topology. Since the bridge reconnect logic relied on this in a non HA environment to reconnect this stopped working.
The fix now uses the original target connector (or backup) to reconnect in the case where the broker was actually removed from the cluster.

https://issues.apache.org/jira/browse/ARTEMIS-1654
2018-02-02 12:17:41 -05:00
Christopher L. Shannon (cshannon) 586487155c ARTEMIS-1657 - Properly decrement memory usage when moving messages from
queue

When messages are retried and moved froma DLQ to the original queue the
memory usage tracker needs to be decremented
2018-02-02 11:13:01 -05:00
Michael André Pearce 9acdec2468 ARTEMIS-1655 Fix TransportConfiguration encode failing
Check for null on isMaskPassword, seems this regressed in bb84f67936 change for ARTEMIS-1600
2018-02-02 12:43:09 +00:00
Christopher L. Shannon (cshannon) 51cb5dfb18 ARTEMIS-1647 - Add plugin support for binding creation and removal
Adds callbacks to ActiveMQServerPlugin for binding add and remove events
2018-02-01 07:47:23 -05:00
gtully d2235d4dad [ARTEMIS-1030] document url escaping of the virtualTopicConsumerWildcards value 2018-02-01 08:43:11 +08:00
Howard Gao 647954bf5a ARTEMIS-1642 Add log info to FileStoreMonitor
Adding log info in case that an IOException is thrown from
the underlying file system to provide information for debugging.
2018-01-31 18:20:31 -05:00
Justin Bertram 9c8bf2f2ca ARTEMIS-1644 legacy clients can't access resources with old prefixes 2018-01-31 18:13:29 -05:00
Justin Bertram 028d6f71ef ARTEMIS-1645 diverted msg can't be retried from DLQ 2018-01-31 18:07:12 -05:00
Pat Fox 6e71fa7fd9 ARTEMIS-1623 add logging codes to LoggingActiveMQServerPlugin 2018-01-31 15:13:31 -06:00
Francesco Nigro 52e594d218 ARTEMIS-1640 JDBC NodeManager tests have to be customizable to run on different DBMS
ActiveMQTestBase has been enhanced to expose the Database storage configuration and by adding specific JDBC HA configuration properties.
JdbcLeaseLockTest and NettyFailoverTests have been changed in order to make use of the JDBC configuration provided by ActiveMQTestBase.
JdbcNodeManager has been made restartable to allow failover tests to reuse it after a failover.
2018-01-30 14:07:16 +01:00
Clebert Suconic c10b74412a ARTEMIS-1638 & ARTEMIS-1641 Making sure Paging survives Purge on a test & cleanup PgTX (fix) 2018-01-26 23:24:56 -05:00
Clebert Suconic adb466b2f8 ARTEMIS-1638 Fixing Purge rollback behaviour (fix) 2018-01-26 23:24:55 -05:00
Clebert Suconic 24b1f2efbc ARTEMIS-1633 proper initialize route result 2018-01-25 12:11:11 -05:00
Christopher L. Shannon (cshannon) 37cc1e3e7a ARTEMIS-1633 - fire message routing callbacks for all results
Make sure ActiveMQServer plugin implementations are always notified of
message route events
2018-01-25 12:11:11 -05:00
Clebert Suconic a82ffbcb78 ARTEMIS-1628 Fixing typo on limit pool size check 2018-01-24 10:11:21 -05:00
Pat Fox e350c58a46 ARTEMIS-1623 ActiveMQServerPlugin impl for logging various broker events
Similar concept to the ActiveMQ 5.x loggingBrokerPlugin
2018-01-24 09:10:32 -05:00
Christopher L. Shannon (cshannon) 8b6df5b73a ARTEMIS-1627 - Support removing addresses that do not have direct
bindings

If there are no direct bindings on an address and only linked bindings
then the address should be able to be removed from the broker
2018-01-23 16:26:45 -05:00
Justin Bertram 98cf8651cf ARTEMIS-1399 fix comparison 2018-01-23 16:14:08 -05:00
Justin Bertram 0b9f2cb452 ARTEMIS-836 log JDBC details when starting 2018-01-23 16:23:24 +00:00
Clebert Suconic 35222485e8 ARTEMIS-1628 Limit pool size on artemis journal 2018-01-23 10:48:31 +08:00
Stanislav Knot 156372ab40 ARTEMIS-1625 fix moving messages 2018-01-22 18:07:44 -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 98ce31bf58 ARTEMIS-1621 Make producerWindowSize configurable on clusterconnection bridges
The cluster connection bridge hard codes its producerWindowSize to -1
(meaning no producer flow control) even if you configure it otherwise.
2018-01-22 11:27:59 -06:00
Christopher L. Shannon (cshannon) bc38d7ce32 ARTEMIS-1619 - Add plugin support for address lifecyle
Adding callbacks to the plugin API for address creation, update and
removals
2018-01-18 21:01:41 -06:00
Clebert Suconic 61a1123ee1 ARTEMIS-1613 Integrating JDBC into CLI (create print-data and exp) 2018-01-18 20:55:00 -06:00
shoukun c4bfb9521f ARTEMIS-1570 Flush appendExecutor before take journal snapshot
When live start replication, it must make sure there is
no pending write in message & bindings journal, or we may
lost journal records during initial replication.

So we need flush append executor after acquire StorageManager's
write lock, before Journal's write lock.
Also we set a 10 seconds timeout when flush, the same as
Journal::flushExecutor. If we failed to flush in 10 seconds,
we abort replication, backup will try again later.

Use OrderedExecutorFactory::flushExecutor to flush executor
2018-01-18 13:16:27 -05:00
Clebert Suconic 9dbc5dc409 ARTEMIS-1577 Address-settings policies not working with older clients
This closes #1744
2018-01-18 10:18:39 -05: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
Michael André Pearce fd0ba69793 ARTEMIS-1606 - Change AddressInfo RoutingType Set to use EnumSet
Change all use from Set<RoutingType> to EnumSet<RoutingType>
Deprecating any old exposed interfaces but keeping for back compatibility.
Address info to avoid iterator on getRoutingType hotpath, like wise can be avoided where single RoutingType is passed in.
2018-01-18 13:36:09 +01:00
Christopher L. Shannon (cshannon) 67a9220d24 ARTEMIS-1610 Properly remove an address from the WildcardAddressManager
When an address is removed from the address manager its linked addresses
also need to be removed if there are no more bindings for the address.
Also adding a null check on bindings of linked addresses when a new
binding is added
2018-01-17 13:20:04 -05:00
Martyn Taylor f09bde07df ARTEMIS-1612 Fix message redistribution for prefixed addresses 2018-01-17 11:19:07 -05: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
Francesco Nigro 8d776eddfc ARTEMIS-1586 Reduce GC pressure due to String allocations on Core protocol
The commit contains:
- a general purpose interner implementation
- StringValue/SimpleString internrs specializations
- TypedProperties keys/values string interning for SessionSendMessage decoding
2018-01-17 09:33:41 +01:00
Jeff Mesnil 938fbd81cb [ARTEMIS-1590] Properties-based SQLProvider
Replace GenericSQLProvider and other implementation by a single
PropertySQLProvider that uses properties to define SQL queries.

SQL queries are loaded from the journal-sql.properties file.
Queries specific to a DB dialect can be specified by adding a suffix to
the key of the generic property.
For example, the generic property to create a file Table is:

create-file-table = CREATE TABLE %s (ID BIGINT AUTO_INCREMENT, ...)

This property can be customized for Derby by using the
create-file-table.derby  property:

create-file-table.derby=CREATE TABLE %s (ID BIGINT NOT NULL GENERATED ALWAYS AS IDENTITY (START WITH 1, INCREMENT BY 1),...

JIRA: https://issues.apache.org/jira/browse/ARTEMIS-1590
2018-01-12 14:50:21 +01:00
gtully 49b7863cf9 [ARTEMIS-1597] validate non null callback principal for login success 2018-01-11 11:46:09 -06:00
Stanislav Knot 21b58bfea8 ARTEMIS-1579 browsing messages in hawtio console 2018-01-11 10:56:46 +00:00
Justin Bertram 7c3e78ca87 ARTEMIS-1594 don't log dlq/expiry warn for internal q 2018-01-10 11:43:06 -05:00
Michael André Pearce 9c18dd04df ARTEMIS-1585 - Log connector details on start
Log connector details when they start. 
This is similar to that of acceptors, and helps when any issues later.
2018-01-09 12:26:56 -06:00
Francesco Nigro e360f85c1b ARTEMIS-1593 RemotingConnectionImpl leaks
FileNameKey was holding a reference to PropertiesLoader.this due to its inner class definition, causing RemotingConnectionImpl to leak through a long chain of dependencies rooted in a PropertiesLoader's subclass property ie PropertiesLoaderModule::callbackHandler.
FileNameKey is turned into a inner static class to break this hidden dependency.
2018-01-09 15:26:11 +00:00
Pat Fox d95757057e ARTEMIS-1575 configure custom broker plugins with key/value properties.
The properties are read and passed into the the broker plugin's init(Map<String,String>)
2018-01-04 14:27:41 -06:00
raul.valdoleiros 8c0e1e96ed ARTEMIS-1548 Support CRL
Add support for CRL in client authentication
2018-01-04 12:56:25 -06:00
Michael André Pearce 035936cdb8 ARTEMIS-1569 - Queue - User Enhancement
Expose User associated with creating Queue on JMX QueueControl (as attribute) 
Allow setting of the user to associate with creating the queue when configured in broker.xml (before only if created over wire is it possible to set the user)
2017-12-21 15:38:17 +00:00
Clebert Suconic 515560be2a NO-JIRA Fixing SystemPropertyOverrideTest 2017-12-21 07:22:51 -05:00
Francesco Nigro 170e89f9fc ARTEMIS-1541 Make the JDBC Node Manager more resilient on failures
In order to make the JDBC Node Manager more resilient has been implemented:
- recovering with fixed number of retries during the NodeId setup + unrecoverable failure otherwise
- unrecoverable fail on exceptions while renewing a lease lock

In addition, in different parts of these critical processes are added more log informations to help diagnose.
2017-12-20 16:03:19 -05:00
Clebert Suconic 7514e91ed1 Revert "ARTEMIS-1545 Support JMS 2.0 Completion Listener for Exceptions"
Revert "ARTEMIS-1545 Adding HornetQ 2.4.7 on the mesh to validate send-acks"

I'm reverting this as the testsuite is broken..
We will send it back once worked out.

This reverts commit 8f5b7a1e73.
This reverts commit 9b982b3e30.
2017-12-19 17:03:00 -05:00
Michael André Pearce 9b982b3e30 ARTEMIS-1545 Support JMS 2.0 Completion Listener for Exceptions 2017-12-19 14:44:58 -05:00
Martyn Taylor 3ba50574fb ARTEMIS-1565 Fix server schema 2017-12-19 14:01:46 +00:00
Andy Taylor 6067a285bd https://issues.apache.org/jira/browse/ARTEMIS-1565
ARTEMIS-1565 - replica should retry quorum vote

https://issues.apache.org/jira/browse/ARTEMIS-1565
2017-12-19 11:30:20 +00:00
Clebert Suconic dbe575a0c1 ARTEMIS-1546 Fixing body compatibility issue by recast body towards 1.4
https://issues.apache.org/jira/browse/ARTEMIS-1546

Recasting the body as 1.x format when there's a 1.x in use at the other size of the wire
2017-12-18 22:04:38 -05:00
Jiri Danek 0a2e143de5 ARTEMIS-1463 Fix broker's mBean domain name 2017-12-18 11:30:18 +00:00
Martyn Taylor 0e3468cefb ARTEMIS-1543 Fix Quorum Vote with remain live setting 2017-12-18 10:36:11 +00:00
raul.valdoleiros 46b642447c ARTEMIS-1523 wildcard binding configured wrong
Bindings with wildcards are not configured with the proper
message-load-balancing type.
2017-12-12 09:33:00 -06:00
Stanislav Knot 736e95c287 ARTEMIS-1537 broker was less strict while reloading configuration 2017-12-12 13:18:41 +00:00
Pat Fox d7b464cff3 NO-JIRA fixed checkstyle issues and added tests 2017-12-12 13:17:02 +00:00
Michael André Pearce f08da813a1 NO-JIRA fix fieldname regression
Fix field name regression, but ensure predicate and sorting still works.
Remove reflection introduced by new sorting, and rely on field mapping.
2017-12-12 13:17:02 +00:00
Pat Fox b39c556784 NO-JIRA fixed minor regression(reverted JSON field names) and NullPointer in ActiveMQServerControlImpl 2017-12-12 13:17:02 +00:00
todd 4ab664f796 ARTEMIS-1542 - AMQP message cluster-bridging fixi
Fixing and issue where AMQP messages would lose their address when being sent accross a cluster-bridge.
2017-12-11 12:31:54 -05:00
Justin Bertram 84bedaf2e4 ARTEMIS-1547 support referrals in LDAP login module 2017-12-10 21:50:47 +00:00
Michael André Pearce 6aac6d6f4f ARTEMIS-1533 Import subschema's so XMLLINT validates broker.xml 2017-12-05 09:23:17 -06:00
Pat Fox 7d61969795 ARTEMIS-1526 race condition between listConsumers() and closing a Session. When session not found, ignore that consumer and continue. 2017-12-05 09:10:40 -06:00
Stanislav Knot 67fca940d4 ARTEMIS-1530 Fix expiry statistics 2017-11-30 09:59:35 -05:00
Clebert Suconic f9d101d0a1 ARTEMIS-1531 Adding timedbuffer operations on critical analyzer
Also, making TimedBuffer.stop() synchronized to avoid issues during device outages
2017-11-29 18:09:00 -05:00
Clebert Suconic 8b7282d849 ARTEMIS-1529 Fixing Ref count over asynchronous ack 2017-11-29 09:45:09 -05:00
saurabhrai 4abca78785 ARTEMIS-1364: Enable internal sorting in hawtio web console 2017-11-29 08:52:33 +00:00
saurabhrai 6315e3faf0 ARTEMIS-1505: NPE prevents browsing queue with large messages 2017-11-27 15:01:34 -05:00
Pat Fox 4edf6793bb ARTEMIS-1524 avoid null pointer due to race condition in listAddresses(). If address is deleted, ignore that address and continue 2017-11-27 13:05:12 -05:00
Justin Bertram f53e411dad ARTEMIS-1525 refactor embedded examples 2017-11-27 10:55:16 -06:00
Justin Bertram 40aa3f5821 ARTEMIS-1513 fix AMQP + core bridge 2017-11-21 09:44:30 -05:00
Clebert Suconic b27ed5de16 ARTEMIS-1514 Fix File open on Large Message 2017-11-21 09:27:27 -05:00
Martyn Taylor eddb144deb ARTEMIS-1514 Fix read large message into buffer 2017-11-21 13:23:12 +00:00
Howard Gao 5fe88e1c66 ARTEMIS-1365 Advisory consumers listed in Console
Openwire clients create consumers to advisory topics to receive
notifications. As a result there are internal queues created
on advisory topics. Those consumer shouldn't be exposed via
management APIs which are used by the Console

To fix that the broker doesn't register any queues from
advisory addresses.

Also refactors a code to remove Openwire specific contants
from AddressInfo class.
2017-11-17 17:39:40 +08:00
Clebert Suconic 9daa0321b6 ARTEMIS-1514 Large message fix
I'm doing an overal improvement on large message support for AMQP
However this commit is just about a Bug on the converter.

It will be moot after all the changes I'm making, but I would rather keep this separate
as a way to cherry-pick on previous versions eventually.
2017-11-15 20:54:58 -05:00
Howard Gao 19c6f2d5c4 NO-JIRA Added test coverage for broker paging with unlimited memory
This test starts 2 servers and send messages to
a queue until it enters into paging state. Then
it changes the address max-size to -1, restarts
the 2 servers again and consumes all the messages.
It verifies that even if the max-size has changed
all the paged messages will be depaged and consumed.
No stuck messages after restarting.

The tests is there to guard a case where messages
won't be depaged on server restart after the max-size
is changed to -1. This issue has been fixed into
master along with the fix for ARTEMIS-581, particularly
the changes to the method PagingStoreImpl.getMaxSize().
2017-11-15 17:19:30 -05:00
Clebert Suconic 68705a5a63 NO-JIRA Making sure System.properties are cleaned up between tests 2017-11-15 17:14:34 -05:00
Clebert Suconic 63b156e290 ARTEMIS-1495 Test Improvements
Server.stop is currently waiting completions on Sessions just because of test cases.

With the recent changes made into the Executors this is not needed any longer
2017-11-13 16:46:32 -05:00
Clebert Suconic 91db08072b ARTEMIS-1495 Fixing In Handler executor and added benchmark to measure impact of changes 2017-11-09 11:58:36 -05:00
Clebert Suconic 2e6176a693 ARTEMIS-1495 Removing flushes from codebase
Instead of flushing we just need to make sure there are no more calls into
page executors as we stop the PageManager.

This will avoid any possible starvations or deadlocks here.
2017-11-09 11:58:36 -05:00
Clebert Suconic 559a704818 ARTEMIS-1416 Fixing testsuite 2017-11-03 18:27:42 -04:00
Stanislav Knot a5c0c024fa ARTEMIS-1486 added JMS client test 2017-11-03 10:53:05 -04:00
Justin Bertram 096d98407f ARTEMIS-1492 obfuscate passwords in acceptorControl 2017-11-02 20:46:26 -04:00
Clebert Suconic 7f4a79b0c6 NO-JIRA Fixing intermittent test failures 2017-11-02 09:37:31 -04:00
Stanislav Knot 61ce7a7454 ARTEMIS-1486 Core client should be notified if consumer is closed on broker side 2017-11-02 11:19:35 +00:00
Clebert Suconic 2bf690e21b ARTEMIS-1489 Adding Timed Buffer into Critical Analyzer 2017-10-31 08:33:44 -05:00
Erich Duda fb76d9aeb0 ARTEMIS-1485 ActiveMQTestBase.threadDump should print information about locks and deadlocks
Improved implementation of ActiveMQTestBase.threadDump which uses ThreadMXBean
for getting information about threads including locks and deadlocks.
2017-10-31 08:04:11 +01:00
Clebert Suconic 1af6d986a5 ARTEMIS-1447 Reuse thread pools on JDBC Locks
I had moved the initialization of the thread pools for that..
I also have changed the CrticialAnalyzer to use the same pools as part of this
2017-10-27 22:32:53 -04:00
Francesco Nigro 33cab063ea ARTEMIS-1447 JDBC NodeManager to support JDBC HA Shared Store
It fixes the NPE on server start due to:
 - missing SqlProviderFactory
 - missing executor factory/scheduled pool (ie using exclusive scheduled pools)

It fixes the WARNINGS due to wrong slowness detection while renewing JdbcLeaseLock.
2017-10-27 12:26:48 -05:00
Francesco Nigro 09a5d6f1c6 ARTEMIS-1447 JDBC NodeManager to support JDBC HA Shared Store 2017-10-26 15:38:37 -04:00
Chris Burlinchon 06dab31fd0 ARTEMIS-1479 Fix set validated user in large messages 2017-10-25 11:44:14 -04:00
Justin Bertram de1165df6e ARTEMIS-1420 prevent potential NPE 2017-10-25 09:00:10 -05:00
Stanislav Knot 6faffd690e ARTEMIS-1420 enforce timeout on network client handshake 2017-10-24 14:28:23 -05:00
Andy Taylor a64d7c2e42 ARTEMIS-1463 - added SSL example + docs
also added support for anon login

https://issues.apache.org/jira/browse/ARTEMIS-1463
2017-10-18 15:24:44 -05:00
Clebert Suconic fdcae9d32a ARTEMIS-450 Fixing deadlock over lots of rollbacks and Queue.addHead 2017-10-18 12:21:47 -04:00
Justin Bertram eee72a61d1 ARTEMIS-1456 use queue name when null address on createQueue 2017-10-17 10:03:33 +01:00
Andy Taylor 12ad0120ad ARTEMIS-1463 - add role based authentication to the JMX objects
some example fixes

https://issues.apache.org/jira/browse/ARTEMIS-1463
2017-10-17 10:02:46 +01:00
Howard Gao 105d8c3388 ARTEMIS-1366 Hide Advisory Address from Management Console
Openwire consumer is listed twice below "consumers" tab.
First it shows correctly the requested queue consume.
Second it shows consumer from multicast queue ActiveMQ.Advisory.
The second one is internal and should be hidden.
2017-10-16 16:51:54 -05:00
Andy Taylor 62a2b14dd0 ARTEMIS-1463 - add role based authentication to the JMX objects
This is done by creating a guard and using JAAS to check for access to mbean objects and their methods.

NB this also implements https://issues.apache.org/jira/browse/ARTEMIS-534

https://issues.apache.org/jira/browse/ARTEMIS-1463
2017-10-16 15:39:38 +01:00
Clebert Suconic ea89833204 ARTEMIS-1446 Use Contructor on TransformerConfiguration 2017-10-10 15:17:31 -04:00
Michael Andre Pearce 4db8cd54ca ARTEMIS-1446 - Support Transformer configuration by properties
Update Tranformer to be able to handle initiation via propertiers (map<string, string>)
Update Configuration to have more specific transfromer configuration type, and to take properties.
Support back compatibility.
Add AddHeadersTransformer which is a main use case, and can act as example also.
Update Control's to expose new property configuration
Add test cases
Update examples for new transformer config style
2017-10-09 17:29:10 -04:00
Clebert Suconic d190b611be ARTEMIS-1452 Improvements to IO parameters and options
- it is now possible to disable the TimedBuffer
- this is increasing the default on libaio maxAIO to 4k
- The Auto Tuning on the journal will use asynchronous writes to simulate what would happen on faster disks
- If you set datasync=false on the CLI, the system will suggest mapped and disable the buffer timeout

This closes #1436

This commit superseeds #1436 since it's now disabling the timed buffer through the CLI
2017-10-09 14:32:04 -04:00
Clebert Suconic ba1323c8b2 ARTEMIS-1455 Fixing issues on Large Message conversion 2017-10-09 14:32:03 -04:00
Clebert Suconic 484e939698 NO-JIRA: Speed up cleanupThreads for testsuite 2017-10-09 14:32:03 -04:00
Dmitrii Tikhomirov 53efdbab49 ARTEMIS-1455 HQ222142: Error on resetting large message deliver - null: java.lang.NullPointerException 2017-10-09 12:54:46 -04:00
Clebert Suconic 1d5fe2862a ARTEMIS-1444 Fixing byte buffer conversion
I'm also using a lower size on message, to speed up the new test.

(100M may be a lot on some CIs)
2017-10-09 12:50:38 -04:00
Martyn Taylor 988c91557d ARTEMIS-1444 Support Messages > JournalBufferSize in all Protocols 2017-10-09 12:50:38 -04:00
Clebert Suconic 30ba65a082 NO-JIRA: Fixing the testsuite on Page.finalize() 2017-10-07 12:05:55 -04:00
Clebert Suconic bb554e5264 ARTEMIS-1397 Removing Netty Copied classes
instead of duplicating a buffer from Netty, this will use an existing Wrapped Unpooled Buffer
Which will in turn use Unsafe Properly.
2017-10-02 17:06:06 -04:00
Ryan Yeats 420421c90b ARTEMIS-1397 remove package private access to netty 2017-10-02 09:33:47 -04:00
Clebert Suconic aa3e8941d1 ARTEMIS-1442 Shutdown server if can't move file on journal 2017-09-29 11:35:47 -04:00
Clebert Suconic 178d403117 NO-JIRA Adding CriticalAnalyzer test on HALT 2017-09-29 11:35:47 -04:00
Clebert Suconic 1b0fc06196 ARTEMIS-1440 ForceFailover to be asynchronous and allow management 2017-09-29 09:34:30 -04:00
Dmitrii Tikhomirov 7c433e527a ARTEMIS-1382 Improve artemis-server logging 2017-09-28 21:41:40 -04:00
Michael Andre Pearce b53b3acdb4 ARTEMIS-1439 Upgrade Netty to 4.1.16
Upgrade netty.
Remove tacticle fix for https://issues.apache.org/jira/browse/ARTEMIS-1099
as now fixed/handled upstream in netty from 4.1.16 https://github.com/netty/netty/issues/7150
2017-09-28 13:51:00 -05:00
Clebert Suconic 796c4f2c4e ARTEMIS-1441 Critical Analyzer Check Period not properly parsed 2017-09-27 20:59:05 -04:00
Clebert Suconic 8b68e8f48a NO-JIRA: some more organization on critical analyzer 2017-09-27 12:57:42 -04:00
Clebert Suconic 78f5ab096f NO-JIRA: Refactoring method on critical analyzer
Same semantics, no need for jira here
2017-09-26 17:27:04 -04:00
Clebert Suconic b2c5cb06ec NO-JIRA: Parse System properties first 2017-09-26 16:49:17 -04:00
Justin Bertram abcf4b747e ARTEMIS-1428 support max frame payload length for STOMP websocket 2017-09-26 15:17:07 -04:00
Michael Andre Pearce e9eaa7daf6 ARTEMIS-1422 Fix match change to support wildcard config 2017-09-25 11:34:34 -04:00
Pat Fox 50fcd48e28 ARTEMIS-1433 adding AddressMemoryUsage() and AddressMemoryUsagePercentage() to ActiveMQServerControl 2017-09-25 10:37:16 -04:00
Jeff Mesnil 0010b0a090 [ARTMIS-1431] Adapt transport configuration in ClientProtocolManagerFactory
add the adaptTransportConfiguration() method to the
ClientProtocolManagerFactory so that transport configurations used by
the ClientProtocolManager have an opportunity to adapt their transport
configuration.

This allows the HornetQClientProtocolManagerFactory to adapt the
transport configuration received by remote HornetQ broker to replace the
HornetQ-based NettyConnectorFactory by the Artemis-based one.

JIRA: https://issues.apache.org/jira/browse/ARTEMIS-1431
2017-09-25 10:33:56 -04:00
Pat Fox 89a64ff11c ARTEMIS-1423 adding numeric filtering for ActiveMQServerControl.listQueues()/listAddresses()/listSessions() 2017-09-18 15:15:31 -05:00
Justin Bertram be3a66f016 ARTEMIS-1421 duplicate queue possible in XML 2017-09-13 18:26:28 -04:00
Howard Gao e4fb722ad8 ARTEMIS-1419 OpenWire advisory message never deleted
By default, every openwire connection will create a queue
under the multicast address ActiveMQ.Advisory.TempQueue.
If a openwire client is create temporary queues these queues
will fill up with messages for as long as the associated
openwire connection is alive. It appears these messages
do not get consumed from the queues.

The reason behind is that advisory messages don't require
acknowledgement so the messages stay at the queue.
2017-09-13 18:21:43 -04:00
Michael Andre Pearce 7d943cc6f7 ARTEMIS-1405: Fix PurgeOnNoConsumer queue config is not persisted on restart
Added integration test, to prove issue, and assert fix.
Fix PersistentQueueBindingEncoding to return value, not false.
Fix some method arg name to align with class interface arg name
2017-09-13 18:21:13 -04:00
Clebert Suconic 8156879cf1 ARTEMIS-1418 Fixing compilation 2017-09-13 16:19:39 -04:00
Martyn Taylor 520a40b1a1 ARTEMIS-1418 AIO Shutdown on IOError and logging 2017-09-13 16:09:21 +01:00
Justin Bertram 2ec173bc70 ARTEMIS-1417 Failback not working on NFSv4
With NFSv4 it is now necessary to lock/unlock the byte of the server
lock file where the state information is written so that the
information is then flushed to the other clients looking at the file.
2017-09-13 11:44:38 +01:00
Timothy Bish a07cb45222 ARTEMIS-1400 Fix some minor issues spotted with FindBugs
Remove a bit of dead code, and invert two string tests that were testing
for null after comparing the value to empty string (NPE scenario).
2017-09-11 12:08:02 -04:00
Christopher L. Shannon (cshannon) 983ec7eb88 ARTEMIS-1403 - Fix wildcard matching to always respect delimiters
The regular expressions for wildcard matching now properly respects the last
delimiter in a pattern and will not match a pattern missing the
delimiter by mistake
2017-09-07 10:45:50 -04:00
Francesco Nigro 9cf222be11 ARTEMIS-1393 CriticalAnalyzer timeout uses System::currentTimeMillis
The timeout logic is changed to use System::nanoTime, less sensible to OS clock changes.
The volatile set on CriticalMeasure are changed with cheaper lazySet.
2017-09-07 10:11:35 -04:00
gtully 99b2e4c0fb ARTEMIS-1373 - support memberOf type query for role mapping and respect roleName attribute AMQ-3064 2017-09-07 14:11:48 +01:00
Martyn Taylor 16dfd777b8 ARTEMIS-1387 Fix AMQPtoMQTT and Link route issues 2017-09-06 11:21:56 +01:00
gtully 125bd41f9d ARTEMIS-1372 ARTEMIS-1373 documentation updates 2017-09-06 10:22:28 +01:00
gtully 5db68a451b ARTEMIS-1372 - alow auth to ldap via kerberos 2017-09-05 16:35:14 -04:00
gtully ab7dc69b5d ARTEMIS-1373 - allow LDAP login module apply role mapping to existing user principals in the subject 2017-09-05 16:35:14 -04:00
Howard Gao cd551bfba0 ARTEMIS-1389 Add non-null check to ServerSessionImpl.doClose()
An Openwire connection creates an internal session used to track
transaction status, it doesn't have a session callback. When
the connection is closed, the core session should check if
callback is null to avoid NPE.
2017-09-05 16:16:33 -04:00
Pat Fox 4618b192c2 ARTEMIS-1381 add JMX operation removeAllMessages() to the queue
fix checkstyle trailing spaces
2017-09-01 00:55:07 +02:00
Clebert Suconic 6483e4a0aa ARTEMIS-1378 Improving update Queues and Addresses 2017-08-30 22:45:33 -04:00
Justin Bertram 2f5a9322d0 ARTEMIS-1379 Some queue stats not threadsafe 2017-08-30 10:53:43 -04:00
Clebert Suconic f37093e33c ARTEMIS-1378 Removing System.out left by accident 2017-08-30 10:41:11 -04:00
Clebert Suconic 0df12657af ARTEMIS-1378 Update Address is broken, may lose messages 2017-08-29 20:48:01 -04:00
Clebert Suconic 6fda75a9fc ARTEMIS-1297 Load balance or redistribution of AMQP Messages 2017-08-29 12:56:15 -05:00
Michael Andre Pearce 9fbbb7c416 ARTEMIS-1361 - Support Updating queue config from broker.xml at runtime
Add support to update Queue config via reload using existing updateQueue method at runtime.
Add/extend unit test cases to include testing reload of queue config.
2017-08-25 22:46:50 -04:00
Clebert Suconic f2d74e7a43 ARTEMIS-1367 Moving CriticalAnalyzerPolicy 2017-08-24 18:08:01 -04:00
Michael Andre Pearce 45ea110f62 ARTEMIS 1369: Include queue name in security errors
Add new error in message bundle to include queue
update security check to support taking optional queue
update code that is operating on queues to pass the queue name during check so queue name could be in the error log if security issue.
2017-08-23 11:00:52 -04:00
Clebert Suconic aa2f0b9f17 ARTEMIS-1356 Fixing assertion logic 2017-08-23 09:05:36 -04:00
Erich Duda d6cbc0aa88 ARTEMIS-1368 Artemis gets to state when it doesn't respond to producer
There is a leak on replication tokens in the moment when a backup is
shutdowned or killed and the ReplicationManager is stopped. If there
are some tasks (holding replication tokens) in the executor, these
tokens are simply ignored and replicationDone method isn't called on
them. Because of this, some tasks in OperationContextImpl cannot be
finished.
2017-08-23 12:46:47 +02:00
Francesco Nigro e0881448c1 ARTEMIS-1356 Avoid allocations and atomic operations to recognize handler's thread 2017-08-22 22:12:26 -04:00
Francesco Nigro 249745506e ARTEMIS-1367 Add LOG to the Critical Analyzer policies 2017-08-22 17:37:01 +02:00
Clebert Suconic ce6942a9aa ARTEMIS-1353 Initial replication of large messages out of executor
This is based on the work @jbertram made at the github pr #1466 and the discussions we had there
2017-08-18 16:19:25 -04:00
Andy Taylor 4ee9580e69 ARTEMIS-1350 - Added close button to console for client objs
https://issues.apache.org/jira/browse/ARTEMIS-1350
2017-08-18 13:55:37 +01:00
Christopher L. Shannon (cshannon) 03785a3142 ARTEMIS-1347 - Pass the QueueBinding to beforeCreateConsumer
Instead of just the queue name the entire QueueBinding object is now
passed to the beforeCreateConsumer plugin method. Also cleaned up some
comments
2017-08-17 10:14:11 -05:00
Martyn Taylor bb3965b7f7 ARTEMIS-1349 Add management views for client objects 2017-08-17 10:44:41 +01:00
Clebert Suconic 69e345f291 ARTEMIS-1333 oops 2017-08-10 21:46:27 -04:00
Christopher L. Shannon (cshannon) 64bacee28a ARTEMIS-1332 Always return a response to the client on session metadata add
This will make sure that if there is an ActiveMQException thrown the
client will get notified and not hang.
2017-08-10 12:28:14 -04:00
Clebert Suconic 012fe58b2c ARTEMIS-1333 fixing test, cannot flush itself from Runnable 2017-08-09 16:02:10 -04:00
Michael Andre Pearce 0bc5510059 ARTEMIS-1342: Support Netty Native KQueue on macOS
Add support for KQueue for when server or client runs on macOS. This is inline with the epoll support for linux.
2017-08-09 15:23:16 -04:00
Clebert Suconic fabc0701a3 ARTEMIS-1333 SendACK listener fix 2017-08-09 15:18:54 -04:00
Clebert Suconic 96c6268f5a ARTEMIS-1333 SendACK listener message loss (adding test)
next commit should have the fix.
this is to make it easy to confirm the fix by people looking.
2017-08-09 15:18:54 -04:00
Clebert Suconic 1ace306121 ARTEMIS-1328 Improving direct delivery check
Instead of wait to flush an executor,
I have added a method isFlushed() which will just translate to the
state on the OrderedExecutor.

In the case another executor is provided (for tests) there's a delegate
into normal executors.
2017-08-08 14:00:58 -04:00
gtully 9fedb47c40 [ARTEMIS-1310] [ARTEMIS-1264] consolidate configuration to require login configuration scope 2017-08-08 13:28:50 -04:00
gtully ca7197b5c3 [ARTEMIS-1310] add amqp sasl gssapi mechanism support
delegate to the jdk saslServer. Allow acceptor configuration of supported mechanismis; saslMechanisms=<a,b>
and allow login config scope for krb5 to be configured via saslLoginConfigScope=x
2017-08-08 13:28:50 -04:00
Clebert Suconic f16af75354 ARTEMIS-1324 Deadlock detection and health check of critical components 2017-08-07 18:40:03 -04:00
Clebert Suconic 7bd454739c ARTEMIS-1327 changing exception hangling on plugins 2017-08-07 16:26:37 -04:00
Christopher L. Shannon (cshannon) a3a614ee8b ARTEMIS-1327 - Support checked exceptions in ActiveMQServerPlugin
This will allow plugin writers to use checked exceptions when writing
plugins
2017-08-07 16:24:19 -04:00
Justin Bertram b6b8fa411f ARTEMIS-1322 ServerLocator option to ignore topology for load-balancing 2017-08-04 13:56:30 -05:00
Michael Andre Pearce 776ec0b9fd ARTEMIS-1313 getAddresses in PostOfficeImpl does not correctly return all addresses
Fix so that getAddresses uses addressInfoMap instead of the mappings so that addresses without queues also are returned
2017-08-02 12:50:34 -04:00
Justin Bertram 610737bc30 ARTEMIS-1306 clarify identity for authn failures 2017-07-28 18:00:06 -04:00
Martyn Taylor 69f8263267 ARTEMIS-1303 Fix interleave during replication sync 2017-07-26 10:25:47 +01:00
Justin Bertram 59841b8872 ARTEMIS-1302 make quorum voting more transparent 2017-07-21 19:39:06 -05:00
Clebert Suconic 8f5f2bbe52 ARTEMIS-1300 Deadlock when Core direct deliverying and AMQP receive 2017-07-20 08:59:32 -04:00
Martyn Taylor e742de7d6e ARTEMIS-1290 QueueQuery add prefix on address 2 2017-07-18 16:16:42 -04:00
Martyn Taylor 34df3afe0c Revert "ARTEMIS-1290 QueueQuery add prefix on address"
This reverts commit 44506f2258.
2017-07-18 16:16:42 -04:00