Commit Graph

844 Commits

Author SHA1 Message Date
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
Clebert Suconic c8982d775b [maven-release-plugin] prepare for next development iteration 2017-09-05 17:03:48 -04:00
Clebert Suconic 84d5ac65b4 [maven-release-plugin] prepare release 2.3.0 2017-09-05 17:03:37 -04: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 ed1b268d42 [maven-release-plugin] prepare for next development iteration 2017-08-31 13:48:09 -04:00
Clebert Suconic 21f2a4a52c [maven-release-plugin] prepare release 2.3.0 2017-08-31 13:47:57 -04: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
Clebert Suconic fdad83be22 [maven-release-plugin] prepare for next development iteration 2017-07-24 21:21:18 -04:00
Clebert Suconic 71b1cc2a20 [maven-release-plugin] prepare release 2.2.0 2017-07-24 21:21:06 -04: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
Clebert Suconic 41a03de02f ARTEMIS-1287/ARTEMIS-1292 Fixing intermittent failure on reconnects 2017-07-18 10:24:39 -04:00
Andy Taylor 6f140897c6 ARTEMIS-1296 - fix quorum vote
Add a check on top of just being able to connect to a live broker

https://issues.apache.org/jira/browse/ARTEMIS-1296
2017-07-18 08:10:11 +01:00
Martyn Taylor 44506f2258 ARTEMIS-1290 QueueQuery add prefix on address 2017-07-17 10:31:20 -04:00
Michael Andre Pearce 2cbee11230 ARTEMIS-1289 Fix: Unable to configure queues containing "/" in broker.xml 2017-07-17 10:41:02 +01:00
Clebert Suconic f18b4ee0c9 ARTEMIS-1287/ARTEMIS-1292 Complete Page on the Journal
fixing PagingTest.testDeletePhysicalPages
2017-07-14 15:04:45 -04:00
Clebert Suconic 3820ab8bb5 ARTEMIS-1284 Deleting a queue is not cleaning up page
This is fixing JMSPagingFileDeleteTest.testTopicsWithNonDurableSubscription
Issue introduced at 84e8a87325
2017-07-12 20:52:22 -04:00
Timothy Bish 22b8076b71 ARTEMIS-1283 Fix delay on drained response
On completion of drain the response is not flushed and the
client can wait a few seconds before another broker task
flushes the work.  Flush the connection after updating the
linked as being drained.  Also perform the work with the
connection lock held to prevent conccurent update of proton
state.
2017-07-12 19:20:01 -04:00
Clebert Suconic 3e48cd7787 ARTEMIS-1248 Fixing regression on Page.writing to live page
This is fixing ReplicatedPagedFailoverTest.testCommitOccurredUnblockedAndResendNoDuplicates
Even though the issue is not on replication.
2017-07-12 10:12:41 -04:00
Clebert Suconic 24d0a6c8fe ARTEMIS-1280 removing non used future 2017-07-11 15:10:53 -04:00
Francesco Nigro 4b943a745b ARTEMIS-1269 Improving Session Handling after replication changes
changes on ARTEMIS-1269 would have some implications on performance
this is to improve the packet handling.
2017-07-11 14:23:03 -04:00
Clebert Suconic 7fd17f407f ARTEMIS-1269 Simple Actor to replace certain executions
This is replacing an executor on ServerSessionPacketHandler
by a this actor.

This is to avoid creating a new runnable per packet received.

Instead of creating new Runnable, this will use a single static runnable
and the packet will be send by a message, which will be treated by a listener.

Look at ServerSessionPacketHandler on this commit for more information on how it works.
2017-07-11 14:22:36 -04:00
Clebert Suconic 82f071ff46 ARTEMIS-1280 Avoiding leak on Queue futures 2017-07-11 11:32:03 -04:00
Andy Taylor 9ad3ad4657 ARTEMIS-1277 - purgeOnNoConsumer is not working properly
make sure rollback doesn't add messages back

