Commit Graph

887 Commits

Author SHA1 Message Date
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
Justin Bertram 55d7260a07 ARTEMIS-1510 refactor Maven poms
Clean up unused declared dependencies and undeclared dependencies which
are pulled in transitively.
2017-11-13 17:03:35 -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
Justin Bertram 8703d9d51d [maven-release-plugin] prepare for next development iteration 2017-11-01 00:38:57 -05:00
Justin Bertram ec63189a0a [maven-release-plugin] prepare release 2.4.0 2017-11-01 00:38:56 -05:00
Justin Bertram a44b9d5edf [maven-release-plugin] prepare for next development iteration 2017-10-31 12:09:43 -05:00
Justin Bertram 34a7431d1b [maven-release-plugin] prepare release 2.4.0 2017-10-31 12:07:55 -05: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