Commit Graph

1021 Commits

Author SHA1 Message Date
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
Clebert Suconic 920af19adb [maven-release-plugin] prepare for next development iteration 2018-03-12 12:46:27 -04:00
Clebert Suconic 5f5b1dcf8f [maven-release-plugin] prepare release 2.5.0 2018-03-12 12:46:16 -04:00
Martyn Taylor 41a3fedb82 ARTEMIS-1682 Added back test-jar artemis-server test-jar 2018-03-09 16:30:25 +00: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
Martyn Taylor fde86c0c3a ARTEMIS-1682 Set packaging jar for artemis-server 2018-03-08 20:17:56 +00: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