https://issues.apache.org/jira/browse/ARTEMIS-1277
2017-07-11 11:25:48 +01:00
Jiri Danek ad228e202f NO-JIRA: Addressing some deprecated usage on the codebase
- PROTOCOL_PROP_NAME
- ConnectionLifeCycleListener
- GENERIC_IGNORED_FILTER
- HttpHeaders.Names
- HttpHeaders.Names and similar
2017-07-10 14:06:07 -04:00
Martyn Taylor ce756d46f9 ARTEMIS-1271 FileSystemMonitor locking improvement 2017-07-07 13:58:53 -04:00
gtully d4150be0d9 ARTEMIS-1264 allow role mapping via chained login modules
Add krb5sslloginmodule that will populate userPrincipal that can be mapped to roles independently
Generalised callback handlers to take a connection and pull certs or peerprincipal based on
callback. This bubbled up into api change in securitystore and security manager
2017-07-06 23:41:02 -04:00
Clebert Suconic 89e84e1320 ARTEMIS-1269 Fixing blocked replication
If replication blocked anything on the journal
the processing from clients would be blocked
and nothing would work.

As part of this fix I am using an executor on ServerSessionPacketHandler
which will also scale better as the reader from Netty would be feed immediately.
2017-07-06 19:04:48 -04:00
gtully cda1e018e1 ARTEMIS-1264 Foundation work for authentication with Kerberos using KRB_ cypher suites.
Core client with netty connector and acceptor doing kerberos
jaas.doAs around sslengine init such that the SSL handshake can do kerberos ticket
generaton and validation.
The kerberos authenticated user is then validated with the security manager before
being populated into the message userId.
The feature is enabled with the kerb5Config property. When lowercase it is the
principal. With a leading uppercase char it is the login.config entry to use.
2017-07-06 11:30:25 -04:00
Clebert Suconic 387fca584e ARTEMIS-1269 replication won't finish synchronization 2017-07-01 00:48:33 -04:00
Francesco Nigro 7075e2e457 ARTEMIS-1266 Mapped Journal refactoring
The MAPPED journal refactoring include:
 - simplified lifecycle and logic (eg fixed file size with single mmap memory region)
 - supports for the TimedBuffer to coalesce msyncs (via Decorator pattern)
 - TLAB pooling of direct ByteBuffer like the NIO journal
 - remove of old benchmarks and benchmark dependencies
2017-06-30 16:17:19 +02:00
Howard Gao 06986e4ee1 ARTEMIS-1261 Adjust default confirmation-window-size for bridges
The default id-cache-size is 20000 and the default
confirmation-window-size is 1MB. It turns out the 1MB
size is too small for id-cache-size.

To fix it we adjust the confirmation-window-size to 10MB. Also
a test is added to guarantee it won't break this rule when this
default value is to be changed to any new value.
2017-06-29 12:56:16 -04:00
Howard Gao d50f577cd5 ARTEMIS-1221 Duplicated ID causes LargeMessage lost at backup
When a large message is replicated to backup, a pendingID is generated
when the large message is finished. This pendingID is generated by a
BatchingIDGenerator at backup.

It is possible that a pendingID generated at backup may be a duplicate
to an ID generated at live server.

This can cause a problem when a large message with a messageID that is
the same as another largemessage's pendingID is replicated and stored
in the backup's journal, and then a deleteRecord for the pendingID
is appended. If backup becomes live and loads the journal, it will
drop the large message add record because there is a deleteRecord of
the same ID (even though it is a pendingID of another message).
As a result the expecting client will never get this large message.

So in summary, the root cause is that the pendingIDs for large
messages are generated at backup while backup is not alive.

The solution to this is that instead of the backup generating
the pendingID, we make them all be generated in advance
at live server and let them replicated to backup whereever needed.
The ID generater at backup only works when backup becomes live
(when it is properly initialized from journal).
2017-06-29 00:03:47 +08:00
Francesco Nigro a8356fb057 ARTEMIS-1246 Fixing compatibility issue
It fixes compatibility issues with JMS Core clients using the old address model, allowing the client to query JMS temporary queues too.

you would eventually see this issue when using older clients:
AMQ119019: Queue already exists
2017-06-27 14:23:36 -04:00
Christopher L. Shannon (cshannon) a538b969c0 ARTEMIS-1258 - Add ServerSession as an argument to beforeSend and
afterSend
2017-06-27 12:42:40 -04:00
Clebert Suconic f407d86f0f ARTEMIS-1253 Fixing NetworkHealthCheck being shutdown after failures 2017-06-26 16:15:39 -04:00
Clebert Suconic 36110da9c8 ARTEMIS-1253 Refactoring renaming stop(boolean) to fail(boolean)
This method name would clash with ServiceComponent
As the real meaning here on this method is just to failover
So I've renamed the method to avoid the clash with my next commit

