Commit Graph

4718 Commits

Author SHA1 Message Date
Francesco Nigro cdc98c2a66 ARTEMIS-1606 - Change AddressInfo RoutingType Set to use EnumSet
This is fixing the broken testUnsupportedRoutingType test
2018-01-18 23:12:01 +01:00
Clebert Suconic 60a8b49b1d This closes #1742 2018-01-18 13:17:05 -05:00
shoukun 7c6530eb79 ARTEMIS-1570 Test replication consistency
Test consistency between live and backup, espacially on
a slow live.
The test use MessagePersister::encode to simulate slow IO condition.
After live started, we send 5 message with a delay(default 500ms),
then start backup, wait until replicated, then send more message
without delay. If all message sent successfully, the backup should
has the same messages as live. We assert the message number only.
2018-01-18 13:16:35 -05: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 9f77514225 This closes #1787 2018-01-18 10:18:40 -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
Justin Bertram 8428219901 This closes #1788 2018-01-18 08:59:35 -06:00
Christopher L. Shannon (cshannon) 3aef7caac6 ARTEMIS-1617 - Properly set autoCreated flag on address
Flag needs to be set when auto creating an address so that the address
can be removed later if auto delete is configured when creating a
subscription with MQTT
2018-01-18 08:59:35 -06:00
Justin Bertram 0d9a114a96 This closes #1771 2018-01-18 08:59:00 -06: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 Pearce 1d31227cdb This closes #1777 2018-01-18 13:36:10 +01: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
Timothy Bish f1608d724a This closes #1773 2018-01-17 17:05:09 -05:00
jostbg 3334863e81 ARTEMIS-1589 ActiveMQProtonRemotingConnection#getClientID() now returns remote client Id instead of server client Id 2018-01-17 16:54:43 -05:00
Clebert Suconic addfef2196 This closes #1759 2018-01-17 13:23:23 -05:00
gtully ea266cd74b [ARTEMIS-1241] check for FQQN to parse out address and queue for auto creation 2018-01-17 13:23:23 -05:00
Clebert Suconic 9e781be44e This closes #1780 2018-01-17 13:22:08 -05: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
Clebert Suconic 14f149d755 This closes #1778 2018-01-17 12:31:27 -05:00
Jeff Mesnil 86175d677a ARTEMIS-1609 Add distinct name/address for JMS destinations
* add methods to JMSServerManager to be able to create JMS queues and topics
  that have distincts names (as returned by the JMS API) and addresses
  (as used by Artemis Core API).

* add constructors to ActiveMQQueue and ActiveMQTopic to specify JMS name
  distinct from their core address

This allows to emulate Artemis 1.x naming conventions where a JMS queue
would have a name 'foo'and and an address 'jms.queue.foo' (the same
applying for JMS topic as well).
2018-01-17 12:31:27 -05:00
Justin Bertram 1aa7b5c038 ARTEMIS-1609 fix JMS destination s11n compatibility 2018-01-17 12:31:27 -05:00
Clebert Suconic 60055d7a08 This closes #1782 2018-01-17 11:19:07 -05:00
Martyn Taylor f09bde07df ARTEMIS-1612 Fix message redistribution for prefixed addresses 2018-01-17 11:19:07 -05:00
Michael Pearce 9171d86abf This closes #1784 2018-01-17 15:28:57 +01:00
Francesco Nigro 57e93ff9d0 ARTEMIS-1615 Duplicate TypedProperties::checkCreateProperties 2018-01-17 15:21:10 +01:00
Michael Pearce 785deb79f8 This closes #1753 ARTEMIS-1573 Improve UTF translation allowing zero copy 2018-01-17 09:36:42 +01:00
Francesco Nigro 52f7a698d9 ARTEMIS-1573 Improve UTF translation allowing zero copy
The UTF translations has been improved by:
- zero copy on array based buffers
- zero copy UTF length calculation
- faster array access using Netty PlatformDependent.get|putByte
- improved perf tests UTF8Test
2018-01-17 09:36:42 +01:00
Michael Pearce 9fb8c3c470 This closes #1757 ARTEMIS-1586 Reduce GC pressure due to String allocations on Core protocol 2018-01-17 09:33:42 +01: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
Clebert Suconic 00bd989f9f This closes #1774 2018-01-16 10:04:39 -05:00
Justin Bertram 6b033b5b8d ARTEMIS-1602 avoid potential NPE if property is null 2018-01-16 10:04:37 -05:00
Michael Pearce 77805f9db2 This closes #1776 2018-01-13 19:58:43 +00:00
Michael André Pearce b4ed5c3237 ARTEMIS-1596 - Fix checkstyle. 2018-01-13 19:52:43 +00:00
Justin Bertram adc0f02ae0 This closes #1766 2018-01-12 15:12:45 -06:00
jostbg dffc66496e ARTEMIS-1596 wrong routing-type for STOMP autocreated address/queue 2018-01-12 15:12:03 -06:00
Francesco Nigro 88e9b55d12 This closes #1756 2018-01-12 15:17:18 +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
Clebert Suconic fdb57b6877 This closes #1770 2018-01-11 21:33:17 -05:00
Clebert Suconic da164a2074 ARTEMIS-1599 fixing compatibility with 1.x exported file 2018-01-11 21:33:17 -05:00
Justin Bertram 3e41aa151d This closes #1767 2018-01-11 11:46:09 -06:00
gtully 49b7863cf9 [ARTEMIS-1597] validate non null callback principal for login success 2018-01-11 11:46:09 -06:00
Justin Bertram 7377ef7f6d This closes #1772 2018-01-11 11:43:19 -06:00
jostbg b8f591b6b9 ARTEMIS-1601 deal with race in Stomp sendMessage
If the Stomp consumer was closed at or near the same time a message was
dispatched then an NPE might result. Throwing an exception is a
relatively expensive operation in the JVM because of the stacktrace
information that needs to be generated, so in cases where it is known
that a null value could be returned one should check and handle it
appropriately.
2018-01-11 11:42:56 -06:00
Justin Bertram 499273bd68 This closes #1768 2018-01-11 09:43:56 -06:00
Ulf Lilleengen af1159a24b ARTEMIS-1598 modify SslHandler name in connector
Use the same "name" when inserting the Netty SslHandler into the
pipeline for both acceptors and connectors.
2018-01-11 09:41:23 -06:00
Justin Bertram 629dd2c358 This closes #1769 2018-01-11 09:38:44 -06:00
Timothy Bish efec2d3464 ARTEMIS-1576 Fix test that was broken with changes on this issue
The test is using the wrong indices for the destinations it uses so they
don't match the one's created in the test support class.  Because the
code is now using the default routing type the test fails when it tries
to send a message on a JMS Queue when the auto created address default
to the multicast routing type.
2018-01-11 09:38:44 -06:00
Martyn Taylor c959d0c67d This closes #1754 2018-01-11 10:59:11 +00:00