Commit Graph

1496 Commits

Author SHA1 Message Date
Francesco Nigro 79465f7f88 ARTEMIS-2317 Reuse file buffer wrapper instances to reduce allocations
Page::read is allocating a new ChannelBufferWrapper on each
paged message read: to reduce the allocation rate, it could be
reused until a new wrapped ByteBuffer is created
2019-05-13 09:47:25 -04:00
Clebert Suconic fc760265a2 ARTEMIS-2335 Fixing delivery logic for message group on negative attemps
OpenWireGroupingTest::testGrouping is fixed after this change as it was intermittently failing
2019-05-10 11:49:34 -04:00
Clebert Suconic 408cd3745c ARTEMIS-2333 Applying proper fix on Stomp delivery
When connection is dead, the StompSession may deliver a message and if AUTO-ACK it would ack and lose the message
2019-05-08 18:16:23 -04:00
Justin Bertram 8257bac49b ARTEMIS-2332 fix sendMessage w/headers from console 2019-05-08 07:21:22 -04:00
Clebert Suconic 0e40984145 NO-JIRA speeding up a few tests 2019-05-06 20:22:47 -04:00
Clebert Suconic 5d155f585e NO-JIRA removing System.out left by accident 2019-05-06 08:56:45 -04:00
Clebert Suconic b5b2cc98b0 NO-JIRA Fixing JMX Test
This test has been failing as part of the main testsuite
and it should really be a smoke test as it is using a real test.
so, I'm moving it as smoke-test
2019-05-03 18:05:26 -04:00
Clebert Suconic 56152a9e7c [maven-release-plugin] prepare for next development iteration 2019-05-02 16:39:10 -04:00
Clebert Suconic a8e7f9d07a [maven-release-plugin] prepare release 2.8.0 2019-05-02 16:38:58 -04:00
Clebert Suconic 9ec9e0785b ARTEMIS-2329 AddressSettings inconsistence on decoding
This is fixing these tests:
- org.apache.activemq.artemis.tests.integration.paging.PagingOrderTest#testPagingOverCreatedDestinationQueues
- org.apache.activemq.artemis.tests.integration.paging.PagingOrderTest#testPagingOverCreatedDestinationTopics