(I've done this on a separate commit as you may need to redo this
 commit from scratch again in other branches instead of lots of clashes on cherry-pick)
2017-06-26 16:15:39 -04:00
Howard Gao 045021f7df ARTEMIS-1220 Diverted LargeMessage file corrupted during replication
When a large message is being diverted, a new copy of the original
message is created and replicated (if there is a backup) to the backup.

In LargeServerMessageImpl.copy(long) it reuse a byte array to copy
message body. It is possible that one block of date is read into
the byte array before the previous read has been replicated,
causing the replicated bytes to corrupt.

If we make a copy of the byte array before replication, the corruption
of data will be avoided.
2017-06-26 14:31:43 -04:00
Martyn Taylor 222275dd8d ARTEMIS-1254 New OrderedExecutor for JDBC LargeMsg 2017-06-26 18:43:50 +01:00
Francesco Nigro 325f46e01f ARTEMIS-1248 Reduce garbage while Paging 2017-06-23 09:37:46 -04:00
Michael Andre Pearce f63f130407 ARTEMIS-1235 delete queues when broker.xml changes
Add extra configuration to address-settings to be able to
control / enable address/queue deletion by pattern,
rather than a global toggle.

Add support in the reload logic to remove address
and/or queues if the address matches an address setting,
where it is enabled.
2017-06-22 12:12:12 -04:00
Andy Taylor fbe27682a1 ARTEMIS-1237 - Hard coded timeout on Journal file open
Make timeout configurable

https://issues.apache.org/jira/browse/ARTEMIS-1237
2017-06-22 10:48:09 -04:00
Clebert Suconic 37d1d5ff7b ARTEMIS-1247 Allow tracing on ReplicatedJournal
This closes #1360
2017-06-22 10:22:36 -04:00
Clebert Suconic 85aeac99ab Revert "ARTEMIS-1227 Internal properties not removed from messages"
This reverts commit f465996444.

Following discussion on https://github.com/hornetq/hornetq/pull/2114
2017-06-22 09:49:45 -04:00
Francesco Nigro cf68aab714 ARTEMIS-1214 Improve performance of read on Paging 2017-06-21 16:06:57 -04:00
Jiri Danek 3d4e907a1b NO-JIRA fix typos 2017-06-21 11:16:29 -04:00
Michael Andre Pearce 44b7e455cb ARTEMIS-1205: AMQP Shared Durable Subscriber incorrect behaviour
Use AcitveMQDestination for subscription naming, fixing and aligning queue naming in the process.

The change is behind a configuration toggle so to avoid causing any breaking changes for uses not expecting.
2017-06-19 12:44:13 +01:00
Martyn Taylor a66b816a18 ARTEMIS-1233 Fix log level in logger message 2017-06-19 10:19:03 +01:00
Martyn Taylor f20703a13e ARTEMIS-1215 Fix address validation on sub # 2017-06-14 11:39:39 -05:00
Andy Taylor 30a6ac703e ARTEMIS-1224 - change the journal file size to nearest multiple
https://issues.apache.org/jira/browse/ARTEMIS-1224
2017-06-14 10:16:23 +01:00
Howard Gao f465996444 ARTEMIS-1227 Internal properties not removed from messages
In a cluster if a node is shut down (or crashed) when a
message is being routed to a remote binding, a internal
property may be added to the message and persisted. The
name of the property is like _AMQ_ROUTE_TOsf.my-cluster*.
if the node starts back, it will load and reroute this message
and if it goes to a local consumer, this property won't
get removed and goes to the client.

The fix is to remove this internal property before it
is sent to any client.
2017-06-12 13:01:12 -05:00
Tomas Hofman 9b5440e5a4 ARTEMIS-1186 Consumer.receive hangs if http acceptor with non-zero batch-delay is configured 2017-05-30 19:05:43 -04:00
Michael Andre Pearce c65ea783ea ARTEMIS-1189 - Fix checkstyle violations post checkstyle upgrade
After upgrade of checkstyle, resolve violations