No additional tests are needed as this change is covereted by the current testsuite
2019-05-02 11:48:14 -04:00
Clebert Suconic fa259ba66e ARTEMIS-2328 Routing after empty addresses could lead to invalid messages 2019-05-01 01:34:28 -04:00
Justin Bertram f584efd574 ARTEMIS-2326 remove pwd params before creating protocol mgr 2019-04-29 20:53:15 -04:00
Clebert Suconic f664713757 NO-JIRA typo on logger 2019-04-29 20:50:32 -04:00
Jiri Danek 4abc2e0430 ARTEMIS-2320 Synchronization on a non-final field 2019-04-29 11:28:10 +01:00
Jiri Danek 781e4c460d ARTEMIS-2320 'while' statement does not loop 2019-04-29 11:28:10 +01:00
Jiri Danek 34e5d607ef ARTEMIS-2320 'compare()' method can be used to compare numbers 2019-04-29 11:27:29 +01:00
Jiri Danek d076d1ca59 ARTEMIS-2320 Fix BadComparable errorprone warning
Possible sign flip from narrowing conversion
    (see https://errorprone.info/bugpattern/BadComparable)
2019-04-29 11:27:29 +01:00
Jiri Danek f7a36300ef ARTEMIS-2320 Fix IntLongMath errorprone warning
Expression of type int may overflow before being assigned to a long
    (see https://errorprone.info/bugpattern/IntLongMath)
2019-04-29 11:27:29 +01:00
Clebert Suconic 00a6b933bb ARTEMIS-2324 Fixing possible race on DuplciateDetection
This is fixing AmqpSenderTest.testDuplicateDetection
2019-04-26 19:03:34 -04:00
Clebert Suconic 228f6af4ca [maven-release-plugin] prepare for next development iteration 2019-04-25 16:52:09 -04:00
Clebert Suconic 09d2ba18a7 [maven-release-plugin] prepare release 2.8.0 2019-04-25 16:51:57 -04:00
Francesco Nigro 881143252c ARTEMIS-2317 Avoid long TTSP caused by Page::read using mmap read
It implements Page::read using chunked reading of SequentialFile
instead of using memory mapped files causing long time to safepoint
issues.
2019-04-25 15:43:01 -04:00
Clebert Suconic 9ac7702c93 ARTEMIS-2318 Removing debug message left by accident 2019-04-25 11:18:35 -04:00
Clebert Suconic 0a229d0786 ARTEMIS-2310 Checkstyle fix 2019-04-25 11:14:52 -04:00
Justin Bertram 73bdbad8b4 ARTEMIS-2310 support system prop sub in xincludes
Historically the broker has read the XML configuration file as a String,
substituted system properties, and then parsed that String into an XML
document. However, this method won't substitute system properties in the
files which are imported via xinclude. In order to substitue system
properties in xincluded files the substitution needs to be performed
after the file is parsed into an XML document. This commit implements
that change and refactors the XMLUtil class a bit to eliminate redundant
code, obsolete comments, etc.
2019-04-25 10:51:12 -04:00
Clebert Suconic 15a335df01 ARTEMIS-2318 HornetQ Protocol Manager should copy the messages before replacing message properties 2019-04-24 16:27:32 -04:00
Clebert Suconic 45121eade2 ARTEMIS-2306 Fixing Test and possible NPE 2019-04-22 21:44:14 -04:00
Justin Bertram 7cc890ae6f ARTEMIS-2307 prefix not removed for security check 2019-04-22 16:58:11 -04:00
Clebert Suconic 33d6721ffc ARTEMIS-2314 Improving Test and compatibility check on FQQN 2019-04-22 16:34:15 -04:00
Justin Bertram a2cb44400f ARTEMIS-2314 broken compat with old core JMS FQQN consumer
When auto-creation is off then older clients consuming messages from an
FQQN won't work. This commit fixes that problem and adds a compatibility
test to verify.
2019-04-22 11:04:01 -05:00
Justin Bertram f155838626 ARTEMIS-2313 Accumulation in HierarchicalObjectRepository cache 2019-04-22 10:48:47 -04:00
Michael André Pearce 18bcd21c3e ARTEMIS-2306 Make group first off by default, unless configured 2019-04-17 16:25:42 -04:00
Justin Bertram e0a7073884 ARTEMIS-2309 TempQueueCleanerUpper instances are leaking
The changes from ARTEMIS-2189 mean that
o.a.a.a.c.s.i.ServerSessionImpl#deleteQueue
is no longer called from the same ServerSessionImpl instance that
created it which means that TempQueueCleanerUpper instances will leak.
To resolve the leak the client will only create a new session when
necessary instead of every time delete() is invoked.
2019-04-17 10:41:30 -04:00
Clebert Suconic 7158d8a8a4 ARTEMIS-1592 AutoDeleted queues removed before sendNotifcation on consumer.close()
This could cause errors on Notification udpates and clustering.
2019-04-16 16:59:37 -04:00
Michael André Pearce 98b3177e6e ARTEMIS-2306 Make key used for group first for consumer configurable
Add tests
Add implementation details
2019-04-16 15:43:16 -04:00
Michael André Pearce 05628ce92e ARTEMIS-2306 Support ActiveMQ5 feature JMSXGroupFirstForConsumer
Implement using the ActiveMQ5 JMSXGroupFirstForConsumer, property as default, but make it possible for future to make it configurable easily. (Not this PR)
Add test
2019-04-16 15:43:16 -04:00
Michael André Pearce ed9270fc79 NO-JIRA Fix small ActiveMQServerControl api break with 2.6.4
In adding auto-delete queue level feature, its been noticed as some feature bits were added during hot fix branch, that there's api break with the 2.6.x hotfix branch.

This addresses that by fixing this in 2.7.x
2019-04-16 14:30:33 +01:00
sebthom 11b0de96b9 ARTEMIS-2285 Sorting by user column in connections view not working 2019-04-15 16:46:43 +01:00
Clebert Suconic da4f95cf71 ARTEMIS-2305 ACK counters to only increment after commit
Also including a new metric for ack attempts that will keep the former semantic.
2019-04-12 14:34:51 -04:00
Clebert Suconic cf2540ebb1 ARTEMIS-2301 Minor change on Epoll and kQueue.isAvailable
just checking for NoClassDefFound and return false
2019-04-11 18:06:50 -04:00
Clebert Suconic b8b7cc899f ARTEMIS-2300 Expiry notifications are not called from scanner 2019-04-10 16:01:18 -04:00
Clebert Suconic 9e45a4ac3a ARTEMIS-2299 Support for redelivery-delay and LVQ 2019-04-10 15:10:05 -04:00
Clebert Suconic 720f60ace2 ARTEMIS-2297 Avoiding Split Brains during replication catch up when no quorum is established 2019-04-10 07:52:08 -04:00
Clebert Suconic 655c772c20 ARTEMIS-2295 fix IBM JDK schema parsing 2019-04-05 16:19:20 -04:00
Clebert Suconic 821f291125 ARTEMIS-2292 Fix default on XSD for auto-delete-created-queues 2019-04-03 11:38:55 -04:00
Michael André Pearce 369c429d8a ARTEMIS-2292 - Fix queue level auto-delete for topic subscription queue
Adjust auto-delete defaults based on if queue autocreated
2019-04-02 19:06:08 +01:00
Michael André Pearce 0df9205aca ARTEMIS-2292 - Fix queue level auto-delete for topic subscription queue
Additional bits missed
2019-04-02 16:28:47 +01:00
Howard Gao 375f383e90 NO-JIRA Avoid NPE during backup shutdown
When a backup starts without a live, it's nodeID is null.
Added a null check in ClusterConnection's stop() to avoid
NPE if it's shut down.
2019-04-02 11:21:14 -04:00
Justin Bertram d2dc04c712 ARTEMIS-2288 add remote IP to handshake timeout error 2019-04-02 11:10:11 -04:00
Michael André Pearce c4fce10fac ARTEMIS-2292 - Fix queue level auto-delete for topic subscription queue 2019-04-02 10:24:27 -04:00
Francesco Nigro ac4cd4856c ARTEMIS-2283 Bad WARN message "AMQ222211: Storage is back to stable now"
LocalMonitor::under on PagingManagerImpl won't log anymore with a
warning message if the producers got unblocked and with info
if disk it getting freed
2019-04-01 09:47:42 -05:00
Francesco Nigro 0263d45a35 ARTEMIS-2282 QueueImpl::addTail of a management message could throw NPE
Performing direct deliveries of management messages could enter
a code path on QueueImpl::addTail with a NULL pageIterator: performing
a null check will avoid it to throw NPE.
2019-03-27 17:02:06 +00:00
Clebert Suconic 516b1a1b9f [maven-release-plugin] prepare for next development iteration 2019-03-14 12:41:04 -04:00
Clebert Suconic c3eb6c12ad [maven-release-plugin] prepare release 2.7.0 2019-03-14 12:40:52 -04:00
Howard Gao fb549ebe44 ARTEMIS-2273 Adding Audit Log
The Audit log allows user to log some important actions,
such as ones performed via management APIs or clients,
like queue management, sending messages, etc.
The log tries to record who (the user if any) doing what
(like deleting a queue) with arguments (if any) and timestamps.

By default the audit log is disabled. Through configuration can
be easily turned on.
2019-03-14 12:24:59 -04:00
Clebert Suconic 828a4856da ARTEMIS-2274 Fix on Journal buffer overflow with almost large messages 2019-03-13 14:56:46 -04:00
Clebert Suconic 3473618a06 NO-JIRA fixing another test
test failing: org.apache.activemq.artemis.tests.integration.management.AddressControlTest.testSendMessage
2019-03-12 20:21:20 -04:00
Francesco Nigro 39fd58f719 ARTEMIS-2258 The FileLockNodeManager directory should be configurable 2019-03-12 16:15:24 -04:00
onlyMIT 4484d05cf0 ARTEMIS-2226 last consumer connection should close the previous consumer connection
Multiple consumers using the same clientId in the cluster, the last consumer connection should close the previous consumer connection!

ARTEMIS-2226 last consumer connection should close the previous consumer connection

to address apache-rat-plugin:0.12:check

ARTEMIS-2226 last consumer connection should close the previous consumer connection

to address checkstyle

ARTEMIS-2226 last consumer connection should close the previous consumer connection

adjust the code structure

ARTEMIS-2226 last consumer connection should close the previous consumer connection

adjust the code structure

ARTEMIS-2226 last consumer connection should close the previous consumer connection

adjust the code structure

ARTEMIS-2226 last consumer connection should close the previous consumer connection

adjust the code structure

ARTEMIS-2226 last consumer connection should close the previous consumer connection

adjust the code structure

ARTEMIS-2226 last consumer connection should close the previous consumer connection

add javadoc
2019-03-12 19:57:31 +00:00
Michael André Pearce fafbd7e2e5 ARTEMIS-1604 Artemis deadlock using MQTT Protocol
Address code review comment not address when PR was merged.
2019-03-12 19:53:07 +00:00
Erik Östlund a760b8bb30 NO-JIRA Added Javadoc reference to the documentation 2019-03-12 14:53:37 -04:00
Francesco Nigro 5b2c47567d ARTEMIS-1604 Artemis deadlock using MQTT Protocol
MQTT shouldn't support direct deliveries
2019-03-12 12:36:25 -04:00
Clebert Suconic 0872f749a9 ARTEMIS-1604 Using default supportDirectDelivery=false
This is to avoid races setting it to false on protocols that won't support direct Deliver
2019-03-11 14:40:42 +01:00
Francesco Nigro c83fce8db4 ARTEMIS-1604 Artemis deadlock using MQTT Protocol
Direct and async deliveries lock QueueImpl::this and
ServerConsumerImpl::this in different order causing deadlock:
has been introduced a deliverLock to prevent both type of delivers
to concurrently happen, making irrelevant the lock ordering.
2019-03-11 14:35:39 +01:00
Keith Wall 95bcfaeb70 ARTEMIS-2262: Correlate management response messages with the request 2019-03-08 12:11:58 -05:00
Michael André Pearce 4a5af776d8 ARTEMIS-2265 Support Federated Queues and Addresses
Implement Federated Queue (builds on recent consumer priority)
Implement Federated Address (builds on recent queue level auto-delete)
Add Functional Tests
Add Failure Tests (remote and local shutdowns)
Add Documentation
2019-03-07 14:37:00 -05:00
Clebert Suconic 061fb2787e ARTEMIS-1977 Stripping activemq-artemis as a separated proejct 2019-03-07 11:34:15 -05:00
Francesco Nigro 4ea9d25ca9 ARTEMIS-2264 PurgeOnNoConsumers prevent removal of messages with replication
Added test reproducer and changed Queue::isDurableMessage usages into
Queue::isDurable to allow acks to hit the journal and being
correctly replicated across nodes.
2019-03-05 15:16:36 -05:00
Michael André Pearce 9b01e9521c ARTEMIS-2263 Support queue level auto-delete configuration
Add ability to configure when creating auto created queues at the queue level
Add support for configuring message count check
Add test cases
Update docs
2019-02-27 08:13:19 +00:00
Clebert Suconic da3d7a2940 ARTEMIS-2243 Fixing ClassLoding and dependency to security domain on method parameter 2019-02-25 20:12:20 -05:00
Clebert Suconic 9f6f36d041 ARTEMIS-2183 Fixing RefsOperation on consumers and adding test 2019-02-25 17:23:47 -05:00
Otavio R. Piske a1d10c02f9 ARTEMIS-2183 Useless statement in public synchronized List
Ensures that the returned list returns the refsToAck list instead of
trying to add all items of itself

This closes 2566
2019-02-25 17:23:34 -05:00
Michael André Pearce c4e68b6046 ARTEMIS-2118 Enhanced Message Groups Support
Support using group buckets on a queue for better local group scaling
Support disabling message groups on a queue
Support rebalancing groups when a consumer is added.
2019-02-21 19:58:34 -05:00
Clebert Suconic 285848969f ARTEMIS-2251 Using Callbacks to delete large messages from IO
This closes #2549
2019-02-20 17:04:37 -05:00
Clebert Suconic d59bdca73f ARTEMIS-2256 Update Topology back after a bridge reconnected
https://issues.apache.org/jira/browse/ARTEMIS-2256
2019-02-19 16:10:40 -05:00
Jiri Danek 99e39f5f1c NO-JIRA Fix a "Inefficient Map Iterator" SpotBugs warning
https://spotbugs.readthedocs.io/en/stable/bugDescriptions.html#wmi-inefficient-use-of-keyset-iterator-instead-of-entryset-iterator-wmi-wrong-map-iterator
2019-02-19 14:46:58 -05:00
Clebert Suconic 8edca409f6 ARTEMIS-2246 Fixing testsuite 2019-02-08 18:42:02 -05:00
Michael André Pearce efa48c9782 ARTEMIS-2081 listConfiguredQueues returns only queues created by config
Move configuration managed in persister before consumer dispatch so then the fix can be applied in 2.6.x branch safely.
2019-02-07 15:20:04 -06:00
Justin Bertram a38cdfa811 ARTEMIS-2246 clarify docs for defaults; change max-disk-usage default 2019-02-07 11:13:04 -05:00
Justin Bertram 4a1fc61fcc ARTEMIS-2243 user/role ops for PropertiesLoginModule via mgmnt 2019-02-07 10:16:01 -05:00
Clebert Suconic e09ffe14f4 ARTEMIS-2244 Adding critical check around checkDepage 2019-02-05 15:15:10 -05:00
yb 8799615a13 ARTEMIS-2244 checkDepage method placed outside CRITICAL_DELIVER avoid critical analyzer timeout 2019-02-05 15:04:09 -05:00
Clebert Suconic c0edb88747 ARTEMIS-2205 Fixing Divert Example
This is simply fixing the example under examples/features/standard/divert
Other tests are passing.
No additional tests are needed as the example on this case acts like a test.
2019-01-30 15:38:36 -05:00
Michael André Pearce b76f0061f8 ARTEMIS-2241 Support direct deliver for InVMAcceptors
Push isDirectDeliver method from netty impl, to the Connection interface
Add support to InVMConnection for isDirectDeliver flag and ability to set via config, defaulting to false, to keep current default behavior. 
Extend DirectDeliverTest to check InVM as well.
2019-01-30 08:11:46 +00:00
Justin Bertram 4d2eae2686 NO-JIRA add logging to LegacyLDAPSecuritySettingPlugin 2019-01-29 23:09:20 -05:00
Justin Bertram 693ea722f5 ARTEMIS-2192 fix listener for LegacyLDAPSecuritySettingPlugin 2019-01-24 14:34:27 -05:00
Michael André Pearce cf65912bcc ARTEMIS-2170 Optimized CoreMessage clearInternalProperties
Ensure only iterate properties, if internal property is set.
2019-01-24 08:31:10 +00:00
Francesco Nigro 6446d01a15 ARTEMIS-2170 Optimized CoreMessage check and cleanup methods
Any checkProperties();<usage of this.properties> pattern has been
replaced by an atomic checkProperties().<usage of returned properties>
to help both performance and consistency.
The cleanup is now performed into CoreTypedProperties both
for performance reasons (avoid lock/unlock many times)
and consistency, given that the operation is now atomic.
2019-01-24 08:31:10 +00:00
Howard Gao 90ca87c5e1 ARTEMIS-2088 - Page.write() should throw exception if file is closed
In Page.write(final PagedMessage message) if the page file is closed
it returns silently. The caller has no way to know that if the message
is paged to file or not. It should throw an exception so that the
caller can handle it correctly.

This causes random failure PagingTest#testExpireLargeMessageOnPaging().
The test shows that when the server stops it closes the page file.
In the mean time a message is expired to the expiry queue and if
the expiry queue is in paging mode, it goes to Page.write() and
returns without any error. The result is that the message is removed
from the original queue and not added to the expiry queue.

If we throw exception here it makes the expiration failed, the message
will not be removed from the orginal queue. Next time broker is started,
the message will be reloaded and expired again. no message lost.
2019-01-23 21:25:58 -05:00
Clebert Suconic 3ac96491ec NO-JIRA Update year to 2019 2019-01-23 21:06:09 -05:00
Clebert Suconic 5a19c54f9f ARTEMIS-196 Removing dead variables
Fixing build after removing variable used by FieldUpdater
2019-01-23 13:31:31 -05:00
Justin Bertram 8d7d78074c ARTEMIS-2192 LegacyLDAPSecuritySettingPlugin uses hard-coded RDN types
Change the LegacyLDAPSecuritySettingPlugin to interpret the search
results based on the order of the returned RDNs rather than hard-coded
types.
2019-01-23 11:52:32 -05:00
Clebert Suconic f225a4e166 ARTEMIS-196 Removing dead variables
This is really a NO-JIRA
however it was done in the context of merging ARTEMIS-196
2019-01-23 11:25:15 -05:00
Michael André Pearce 7dfa0fe7f4 ARTEMIS-196 Implement Consumer Priority
Add consumer priority support
Includes refactor of consumer iterating in QueueImpl to its own logical class, to be able to implement.
Add OpenWire JMS Test - taken from ActiveMQ5
Add Core JMS Test
Add AMQP Test
Add Docs
2019-01-23 11:19:24 -05:00
Luis De Bello d78eeb05cd ARTEMIS-2156 Message Duplication when using exclusive divert and clustering 2019-01-23 10:17:03 -05:00
Emmanuel Hugonnet 8b272bd1c8 ARTEMIS-2234 fix warning from LoggingConfigurationFileReloader
return the LogContextConfiguration if we have one
2019-01-21 14:19:09 -06:00
Michael André Pearce 55732d401f NO-JIRA Fix Possible NPE in connectToNodeInReplicatedCluster
Variable possibleLive may be null, as signified by trace log above, also dedupe code.
2019-01-21 13:26:24 +08:00
yang wei 3954f0183f ARTEMIS-2186 Large message incomplete when server is crashed 2019-01-19 08:16:09 +00:00
Justin Bertram 61e0354b1a ARTEMIS-1867 FQQN for producers
There's a *slight* semantic change with the behavior of the queue query
and binding query to make them consistent with the address query, namely
that they will return the name of the queue and the name of the address
in every case and the returned names will be not use the FQQN syntax but
will be parsed to reflect their actual names in the broker.
2019-01-18 09:03:30 +00:00
Justin Bertram 03c45d6479 NO-JIRA de-duplicate createQueue()
There were two different but nearly identical implementations of
createQueue(). I consolidated these into a single method. There should
be no semantic differences.
2019-01-18 09:03:29 +00:00
Michael André Pearce f49d3e89dc NO-JIRA Fix possible IOE
id must be less than values.length,  values[id] array access might be out of bounds, as the index might be equal to the array length.
2019-01-18 08:20:14 +00:00
Michael André Pearce dac2ae6636 ARTEMIS-2221 Fix Merge 2019-01-17 23:50:09 +00:00
yang wei 5ea72022a1 ARTEMIS-2187 remove page from softcache before consumedpage 2019-01-17 18:12:57 -05:00
yang wei 52d236d850 ARTEMIS-2188 fix address size leak caused by large page message 2019-01-17 17:51:51 -05:00
Justin Bertram 6c0f9f8d3d ARTEMIS-2221 avoid unnecessary Bindings instance creation
When trying to get the bindings for an address the getBindingsForAddress
method will create a Bindings instance if there are no bindings for the
address. This is unnecessary in most circumstances so use the
lookupBindingsForAddress method instead and check for null.
2019-01-17 22:49:35 +00:00
Justin Bertram bfefd1f1ed NO-JIRA fix lgtm.com errors
Errors enumerated at
https://lgtm.com/projects/g/apache/activemq-artemis/alerts/?mode=tree&severity=error
2019-01-17 22:37:01 +00:00
Justin Bertram 57aacf784c NO-JIRA fix lgtm.com warnings
Warnings enumerated at
https://lgtm.com/projects/g/apache/activemq-artemis/alerts/?mode=tree&severity=warning
2019-01-17 22:30:28 +00:00
Justin Bertram 47aa25933f ARTEMIS-2178 routing-type config for core bridge
MULTICAST messages forwarded by a core bridge will not be routed to any
ANYCAST queues and vice-versa. Diverts have the ability to configure how
routing-type is treated. Core bridges now support this same kind of
functionality. By default the bridge does not alter the routing-type of
forwarded messages to maintain compatibility with existing behavior.
2019-01-17 22:22:01 +00:00
Francesco Nigro 702f445205 ARTEMIS-2200 NPE while dropping/failing large messages on paging
Large messages pendingRecordID is not accessed atomically, leading
to races that would lead to records that cannot been found on the
journal for deletion: it would lead to cause NPE that won't clean
the pending tasks on the current OperationContextImpl.
Adding a cleanup on error of those tasks and avoiding the race
to happen by adding proper synchronization will both enforce
correct clean up when something bad happen and avoid NPE.
2019-01-17 14:35:25 -05:00
Emmanuel Hugonnet a2c4f7c0a3 [ARTEMIS-1536]: Incorrect Journal filesize calculation where specified size is lest that the block size when using AIO.
* If the specified file size is under the fs block size then the
resulting file size is 0. Setting it to the block size in this case.

Jira: https://issues.apache.org/jira/browse/ARTEMIS-1536
2019-01-17 10:37:37 -05:00
Howard Gao 70f8297cfa ARTEMIS-2210 PagingStore creation is not properly synchronized
In PagingManagerImpl#getPageStore() the operations on the map 'stores'
are not synchronzed and it's possible that more than one paging store is
created for one address.
2019-01-17 10:30:20 -05:00
Francesco Nigro 11214f0ca9 ARTEMIS-2212 Avoid using CLQ on ServerConsumerImpl
It would deliver a better performance for the most
common operations eg offer, poll, iterations, size.
2019-01-17 10:25:51 -05:00
Qihong Xu 9f4ac4cb9f ARTEMIS-2214 Cache durable&deliveryTime in PagedReference 2019-01-16 16:35:11 -05:00
Clebert Suconic ae1ccf034a ARTEMIS-2228 Large Messages over Management 2019-01-15 12:31:26 -05:00
Francesco Nigro 47db4714fc ARTEMIS-2216 Avoid unnecessary page cache queries on ack TX
PageSubscriptionImpl::ackTx is already performing a counter update
using the message persistent size: the size can be reused on
PagePosition::setPersistentSize, avoiding to query the page cache just
to compute it.
2019-01-14 11:40:41 -05:00
Francesco Nigro e541126ca6 ARTEMIS-2224 lock-free LivePageCache + tests
LivePageCacheImpl has been reimplemented to be
lock-free, multi-producer and multi-consumer
in any of its operations.
2019-01-14 11:40:41 -05:00
Clebert Suconic 4bcad4bf47 ARTEMIS-2224 Javadoc changes after the paging lock changes 2019-01-14 11:39:37 -05:00
Qihong Xu e6fe9f9d92 ARTEMIS-2216 Use a specific executor for pageSyncTimer 2019-01-14 11:39:37 -05:00
Francesco Nigro 8281e3b58f ARTEMIS-2205 Optimizing some Lambda usages
https://issues.apache.org/jira/browse/ARTEMIS-2205
2019-01-10 16:39:56 +01:00
Clebert Suconic d79762fa04 ARTEMIS-2205 Refactor AMQP Processing into Netty Thread
These improvements were also part of this task:
- Routing is now cached as much as possible.
- A new Runnable is avoided for each individual message,
  since we use the Netty executor to perform delivery

https://issues.apache.org/jira/browse/ARTEMIS-2205
2019-01-10 16:39:56 +01:00
yb 0a47e1bc6f ARTEMIS-2215 largemessage have been consumed but not deleted from the disk during backup and live sync 2019-01-09 17:25:02 -05:00
yb 8acdbc6237 ARTEMIS-2222 removing unecessary check for positioning on page 2019-01-09 16:31:05 -05:00
Clebert Suconic 40966c769a ARTEMIS-2207 Page Showing Log.warns for regular acked messages 2018-12-18 19:07:42 -06:00
JiriOndrusek 3c3c81720a [ARTEMIS-2050] It is possible to get AMQ224000: Failure in initialisation: java.lang.NullPointerException during shutdown of backup server with shared store 2018-12-14 18:04:07 -06:00
Francesco Nigro 1c0ef5d7f7 ARTEMIS-2196 Avoid creating RandomAccessFile when FileChannel is needed 2018-12-14 15:10:30 -06:00
Francesco Nigro 2716a7be88 ARTEMIS-2198 Reduce GC pressure on TransactionImpl and OperationContextImpl
TransactionImpl::properties are often not used and could be
avoided to be allocated.
OperationContextImpl.TaskHolders instances are turned into static
classes to avoid refecencing back the context, making the life
easier for the GC.
OperationContexImpl volatile loads can be reduced to make the
code faster on the hot path.
2018-12-14 15:04:05 -06:00
andytaylor 80058677d9 ARTEMIS-2130 - This is to allow views to have the client id when set on core protocol
https://issues.apache.org/jira/browse/ARTEMIS-2130
2018-12-14 09:28:48 -05:00
feuillemorte a3001fd9bd ARTEMIS-2201 Added tests on DEFAULT_JOURNAL_FILE_OPEN_TIMEOUT value 2018-12-14 11:32:13 +01:00
feuillemorte 6dfa9a1fa4 #ARTEMIS-2201 Added tests on DEFAULT_JOURNAL_FILE_OPEN_TIMEOUT value 2018-12-14 11:32:13 +01:00
Howard Gao 2bd8fa7c5d ARTEMIS-2197 Page deleted before transaction finishes
Fixed regression caused by previous commit
b36dc37c15
2018-12-13 20:18:31 +08:00
Howard Gao b36dc37c15 ARTEMIS-2197 Page deleted before transaction finishes
When a receiving transaction is committed in a paging situation,
if a page happens to be completed and it will be deleted in a
transaction operation (PageCursorTx). The other tx operation
RefsOperation needs to access the page (in PageCache) to finish
its job. There is a chance that the PageCursorTx removes the
page before RefsOperation and it will cause the RefsOperation
failed to find a message in a page.
2018-12-11 10:22:18 -05:00
Justin Bertram 3c595f18d5 ARTEMIS-2179 mgmnt method to get cluster-cxn names 2018-12-06 16:45:35 +01:00
Justin Bertram 647998c4e1 ARTEMIS-2126 web server can leak 2018-12-06 16:00:53 +01:00
Emmanuel Hugonnet 80525f1c91
[ARTEMIS-2163]: Classloading issue if artemis-commons is not in the same classloader as artemis-client-* or artemis-server.
* Passing the owner class to define the classloader to load classes via ClassLoadingUtil with artemis-commons in a different classloader..

JIRA: https://issues.apache.org/jira/browse/ARTEMIS-2163
2018-11-14 18:23:30 +01:00
Ingo Weiss ff5f1213bb [ARTEMIS-2175] Duplicate messages when JMS bridge is stopped and restarted
Issue: https://issues.apache.org/jira/browse/ARTEMIS-2175
2018-11-14 10:31:48 -05:00
Howard Gao 6e89b22eaa ARTEMIS-2174 Broker reconnect cause OOM with scale down
When a node tries to reconnects to another node in a scale down cluster,
the reconnect request gets denied by the other node and keeps retrying,
which causes tasks in the ordered executor accumulate and eventually OOM.

The fix is to change the ActiveMQPacketHandler#handleCheckForFailover
to allow reconnect if the scale down node is the node itself.
2018-11-14 10:23:57 -05:00
Justin Bertram f4396da9fd ARTEMIS-2108 fix another potential StackOverflow 2018-11-13 17:37:51 -05:00
Andreas Frohwerk 32fd445dd2 NO-JIRA Fix minor leak in FileMoveManagerTest
Not closing the InputStream makes this test flaky on Windows. The test
breaks because FileMoveManager::delete(java.io.File) Line 221 fails
to delete the file if it's still "owned" by the JVM process on Windows.
2018-11-13 17:36:48 -05:00
Justin Bertram c2188aa058 ARTEMIS-2127 Add auth details to consumer created notification 2018-11-08 23:56:51 +00:00
Howard Gao 72eadb201d ARTEMIS-1850 QueueControl.listDeliveringMessages returns empty result
With AMQP protocol when some messages are received in a transaction,
calling JMX QueueControl.listDeliveringMessages() returns empty list
before the transaction is committed.
2018-11-06 20:23:32 +08:00
Francesco Nigro 270b383e80 ARTEMIS-1710 Allow management msgs to exceed global-max-size limit 2018-11-03 23:34:59 +01:00
Roddie Kieley 5f74faa34a ARTEMIS-2160: Addressed occurance where cluster configuration on server locator was hard coded. Covered with test. 2018-11-02 11:12:35 -05:00
Clebert Suconic c62146802e ARTEMIS-2159 Fixing OpenWire Blocker Producer
Previous change on Flow control in OpenWire broke Blocked cases
This is a better fix.
2018-11-01 15:43:17 -04:00
yang wei 31399486ac ARTEMIS-2123 Paging not stopped if there are no messages on one subscription 2018-10-31 15:28:20 -04:00
Clebert Suconic 02a6d5bb49 ARTEMIS-2159 OpenWire would allow one extra send
Thanks to Otavio Piske collaborating a test change here.
2018-10-31 12:46:12 -04:00
Michael André Pearce faa6ffa3b4 ARTEMIS-2151 JMS Selectors broken in some cases
Create Test Case
Fix OpenWire so selectors are translated
Fix GroupID to call groupId method
2018-10-31 11:55:22 -04:00
yang wei e024efcccd ARTEMIS-2158 don't get pagedMessage if it's nontransactional 2018-10-31 10:39:42 +08:00
Michael André Pearce f30ca44c82 ARTEMIS-2142 Support JMSXGroupSeq -1 to close/reset group.
Add test cases
Add GroupSequence to Message Interface
Implement Support closing/reset group in queue impl
Update Documentation (copy from activemq5)

Change/Fix OpenWireMessageConverter to use default of 0 if not set, for OpenWire as per documentation http://activemq.apache.org/activemq-message-properties.html
2018-10-30 16:24:33 -04:00
sebthom d7aa9e5077 ARTEMIS-2141 Add Filter column to Consumers View of AdminUI 2018-10-29 20:42:05 +00:00
Michael André Pearce b0d36ebc50 ARTEMIS-856 small fix to avoid re-distributor being assigned a group 2018-10-29 20:40:50 +00:00
Arthur Fritz Santiago dba405c404 ARTEMIS-2150 Counts the number of delivering messages in this queue 2018-10-27 06:52:56 +01:00
Justin Bertram 97612c48d3 ARTEMIS-1856 support delays before deleting addresses & queues 2018-10-26 19:30:06 +01:00
Clebert Suconic 5132775371 ARTEMIS-2146 Avoiding NPE on AMQP Flow Control
AMQP Flow control will disable consumer flow control (setting credits to null)
This will avoid a race checking flow control.
2018-10-24 10:55:56 -04:00
Michael André Pearce d37a0e5f87 NO-JIRA Remove dead jms code from broker 2018-10-24 02:04:25 +01:00
Michael André Pearce 547b2aa592 ARTEMIS-2117 Add custom LVQ Key and Non Destructive Queue into Broker
Implement custom LVQ Key and Non-Destructive in broker - protocol agnostic
Make feature configurable via broker.xml, core apis and activemqservercontrol 
Add last-value-key test cases
Add non-destructive with lvq test cases 
Add non-destructive with expiry-delay test cases
Update documents
Add new methods to support create, update with new attributes
Refactor to pass through queue-attributes in client side methods to reduce further method changes for adding new attributes in future and avoid methods with endless parameters. (note: in future this should prob be done server side too)

Update existing test cases and fake impls for new methods/attributes
2018-10-17 20:53:13 -04:00
Ville Skyttä 74951d9221 NO-JIRA Log STOMP transaction starts with debug level instead of error 2018-10-11 13:43:39 -04:00
Justin Bertram cbace51d6c ARTEMIS-2121 reload logging config at runtime
Many thanks to James Perkins who supplied the guts of the reload logic.
2018-10-11 11:28:25 -04:00
yang wei 8f4bd7c621 ARTEMIS-2102 delete paging directory or table if address is removed 2018-10-10 18:50:11 -04:00
Justin Bertram b3529dcea4 ARTEMIS-1018 de-duplicate logging codes 2018-10-10 18:48:53 -04:00
Justin Bertram 59ad650a13 ARTEMIS-2106 log failure to start broker 2018-10-10 18:47:22 -04:00
Justin Bertram b86cf69e6a ARTEMIS-2107 clarify identity for authn failures in notification 2018-10-10 18:46:48 -04:00
Justin Bertram d336a09f9a ARTEMIS-2108 Potential StackOverflowError when load balancing disabled 2018-10-10 18:45:40 -04:00
Justin Bertram 744838faaf ARTEMIS-2111 ManagementContext can leak 2018-10-10 18:43:10 -04:00
Michael André Pearce 8c6322deed ARTEMIS-2094 Only deploy reloadable config if reloaded. 2018-10-10 14:19:52 -04:00
Michael André Pearce b2af19db2d NO-JIRA Fix NPE seen in test case logs 2018-10-10 17:17:31 +01:00
Justin Bertram a28b4fb34e ARTEMIS-1545 refactor & rework a few incompatible pieces
Existing commit for ARTEMIS-1545 broke bridges and large messages. This
commit fixes those, and refactors the solution a bit to be more clear.
2018-09-27 17:29:18 -04:00
Michael André Pearce e4ba48a311 ARTEMIS-1545 Support JMS 2.0 Completion Listener for Exceptions 2018-09-27 17:29:18 -04:00
Justin Bertram c72bf53cb1 ARTEMIS-2098 potential NPE when decoding protocol 2018-09-27 10:24:33 -04:00
Michael André Pearce 8e40b2d4f4 ARTEMIS-2095 - Typed Properties ThreadSafety
Add Concurrency Test to expose concurrency errors seen in logs.
Add Fix to ensure TypedProperties to ensure threadsafety
Add forEach and forEachKey to allow for provide a thread safe way of iterating through keys and values, without needing to duplicate the collection.
Add getMapNames method to remove code duplication and to ensure thread safe
2018-09-26 15:41:52 +01:00
Michael André Pearce cce0e1927c ARTEMIS-2094 - Fix Configuration change loss when network Issue
Further fix around network loss.
If network loss (split) and slave activates, for a period its config used when it initializes in initialisePart2 was stale. 
Add/Extend test to ensure address-setting change made on live preserved on slave (after activation)
Add/Extend test to ensure security-setting change made on live preserved on backup (after activation)
2018-09-26 09:23:57 -04:00
Justin Bertram 9c62531c2f ARTEMIS-1961 track routed and unrouted messages sent to an address 2018-09-25 18:07:32 -04:00
yang wei d868563e7b ARTEMIS-2092 fix first page messages lost on server crash bug 2018-09-19 16:19:45 -04:00
Justin Bertram 5c8fcc19fd ARTEMIS-1991 document advanced destination options 2018-09-18 12:34:30 +01:00
Justin Bertram c60d17884a ARTEMIS-1919 implement SNI properly 2018-09-18 08:00:05 +01:00
Roddie Kieley 34df9679d7 ARTEMIS-2000: For ScaleDown set the RoutingType header property on the message
so if the address does not exist on the other end it will be created correctly.

Test added by Andy Taylor (commit squash during rebase on #2202)
2018-09-14 14:48:09 -04:00
andytaylor 82795b7bff ARTEMIS-1898 - make sure tosend credits on rejected messages
And also to run the credit runnables once memory is free in fail mode

https://issues.apache.org/jira/browse/ARTEMIS-1898
2018-09-13 16:22:28 -04:00
andytaylor 3b34127bb3 ARTEMIS-2075 - allow Extra backups to try to replicate more than once
https://issues.apache.org/jira/browse/ARTEMIS-2075
2018-09-13 10:02:45 +01:00
Francesco Nigro 7e09e1b350 ARTEMIS-2070 broker can reduce buffer copies with large messages 2018-09-12 20:59:12 -04:00
Clebert Suconic 6361079aa0 ARTEMIS-2084: Failover will not work with network cable disconnect on core protocol 2018-09-12 19:59:00 -04:00
Francesco Nigro 3c7252adbc ARTEMIS-2068 save reading any file to get AMQP large msg size
ServerJMSBytesMessage::getBodyLength can save reading
the whole large message file by reading just its
file size
2018-09-11 16:36:45 -04:00
Francesco Nigro 7a7304bb28 ARTEMIS-2078 AMQP large msg aren't consumed by clusters without persistence
NullStorageLargeServerMessage is not correctly exposing its body buffer
to allow CoreAmqpConverter to convert it into an AMQPMessage
2018-09-11 16:35:15 -04:00
Michael André Pearce c417d0b5f8 ARTEMIS-2081 listConfiguredQueues returns only queues created by config
Extend test case to reproduce problem of client created queues being incorrectly removed on simple reload of config.
Add a flag/field to the queues created by configuration/broker.xml so we can correctly filter only queues created/managed by config.
Update listConfiguredQueues to use the new queue flag
2018-09-11 13:55:11 -04:00
Michael André Pearce 4b88f38b2d ARTEMIS-2076 Make Filter update-able
Add Tests
Add implementation inline with other queue updatable settings.
Enhance tests to ensure queue is not destroyed during config change and messages in queue already are preserved
2018-09-07 15:49:03 -04:00
Michael André Pearce dbfdc18f49 ARTEMIS-2065 Change routing-type isnt destructive.
Revert previous fix
Keep original ConfigChangeTest
Apply new non-destructive fix.
Enhance tests to ensure messages in queues are not lost either on reload when running or when config changed on-restart (e.g. queue i not destroyed)
2018-09-07 15:25:57 -04:00
Clebert Suconic 05ce7c6ecd NO-JIRA Adding a test playing with network disconnects and failover 2018-09-05 18:13:35 -04:00
Justin Bertram 3827c54c05 ARTEMIS-2065 Can't change queue routing-type between restarts 2018-08-30 14:31:18 -05:00
Justin Bertram b0d30d4da5 ARTEMIS-2064 make address & queue deployment more robust
Any failure to deploy an address or queue will short-circuit the broker
initialization process preventing any other addresses or queues from
being deployed as well as other critical resources like acceptors, etc.
2018-08-30 15:10:44 -04:00
Justin Bertram e7e5112d51 ARTEMIS-2066 LegacyJMSConfiguration parser may deploy non-jms queues 2018-08-30 15:08:10 -04:00
Justin Bertram 3af9ca057f ARTEMIS-2063 improve logging for address/queue deployment 2018-08-29 14:29:49 -05:00
Martyn Taylor 9a855e18e1 ARTEMIS-2055 Lock LM on PacketHandler on clear 2018-08-29 13:40:19 -04:00
Martyn Taylor 490ef71e1d ARTEMIS-2055 Set Live LM to Null after route
The ServerSessionPacketHandler has a close() callback handler which will
delete any pending large messages.  However, there is a race where a
large message can be routed, then the close delete the associated large
message resulting in data loss.
2018-08-27 12:56:53 +01:00
Christopher L. Shannon (cshannon) 87f393e597 ARTEMIS-2052 - Fix defaultConsumerWindowSize negotiation
First, QueueQuery should use address name for address settings
The name used for looking up address settings for a queue now uses the
address name if there is a local queue binding

Second, make sure sent credits to the server is the correct value
2018-08-26 18:25:47 -04:00
Clebert Suconic 6b1abd1aad ARTEMIS-2053 avoiding data loss after compacting 2018-08-26 18:17:29 -04:00
Carsten Lohmann 95ec8ea433 ARTEMIS-2044 Add onSendException, onMessageRouteException to ActiveMQServerMessagePlugin 2018-08-24 21:35:34 +01:00
Clebert Suconic 63e6cd98f8 ARTEMIS-2046 Fixing issues with JournalStorageManager.stop in replication, JDBC and shared storage 2018-08-20 21:25:57 -04:00
Michael André Pearce 24a28da09f ARTEMIS-2022 - Enhancements
Fix checkstyle
Avoid duplicated logic
Ability to filter and group
Instantiate SimpleString property key once
Get property value via getObjectProprty to ensure all special mapped properties such as in AMQPMessage would return
Avoid a custom string to represent null, instead rely on Java's representation "null" by using Objects.toString to get the string value of the property value used to group by.
2018-08-13 08:37:56 +01:00
Arthur Fritz Santiago 349477ed31 [ARTEMIS-2022] Ajust checkstyle 2018-08-13 08:37:56 +01:00
Arthur Fritz Santiago e15917129f [ARTEMIS-2022] Create count messages 'group by' this property filter 2018-08-13 08:37:56 +01:00
Michael André Pearce 19e1bbeb49 ARTEMIS-2019 - Seperate ServerPlugin Interfaces
Seperate plugin interface by area, all extending a base interface. 
Update code to check and call only plugins implementing specific interfaces.
Existing interface extends all the new interfaces for back compatibility or those who want simplicity and don't care about perf.
2018-08-09 19:42:28 -04:00
Justin Bertram 53f8bc3daf ARTEMIS-2010 actively detect unauthenticated LDAP Bind requests 2018-08-09 19:40:30 -04:00
Christopher L. Shannon (cshannon) e915545278 ARTEMIS-2018 - Add bridge events to plugin API
Add callbacks to handle bridge events including beforeDeliverBridge,
afterDeliverBridge and afterAcknowledgeBridge
2018-08-09 13:37:56 +01:00
Clebert Suconic b710df7844 ARTEMIS-2011 Fixing incompatibility of AddressSettings encode between versions
To fix this I added a retry on AddressSettings using code that's closer to the original version
2018-08-06 11:12:46 -04:00
Jeff Mesnil fd9aad202b [ARTEMIS-1947] Session metadata in session management operation
Fill the session's metadata in JSON properties instead of serializing it
as an opaque String.

JIRA: https://issues.apache.org/jira/browse/ARTEMIS-1947
2018-08-06 14:11:40 +02:00
Christopher L. Shannon (cshannon) e629ac4538 ARTEMIS-2003 - Add bridge metrics
This commit adds support for tracking metrics for bridges for both
normal bridges and bridges that are part of a cluster. The two
statistics added in this commit are messages pending acknowledgement
and messages acknowledged but more can be added later.
2018-08-03 14:18:34 -04:00
Michael André Pearce 825081cfc0 ARTEMIS-856 Fixing ScaleDownTest
Don't increment the pos if redistributor. causes pos to be > size thus index out of bounds when getting the consumer on next loop.
2018-08-03 10:48:59 +01:00
Clebert Suconic 77989c3763 NO-JIRA avoiding a NPE if the server is stopped 2018-08-02 10:57:17 -04:00
Michael André Pearce de465179e5 ARTEMIS-856 Fixing MessageRedistributionTest
Cleaner code.
2018-08-02 14:20:03 +01:00
Michael André Pearce ddd554f43f ARTEMIS-856 Fixing ExclusiveTest 2018-08-02 13:53:22 +01:00
Michael André Pearce ec742cb889 ARTEMIS-856 Fixing MessageRedistributionTest 2018-08-02 13:52:32 +01:00
Clebert Suconic 59520b9018 ARTEMIS-856 Fixing QueueCommandTest 2018-08-02 10:50:26 +01:00
Clebert Suconic 0e36e072bd ARTEMIS-1732 I simplified some of the changes performed at the previous commit.
Also I changed GlobalDiskFullTest to actually block the senders.
I moved the Runnables from PagingManager into the Util as AtomicRunnable.
2018-07-31 21:39:04 -04:00
Howard Gao 53e1d60160 ARTEMIS-1732 AMQP anonymous producer not blocked on max-disk-usage
Anonymous senders (those created without a target address) are not
blocked when max-disk-usage is reached. The cause is that when such
a sender is created on the broker, the broker doesn't check the
disk/memory usage and gives out the credit immediately.
2018-07-31 21:39:01 -04:00
Shailendra Kumar Singh 29f39631dc [ARTEMIS-1994]Include global-size-bytes in WARN message AMQ222038/39 for paging
[ARTEMIS-1994]Minor changes
2018-07-31 14:25:45 -04:00
Michael André Pearce 332cee8e66 ARTEMIS-1997 - un-needed SimpleString creation on hotpath with Filters
Create the SimpleString on construction of PropertyExpression so it can be re-used instead of creating it every time its filtered in the FilterImpl
2018-07-31 14:17:20 -04:00
Christopher L. Shannon (cshannon) 5fc60d7437 ARTEMIS-1987 - Add consumer window size to AddressSettings
Support configuring a default consumer window size via AddressSettings
which will allow sensible defaults to be used by address type
2018-07-31 14:16:11 -04:00
Michael André Pearce 8a9835a394 ARTEMIS-856 - Support consumersBeforeDispatch and delayBeforeDispatch
https://issues.apache.org/jira/browse/ARTEMIS-856

This is equivalent to consumersBeforeDispatchStarts and timeBeforeDispatchStarts in ActiveMQ 5.x

http://activemq.apache.org/message-groups.html

This is addressing one of the items on the artemis roadmap: http://activemq.apache.org/activemq-artemis-roadmap.html
2018-07-31 16:16:51 +01:00
Clebert Suconic 56be281aaf ARTEMIS-1989 Replication catch up leaking files
Related commit that broke this at 837694e705
2018-07-25 15:03:57 +01:00
Martyn Taylor 66ba17846f ARTEMIS-1988 Do not clear Activate Callbacks on stop
This is reverting 36fc14a30d
2018-07-25 09:49:44 -04:00
Clebert Suconic b2d04b9ceb ARTEMIS-1954 Fixing RedeployTest and moving JMS Parsing 2018-07-16 22:35:07 -04:00
Justin Bertram fbdd6fe0ad ARTEMIS-1971 make LDAP pooling test more robust 2018-07-16 20:34:46 -04:00
Clebert Suconic 2748ef0253 NO-JIRA removing dumb debug message left by accident 2018-07-16 20:32:47 -04:00
Justin Bertram 9ad9051165 ARTEMIS-1956 move MessageCounterInfo to core-client 2018-07-12 14:26:22 -04:00
17103355 5ec2234010 ARTEMIS-1958 Artemis may not be able to delete pages when there are some empty page files 2018-07-12 14:11:16 -04:00
yang wei 9f8288c015 ARTEMIS-1966 Replication channel closed but not connection if flow controlled during replication 2018-07-12 13:47:39 -04:00
Justin Bertram 7b4be5008d ARTEMIS-1974 document LDAP role expansion 2018-07-12 12:42:01 -04:00
Francesco Nigro bdcef5a68f ARTEMIS-1981 JDBCJournalImpl constructor isn't using tableName parameter
Removed the unused/redundant constructor parameter tableName
2018-07-12 12:40:42 -04:00
Clebert Suconic 9a52766e51 NO-JIRA Removing System.err style debug left by accident
This is non critical. The message is only used by Queue.pause ATM.
2018-07-12 16:51:35 +02:00
Clebert Suconic 7c0f6633f1 ARTEMIS-1959 Fixing JournalDataPrintTest 2018-07-10 23:40:16 -04:00
Clebert Suconic 048f46bd4f ARTEMIS-1866 Fixing QuorumResultWaitTest 2018-07-10 22:13:48 -04:00
gtully d54e5a7868 ARTEMIS-1971 Support connection pooling in LDAPLoginModule 2018-07-06 13:53:29 -05:00
gtully 2ff4faab05 ARTEMIS-1970 Clean up LDAP connection in JAAS login module 2018-07-06 13:39:34 -05:00
17103355 7a76d95e60 ARTEMIS-1959 server startup failure caused by './artemis data print' 2018-07-02 13:06:41 -05:00
Francesco Nigro 60c586a64c ARTEMIS-1951 Fix NPE on updateQueue with NULL user 2018-07-02 11:18:16 -05:00
andytaylor f288cfc9ca ARTEMIS-1866 - Make wait time for reply configurable once vote goes out to acquire a quorum
Im refactoring a lot of this original fix as it has broken API compatibilty by removing a default constructor.

Also it should be set via a setter.

https://issues.apache.org/jira/projects/ARTEMIS/issues/ARTEMIS-1866
2018-07-02 12:25:01 +01:00
Michael André Pearce c7c23454e8 ARTEMIS-1951 allow queue's user to be updated
Fix so that it only updates if not null, to avoid user being unset from existing api's, 
This is similar to other values, that only change the value when not null.
2018-06-29 13:38:27 -05:00
Justin Bertram f9af366f07 ARTEMIS-1951 fix comparison bug 2018-06-23 11:57:38 -05:00
Justin Bertram 754a263328 ARTEMIS-1951 allow queue's user to be updated 2018-06-22 10:38:05 -04:00
Justin Bertram 2ed8a5764b ARTEMIS-1947 return metadata in JSON session mgmnt ops 2018-06-20 17:18:03 -04:00
Francesco Nigro e035487a5f ARTEMIS-1945 InVMNodeManager shared state should be volatile
State access should be atomic to be visibile between
different threads.
2018-06-20 11:02:23 -04:00
Justin Bertram 57ed5b0530 ARTEMIS-1926 refactor SSLSupport 2018-06-18 16:15:13 -04:00
Justin Bertram 7df3bcecef Revert "[ARTEMIS-1819] Missing fields on listAllConsumersAsJSON, listConsumersAsJSON and listConnectionsAsJSON"
This reverts commit c3fbd1b9e4.

Based on the discussion on the PR
https://github.com/apache/activemq-artemis/pull/2035 this shouldn't have
been merged. It's importing JMS-specific code into the core broker which
is something we've worked hard to eliminate in recent releases.
2018-06-18 16:08:11 -04:00
gtully f10c64fc87 ARTEMIS-1942 replace properties removed in error from internal config map 2018-06-18 15:01:36 -04:00
Clebert Suconic 88833c790a ARTEMIS-1927 treat exceptions and disconnect properly
I couldn't do this with a test as this is dependent on windows. Regular testsuite should be sufficient as long as you run in Windows.
2018-06-12 18:54:45 -04:00
yang wei 1d5128839f ARTEMIS-1923 fix constructing binding journalimpl bug
Clebert Suconic ammended this commit by adding a test and getter properties to satisfy the test

This closes #2133
2018-06-12 12:30:25 -04:00
Clebert Suconic de0747a9a4 ARTEMIS-1920 AMQP throw NPE if can't find a backup server 2018-06-08 17:42:37 -04:00
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
Clebert Suconic af56b67e38 [maven-release-plugin] prepare for next development iteration 2018-05-16 11:03:26 -04:00
Clebert Suconic bcaa11c2ee [maven-release-plugin] prepare release 2.6.0 2018-05-16 11:03:14 -04: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