remove checkstyle override added as temp measure at point of upgrade forced by sevntu
2017-05-30 13:40:00 -04:00
Michael Andre Pearce b8ebe05775 ARTEMIS-1188: Update sevntu to 1.24.0 available in maven central
remove custom repo
update groupid to match artifact in maven central.
bump version also to that now deployed to maven central.
bump checkstyle version to 7.7 to make compatible.

updated checkstyle.xml to ignore existing issues which are prolific 
which are now flagged in latest version as some bugs in previous meant they we'ren't detected e.g. https://github.com/checkstyle/checkstyle/issues/3320

fixing some violations which are not too prolific.
2017-05-30 09:54:17 -04:00
Ville Skyttä fe505b37b4 Spelling fixes 2017-05-30 10:32:41 +03:00
Justin Bertram b1ad8f3adf ARTEMIS-1178 backwards compatibility issues
This commit has 2 changes for backwards compatibility with older
clients:

1) A "bindings query" will now detect if the client is both JMS and
"old" (i.e. pre-2.0) and will prefix the returned queue names with the
old prefix (i.e. "jms.queue."). This will allow the old client to
properly detect whether or not a queue exists in its auto-creation
logic.

2) When messages are dispatched to a consumer there is logic to detect
if the consumer is both JMS and "old" and will prefix the "address"
on the message with "jms.queue." or "jms.topic." as appropriate
(if it's not already prefixed).
2017-05-25 10:53:42 -04:00
Justin Bertram 5a9830af17 Revert "[ARTEMIS-1171] Improve log readability around clustering"
This reverts commit 744221dcb5.

Broke o.a.a.a.t.i.m.QueueControlUsingCoreTest.testListDeliveringMessages
2017-05-25 10:53:42 -04:00
Dmitrii Tikhomirov 2443eaaa00 ARTEMIS-1180: Artemis is logging warnings during server shut down 2017-05-24 18:41:13 -04:00
Guillaume Nodet 7e47dc3e07 [ARTEMIS-1176] Turn management reply messages into text messages 2017-05-23 09:39:09 -04:00
Christopher L. Shannon (cshannon) 48a2dd1f45 ARTEMIS-1172 - Update beforeDeliver and afterDeliver method arguments
Adding ServerConsumer as an argument to both the beforeDeliver and
afterDeliver methods inside ActiveMQServerPlugin and deprecated the old
methods
2017-05-17 20:38:47 -04:00
Ingo Weiss 744221dcb5 [ARTEMIS-1171] Improve log readability around clustering
Issue: https://issues.apache.org/jira/browse/ARTEMIS-1171
2017-05-17 14:11:08 -04:00
Clebert Suconic dc26ac96b4 ARTEMIS-1156: moving our collections on its own package 2017-05-12 10:06:05 -04:00
Michael André Pearce c1d55aa84f ARTEMIS-1156: FIX: Long Autoboxing occurring on Hot Path
Building on ARTEMIS-905 JCtools ConcurrentMap replacement  first proposed but currently parked by @franz1981, replace the collections with primitive key concurrent collections to avoid auto boxing.

The goal of this is to reduce/remove autoboxing on the hot path.
We are just adding jctools to the broker (should not be in client dependencies)
Like wise targeting specific use case with specific implementation rather than a blanket replace all.

Using collections from Bookkeeper, reduces outside tlab allocation, on resizing compared to JCTools, which occurs frequently on testing.
2017-05-12 10:05:51 -04:00
Justin Bertram 88e185d2b9 ARTEMIS-1154 tweak logic to support previous semantics 2017-05-11 09:54:28 -05:00
Justin Bertram 5cb5c8a6dc ARTEMIS-1154 isolated backup fails over
Even if there is no address/url configured for the NetworkHealthCheck
an isolated backup will still fail-over potentially causing split-brain.
2017-05-09 14:43:17 -05:00
Clebert Suconic ce61d20f5a [maven-release-plugin] prepare for next development iteration 2017-05-08 15:20:12 -04:00
Clebert Suconic 64e8f015ee [maven-release-plugin] prepare release 2.1.0 2017-05-08 15:20:01 -04:00
Christopher L. Shannon (cshannon) 9fdba8292f ARTEMIS-898 - Adding support for XML configuration of Broker Plugins
Broker plugins can now be added to the broker through XML config.
2017-05-08 11:59:41 -04:00
Clebert Suconic 36c9659279 [maven-release-plugin] prepare for next development iteration 2017-05-05 22:11:09 -04:00
Clebert Suconic 7b5082639f [maven-release-plugin] prepare release 2.1.0 2017-05-05 22:10:58 -04:00
Arthur Baars 7648b6fd9d Remove dangling git-link
The empty folder artemis-server/artemis-load-generator seems to be a
git submodule link. However, there is no submodule configuratation
file (ie .gitmodules) in this repository.

This caused the 'git submodule' command to fail with the following
error message:
fatal: no submodule mapping found in .gitmodules for path 'artemis-server/artemis-load-generator'
2017-05-04 10:21:15 -05:00
Bernd Gutjahr 6017e305d9 ARTEMIS-1112: Added wait-for-activation option to shared-store-master config
Added a wait-for-activation option to shared-store master HA policies.
This option is enabled by default to ensure unchanged server startup behavior.

If this option is enabled, ActiveMQServer.start() with a shared-store master server will not return
before the server has been activated.
If this options is disabled, start() will return after a background activation thread has been started.
The caller can use waitForActivation() to wait until server is activated, or just check the current activation status.
2017-05-03 16:40:15 -04:00
Clebert Suconic 33f2ad65c9 ARTEMIS-1140 Avoid lock on queue for message counts 2017-05-03 13:49:44 -05:00
Christopher L. Shannon (cshannon) 1e1ede84c0 ARTEMIS-898 - Adding Plugin Support
Adding a new ActievMQServerPlugin interface to support adding custom
behavior to the broker at certain events such as connection or session
creation.

https://issues.apache.org/jira/browse/ARTEMIS-898
2017-05-03 11:21:32 -04:00
Aditya Sharad 52a5b85557 ARTEMIS-1135: Prevent overflow in `DayCounter`
Use `long` array for hourly counters instead of `int` array.
Prevents overflow when the number of new messages (a `long`) is added.
Fixes one of the "Implicit narrowing conversion in compound assignment"
alerts on https://lgtm.com/projects/g/apache/activemq-artemis/alerts.
2017-05-02 13:00:46 -04:00
Aditya Sharad b998a8bdaf ARTEMIS-1135: Fix potential message count overflow
Have `AddressControlImpl::getMessageCount` use and return a `long`.
Prevents potential overflow from use of an `int` count variable.
Fixes one of the "Implicit narrowing conversion in compound assignment"
alerts at https://lgtm.com/projects/g/apache/activemq-artemis/alerts.
2017-05-02 13:00:46 -04:00
Justin Bertram 578c0fabb2 ARTEMIS-1137 handle empty routing type on restart 2017-05-02 10:06:42 -05:00
Clebert Suconic 6df8c3a28d Revert " ARTEMIS-1112: don't block live activation if another live server is running"
This reverts commit 2f175b8d4e.
2017-05-01 09:50:45 -04:00
Justin Bertram 3bd4bdb079 ARTEMIS-1130 log disallowed SSL protocols once 2017-04-28 10:15:42 +01:00
Bernd Gutjahr 2f175b8d4e ARTEMIS-1112: don't block live activation if another live server is running
Instead of going directly into backup mode within the shared-store
live activation, we just change the HA-policy to slave and return
to the caller - ActiveMQServerImpl.internalStart().
The caller will then handle the backup activation as usual
in a separate thread, such that EmbeddedJMS.start() can return.

Also added a related integration test.
2017-04-26 15:23:24 -05:00
Martyn Taylor 1c84bd39c4 ARTEMIS-826 Fix MQTT protocol detection 2017-04-25 13:53:21 +01:00
Howard Gao 694a5092b6 ARTEMIS-1128 QueueControlImpl.sendMessage() fixes
sendMessage() may throw ActiveMQException that causes CNFE
at the management client. Also it should check if headers
in the message is null (to prevent NPE).
2017-04-24 13:52:51 -05:00
Stephen Higgs 24e3799347 ARTEMIS-1116 map ldap roles to local roles
adds general mapping between multiple amq internal roles
and a external roles (e.g. LDAP), configured in broker.xml
2017-04-24 10:25:08 -05:00
Howard Gao b441bf0e62 ARTEMIS-1122 ActiveMQJAASSecurityManager class loading issue
The ActiveMQJAASSecurityManager class uses LoginContext to validate
users and roles. LoginContext loads LoginModule classes defined in
the configuration (login.config) using current thread's context
classloader.
Normally this wouldn't be a problem but when a caller thread comes
from JMX (for example a client calls QueueControl.sendMessage() via
JMX) the caller thread has a different context class loader.
This will cause the LoginContext to fail to load the LoginModule
class (e.g. PropertiesLoginModule) and the validation will fail
even if correct credentials are supplied.
2017-04-24 10:07:20 -05:00
Howard Gao f344c1ebaf ARTEMIS-1093 Full qualified queue name support
Broker should support full qualified queue names (FQQN)
as well as bare queue names. This means when clients access
to a queue they have two equivalent ways to do so. One way
is by queue names and the other is by FQQN (i.e. address::qname)
names. Currently only receiving is supported.
2017-04-23 16:01:20 -04:00
Francesco Nigro 258d595972 ARTEMIS-1124 JDBC Network Timeout configuration 2017-04-20 19:43:10 +01:00
Clebert Suconic bfe2bdd7b2 ARTEMIS-1115 Traces and tests on JDBC Persistence 2017-04-19 00:50:58 -04:00
Martyn Taylor 7b68b0a49a ARTEMIS-1115 Call CriticalIOListener on JDBC Error 2017-04-19 00:50:58 -04:00
Clebert Suconic 1a39772489 ARTEMIS-1121 Improving expiry scanner
https://issues.apache.org/jira/browse/ARTEMIS-1121
2017-04-18 11:49:25 -04:00
Francesco Nigro aa9ac4a914 ARTEMIS-1084 Throw RunTime on bad Oracle table size 2017-04-13 19:17:10 -04:00
Clebert Suconic f609884186 Revert "ARTEMIS-1093 Full qualified queue name support"
Testsuite won't complete with this commit.
Reerting it for further evaluation.

This reverts commit a9a3c47808.
2017-04-12 16:53:40 -04:00
Bernd Gutjahr 557f02ba4d ARTEMIS-1108: Removed AIOFileLockManager
AIOFileLockManager doesn't work on NFS-mounted share store directories.
Since the GFS2 bug https://bugzilla.redhat.com/show_bug.cgi?id=678585
has been fixed end of 2011, the class AIOFileLockManager is no longer needed and I have removed it.
2017-04-12 10:45:26 -04:00
Howard Gao a9a3c47808 ARTEMIS-1093 Full qualified queue name support
Broker should support full qualified queue names (FQQN)
as well as bare queue names. This means when clients access
to a queue they have two equivalent ways to do so. One way
is by queue names and the other is by FQQN (i.e. address::qname)
names. Currently only receiving is supported.
2017-04-12 09:59:28 +01:00
Clebert Suconic cc22a0286b ARTEMIS-1101 Fixing JMSFilter on AMQP 2017-04-11 16:07:33 -04:00
Clebert Suconic 4e59c174ff ARTEMIS-1096 Fixing configuration issues on calculated global-max-page 2017-04-11 14:06:44 -04:00
Andy Taylor fb3de112e4 ARTEMIS-1107 - fix and Test AddressControl.sendMessage()
https://issues.apache.org/jira/browse/ARTEMIS-1107
2017-04-11 08:29:43 +01:00
Justin Bertram 67a06588f4 ARTEMIS-1107 test AddressControl.sendMessage
Add tests for this management operation with both core and AMQP encoded
messages. Also fix a few problems with the implementation like not
checking the passed-in headers for null and not counting messages
properly.
2017-04-11 07:57:57 +01:00
Clebert Suconic 4a73d82964 ARTEMIS-1105 Adding setPaged that was missed during the refactoring 2017-04-10 12:25:28 -04:00
Andy Taylor 185b0cb2a8 ARTEMIS-1105 null pointer when replicating paged messages
https://issues.apache.org/jira/browse/ARTEMIS-1105
2017-04-10 12:25:25 -04:00