Commit Graph

1722 Commits

Author SHA1 Message Date
yang wei dbbd94bd51 ARTEMIS-1949 fix IllegalMonitorStateException during shutdown 2018-12-13 14:03:01 -06:00
Romain Pelisse 39b177d027 ARTEMIS-2085 - Improve validation of MDB activation config properties values 2018-12-13 11:14:37 -06:00
Jiri Danek 56c7fb1a95 NO-JIRA Add forgotten @Test annotation and make helper methods private 2018-12-13 10:53:34 -06: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 8a46c3ee16 ARTEMIS-2189 allow deleting temp dest when session is closed 2018-12-06 17:03:58 +01:00
Justin Bertram 3c595f18d5 ARTEMIS-2179 mgmnt method to get cluster-cxn names 2018-12-06 16:45:35 +01:00
Justin Bertram 2898384591 NO-JIRA fix QueueControlUsingCoreTest 2018-11-15 20:17:55 -05:00
Justin Bertram e81453e660 ARTEMIS-2140 queue creation race w/AMQP shared subs 2018-11-14 10:49:15 -05:00
Clebert Suconic d6ffa8b426 NO-JIRA fix on JMSBridgeTestBase 2018-11-14 10:43:20 -05: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
Šmucr Jan 6d0641b438 ARTEMIS-2169 allow config of JMX RMI registry port
Previously the port was always random. This caused problems with
remote JMX connections that needed to overcome firewalls. As of
this patch it's possible to make the RMI port static and whitelist
it in the firewall settings.
2018-11-09 10:04:13 -06:00
Justin Bertram c2188aa058 ARTEMIS-2127 Add auth details to consumer created notification 2018-11-08 23:56:51 +00:00
Clebert Suconic 6bdff442ab NO-JIRA fixing tests 2018-11-08 23:45:32 +00:00
Justin Bertram 2e53d8f5fb ARTEMIS-1929 race in STOMP w/identical durable subs 2018-11-08 07:55:29 +08: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 b71c144891 ARTEMIS-2100 address routing-type overridden on attaching AMQP sender
AMQPSender has to honor an already existing multicast routingType
of an address while attempting to create a fresh new queue on it
2018-11-05 10:50:28 +00: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
Clebert Suconic 2f52e3ce2a Revert "ARTEMIS-2100 address routing-type overridden on attaching AMQP sender"
There are too many failures because of the semantic change here.

This reverts commit 1c17a4d59d.
2018-11-01 14:24:52 -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
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
Michael André Pearce 99a3f17aa0 NO-JIRA Move JMS_SESSION_CLIENT_ID_PROPERTY to JMS module
Remove JMS specifics from CORE, that are not used in broker
2018-10-30 16:22:44 -04:00
Francesco Nigro 1c17a4d59d ARTEMIS-2100 address routing-type overridden on attaching AMQP sender
An already existing address routing type should be taken
in consideration while chosing which routing type use when none
is configured
2018-10-30 16:22:10 -04:00
Justin Bertram 2a894cbe27 ARTEMIS-2155 disconnect on failure to handle packet 2018-10-30 16:17:08 -04:00
Clebert Suconic 558bb477f1 NO-JIRA Adding Test to validate OpenWire and Fail flow control 2018-10-30 11:47:37 -04:00
sebthom d7aa9e5077 ARTEMIS-2141 Add Filter column to Consumers View of AdminUI 2018-10-29 20:42:05 +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
Howard Gao f4c93a2860 ARTEMIS-2135 Test multiple core consumers receiving amqp messages
This test can verify an issue fixed by the commit:
7a463f038a (ARTEMIS-2096)

The issue was reported later by users where messages
sent by amqp clients are having their body size
randomly being zero when received by multiple core
consumers.

This was also fixed on commit  48e0fc8f42 but that
was exclusively on 2.6.x branch.
2018-10-23 10:52:50 -04:00
Francesco Nigro 2967df6a99 ARTEMIS-1996 MappedSequentialFileFactory may cause DirectByteBuffer off-heap memory leaks
Compaction is now reusing direct ByteBuffers on both
reading and writing with explicit and deterministic
release to avoid high peak of native memory utilisation
after compaction.
2018-10-22 09:16:15 +02: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
gtully 202ae262d3 ARTEMIS-2103 - fix up test to reflect full consumer queue name in the fqqn queue 2018-10-11 17:05:32 +01:00
andytaylor d8c34dd3d7 NO-JIRA - fixing up some broken tests
updated tests that rely on logging id's
2018-10-11 10:25:14 +01:00
yang wei 8f4bd7c621 ARTEMIS-2102 delete paging directory or table if address is removed 2018-10-10 18:50:11 -04:00
gtully b812bfdbed ARTEMIS-2103 - use the full openwire consumer queue for the mapped virtual topic queue binding, fix and test 2018-10-10 18:48:11 -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
Michael André Pearce 8c6322deed ARTEMIS-2094 Only deploy reloadable config if reloaded. 2018-10-10 14:19:52 -04:00
andytaylor a1896c4c53 NO-JIRA - fixing up some broken tests
Some tests were added to a class that was extended, Ive moved these into their own class
2018-10-10 11:00:59 +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
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
Timothy Bish a851a8f93f ARTEMIS-2096 Refactor AMQMessage abstraction
Major refactoring of the AMQPMessage abstraction to resolve
some issue of message corruption still present in the code and
improve the API handling of message changes and re-encoding.

Improves handling of decoding of message sections limiting the
work to only the portions needed and ensuring the state data
is always updated with what has been done.  Fixes issues of
corrupt state on copy of message or other changes in filters.
2018-09-26 09:19:40 -04:00
Justin Bertram 9c62531c2f ARTEMIS-1961 track routed and unrouted messages sent to an address 2018-09-25 18:07:32 -04:00
Francesco Nigro 3112b4f3db ARTEMIS-2093 NPE thrown by NettyConnector::createConnection
Given that NettyConnector::createConnection isn't happening on the
channel's event loop, it could race with a channel close event, that
would clean the whole channel pipeline, leading to a NPE while
trying to use a configured channel handler of the pipeline.
2018-09-21 15:06:53 +02:00
yang wei d868563e7b ARTEMIS-2092 fix first page messages lost on server crash bug 2018-09-19 16:19:45 -04:00
Francesco Nigro cfa3290209 ARTEMIS-2090 JDBC Journal is not deleting TX records
JDBCJournalImpl::cleanupTxRecords is not committing
the deleteJournalTxRecords statement leaving the
TX records into the journal
2018-09-19 15:32:03 -04:00
Justin Bertram c60d17884a ARTEMIS-1919 implement SNI properly 2018-09-18 08:00:05 +01:00
Roddie Kieley 50b18dfbbc NO-JIRA: ScaleDownTest checkstyle error fix
Empty space removed that produced a checkstyle error.
2018-09-17 14:53:22 -04: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
Clebert Suconic 6361079aa0 ARTEMIS-2084: Failover will not work with network cable disconnect on core protocol 2018-09-12 19:59:00 -04:00
Timothy Bish 5dbd0a74d2 NO-JIRA Fix condition timeouts to avoid spurious failures
The waits for expiration are set at the same value as the expiration
interval default to in the test support setup so on some runs there is a
race when waiting for the message to expire and the expiry task.
2018-09-12 16:48:28 -04:00
Clebert Suconic 5d69e3594f ARTEMIS-2074 Fixing RA properties 2018-09-12 16:47:24 -04:00
Clebert Suconic d2d9a0e634 ARTEMIS-2074 URI not transposing ServerLocator on ConnectionFactory
This closes #2286
As it superceedes it
2018-09-11 17:04:01 -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
Timothy Bish e065e3e960 ARTEMIS-2082 Reset buffer valid flag after re-encoding the message
Once a re-encode of the message is done the buffer is not being marked
as valid and so subsequent checks on the buffer are all assuming the
message data is not valid and re-encoding over and over.  This can lead
to poor performance in some cases and corrupted data in others.
2018-09-11 15:45:51 -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 07aa0f732c NO-JIRA rename queue in test to avoid collision
Avoids issue with other tests that could persist same queue name, making intermittent failure.
2018-09-08 02:26:38 +01: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
andytaylor f4b77a2cb4 ARTEMIS-2073 - make sure connection gets set for interceptors
https://issues.apache.org/jira/browse/ARTEMIS-2073
2018-09-04 12:54:21 -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
Clebert Suconic 93cffedcba ARTEMIS-2023 Avoiding boolean on every message for 1x and tests 2018-08-30 14:29:58 -04:00
Martyn Taylor 9a855e18e1 ARTEMIS-2055 Lock LM on PacketHandler on clear 2018-08-29 13:40:19 -04:00
Clebert Suconic 34fa0dded6 ARTEMIS-2052 Fixing initial credit negotiation 2018-08-29 13:37:48 -04:00
Timothy Bish 34254095c8 ARTEMIS-2057 Fix runaway credit grants
Ensure the broker looks at local receiver credit when checking for
credit top off threshold and then do a proper top off back to the high
water mark to sync with how client receivers manage their credit.
2018-08-28 12:45:31 -04:00
Justin Bertram ad7c0ea12d ARTEMIS-2060 OpenSSL tests broken after Netty upgrade 2018-08-28 11:02:45 -05:00
Clebert Suconic a8dad35031 ARTEMIS-2055 fixing checkstyle 2018-08-28 10:35:36 -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
Timothy Bish 2c7896cef6 ARTEMIS-1938 Update Qpid JMS along with Proton and Netty
Update the Qpid JMS and Proton dependencies to lastest and sync Netty
with the 4.1.28.Final version used by Qpid JMS to avoid clash that
breaks a test.  Adds override of new Proton-J WritableBuffer API that
allows it to use the Netty String encoder when needed instead of the
slower default version.

Update Qpid JMS to v0.36.0
Proton-J to v0.29.0
Netty to 4.1.28.Final
2018-08-25 07:22:53 +01:00
Carsten Lohmann 95ec8ea433 ARTEMIS-2044 Add onSendException, onMessageRouteException to ActiveMQServerMessagePlugin 2018-08-24 21:35:34 +01:00
Clebert Suconic 55b0d5b0ea ARTEMIS-2047 Compatible option for ActiveMQJMSClient 2018-08-21 22:05:29 -04: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
Justin Bertram e6dddf8231 NO-JIRA Tweak RedeployTest
1) Remove use of deprecated EmbeddedJMS.
2) Change test config to use static clustering as discovery may not work
in some CI environments.
2018-08-17 15:27:07 -04:00
Justin Bertram a0b4c4dd19 ARTEMIS-2023 extend 1x naming to other ops 2018-08-16 20:57:11 +01:00
Clebert Suconic 94e34febf6 ARTEMIS-2023 small tweak on test. Server not needed 2018-08-14 12:45:00 -04:00
Clebert Suconic 71e664a705 ARTEMIS-2023 test showing NPE 2018-08-14 12:40:30 -04:00
Clebert Suconic 99d091a0ea ARTEMIS-2030 only use interrupt during shutdown on RA 2018-08-13 20:40:34 -04:00
Clebert Suconic 87fdff51e1 ARTEMIS-2029 Fixing wire checks after reconnects 2018-08-13 18:24:09 -04:00
Clebert Suconic 4dd116ee04 NO-JIRA fixing broken test 2018-08-13 18:10:24 -04:00
Martyn Taylor ad6db74701 ARTEMIS-2024 Enable SharedClientID on ConnectionFactory 2018-08-13 20:41:54 +01:00
Justin Bertram df583922f5 ARTEMIS-2023 Support 1x prefixes for JMS dests created using session
In some cases users who migrate from 1.x to 2.x may still want to keep
the legacy prefixes for their JMS destinations (i.e. "jms.queue.",
"jms.topic.", etc.). This commit adds a boolean on our ConnectionFactory
implementation so that it will use the old prefixes when invoking the
queue/topic creation methods on the Session implementation.
2018-08-13 12:01:51 -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 e15917129f [ARTEMIS-2022] Create count messages 'group by' this property filter 2018-08-13 08:37:56 +01:00
Martyn Taylor d6d73c7f23 ARTEMIS-2025 Ensure correct calculation of message body size 2018-08-12 16:33:49 -04:00
Howard Gao e15f3901e4 ARTEMIS-2013 Can't create durable subscriber to a composite topic
An OpenWire client can use a compound destination name of the form
"a,b,c..." and consume from, or subscribe to, multiple destinations.
Such a compound destination only works for topics when the subscriber
is non-durable. Attempting to create a durable subscription on a
compound address will end up with an error.

The cause is when creating durable subs to multiple topics/addresses
the broker uses the same name to create internal queues, which
causes duplicate name conflict.
2018-08-09 19:38:36 -04:00
Justin Bertram 1171f01b30 ARTEMIS-2020 Use prefixes when useJNDI=false in RA 2018-08-09 19:35:27 -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
Robbie Gemmell b0c65ba2dd ARTEMIS-1978: update to proton-j 0.27.3 to resolve sequencing issues
Adds test exposing broker behaviour from issues stemming from PROTON-1892 and PROTON-1901
2018-08-08 14:27:42 -04:00
Francesco Nigro 8dd0e9472f ARTEMIS-1999 Broker uses 100% core's CPU time if msg grouping is used
The deliver loop won't give up trying to deliver messages when
back-pressure kicks in (credits and/or TCP) if msg grouping is used and
there are many consumers registered: this change will allow the loop
to exit by instructing the logic that the group consumer is the only
consumer to check.
2018-08-08 17:37:58 +01:00
Jiri Danek 8274703153 NO-JIRA improve assertions in QueueControlTest
This commit replaces assert{True,Equals} with more specific assertion methods.
2018-08-08 11:35:14 -04:00
Jiri Danek 05816fefab NO-JIRA fix unused parameter `durable` in AmqpClientTestSupport#sendMessages 2018-08-08 11:35:14 -04:00
Jiri Danek c1a191c547 ARTEMIS-2016 fix flaky test QueueControlTest#testRemoveAllWithPagingMode
Parameters going into Wait.waitFor were originally wrong, because
`durationMillis: 3, sleepMillis: 100` means you would test the condition
only once. This commit is changing the durationMillis from 3ms to 3s,
swapping the two numbers (duration 100ms, sleep 3ms) would also be reasonable, I think.

Next, Wait.assertEquals is here being used, instead of Assert.assertTrue.

I saw the test fail only once, and never was able to reproduce it again,
but I think this commit does improve the test and so it is worthwhile.

    java.lang.AssertionError
		at org.apache.activemq.artemis.tests.integration.management.QueueControlTest.assertMetrics(QueueControlTest.java:2651)
	    at org.apache.activemq.artemis.tests.integration.management.QueueControlTest.assertMessageMetrics(QueueControlTest.java:2615)
    	at org.apache.activemq.artemis.tests.integration.management.QueueControlTest.testRemoveAllWithPagingMode(QueueControlTest.java:1554)
2018-08-08 11:33:31 -04:00
Jiri Danek fed0426ff3 NO-JIRA fix flaky tests QueueControlTest#testResetMessagesExpired
The occasional assertion error is prevented by using Wait.assertEquals
where Assert.assertEquals was used previously.

    java.lang.AssertionError:
    Expected :1
    Actual   :0
    [...]
    	at org.junit.Assert.assertEquals(Assert.java:542)
	    at org.apache.activemq.artemis.tests.integration.management.QueueControlTest.testResetMessagesExpired(QueueControlTest.java:2370)
2018-08-08 11:31:23 -04:00
Jiri Danek c6521e0700 NO-JIRA fix flaky tests QueueControlTest#testChangeMessagePriority{,WithInvalidValue}
The occasional assertion error is prevented by using Wait.assertEquals
where Assert.assertEquals was used previously.
2018-08-08 11:31:23 -04:00
Jiri Danek 23a30b6158 NO-JIRA fix flaky test QueueControlTest#testResetMessagesAdded
The occasional assertion error is prevented by using Wait.assertEquals
where Assert.assertEquals was used previously.

I did not observe the timing issue on all asserts (only on the first
two), but there is no harm in replacing them all.

    java.lang.AssertionError:
    Expected :2
    Actual   :1
2018-08-08 11:31:23 -04:00
Jiri Danek fbb622ae69 NO-JIRA fix flaky test QueueControlTest#testListMessagesWithNullFilter
The below error is prevented by using Wait.assertEquals
where Assert.assertEquals was used previously.

    java.lang.AssertionError:
    Expected :2
    Actual   :1
        [...]
    	at org.junit.Assert.assertEquals(Assert.java:542)
    	at org.apache.activemq.artemis.tests.integration.management.QueueControlTest.testListMessagesWithNullFilter(QueueControlTest.java:804)
2018-08-08 11:31:23 -04:00
Jiri Danek 5c2f79ed45 NO-JIRA fix flaky test QueueControlTest#testListMessagesWithEmptyFilter
The below error is prevented by using Wait.assertEquals
where Assert.assertEquals was used previously.

    java.lang.AssertionError:
    Expected :2
    Actual   :1
        [...]
        at org.apache.activemq.artemis.tests.integration.management.QueueControlTest.testListMessagesWithEmptyFilter(QueueControlTest.java:827)
2018-08-08 11:31:23 -04:00
Justin Bertram 1b15f95554 ARTEMIS-2014 fix directory name in test 2018-08-08 09:55:40 -05:00
Justin Bertram 0ae7d32532 ARTEMIS-2014 Treat inability to create directory for paging as critial 2018-08-07 11:09:46 -05:00
Justin Bertram 7d14c06dd9 ARTEMIS-1947 fix tests 2018-08-06 11:14:57 -04: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
Shailendra Kumar Singh 3c5b050dff [ARTEMIS-2008]Add a CLI command to purge queue 2018-08-03 14:19:47 -04: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
Jiri Danek cb99b4a666 NO-JIRA fix flaky test HeuristicXATest.testRecoverHeuristicCommitWithRestart
The below error is prevented by adding Wait.assertEquals,
where Assert.assertEquals was used previously. Timeout is
set to small increments, since we rarely need to wait more
than 100 ms for the condition to become true.

java.lang.AssertionError: expected:<1> but was:<0>
	at org.junit.Assert.fail(Assert.java:88)
	at org.junit.Assert.failNotEquals(Assert.java:743)
	at org.junit.Assert.assertEquals(Assert.java:118)
	at org.junit.Assert.assertEquals(Assert.java:555)
	at org.junit.Assert.assertEquals(Assert.java:542)
	at org.apache.activemq.artemis.tests.integration.client.HeuristicXATest.doRecoverHeuristicCompletedTxWithRestart(HeuristicXATest.java:306)
	at org.apache.activemq.artemis.tests.integration.client.HeuristicXATest.testRecoverHeuristicCommitWithRestart(HeuristicXATest.java:251)
2018-08-03 14:11:02 -04:00
Clebert Suconic a92324be35 NO-JIRA Fixing MultiThreadAsynchronousFileTest on limited servers
This test was initializing a libaio of 21K, that would fail on limited servers.
This is decreasing maxIO so it would requires less resources to run it.
2018-08-03 13:09:41 -04: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
Howard Gao 983232d273 ARTEMIS-1995 Client fail over fails when live shut down too soon
In a live-backup scenario, if the live is restarted and shutdown too soon,
the client have a chance to fail on failover because it's internal topology
is inconsistent with the final status. The client keeps connecting to live
already shut down, never trying to connect to the backup.

It's a porting from HORNETQ-1572.
2018-07-31 14:21:45 -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
JiriOndrusek 993499daaf [ARTEMIS-1986] PagingTest#testDeletePhysicalPages will fail if a record about deleting a page is not saved in journal 2018-07-25 08:37:19 -04:00
Justin Bertram d35f01d25d ARTEMIS-1954 eliminate all possible usage of JMSServerManager 2018-07-12 14:24:44 -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
Clebert Suconic 2a30b291be ARTEMIS-1966 Improving SharedNothingReplicationFlowControlTest
Tests should always extend ActiveMQTestBase whenever is possible.
This is because there are a few rules to avoid thread leakages.
The test was also leaking an executor and I believe it was
not always stopping the servers, which I fixed here.
2018-07-12 13:49:17 -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
Clebert Suconic be8c29d4e1 NO-JIRA Improve SpawnVMCheck 2018-07-12 16:51:35 +02:00
Clebert Suconic a1d34f5631 NO-JIRA Adding missing check on ClientCrashTest 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
Timothy Bish a63b0315c4 ARTEMIS-1941 Preserve AMQP body section type on "large" messages
When "large" messages are converted to / from core in order to be stored
in the large message store the type of the AMQP body section is being
lost and reconstituted incorrectly in some cases.  The message needs to
be annotated with the original AMQP type for the body and that used to
manage the conversion back to AMQP from Core.
2018-07-02 13:58:45 -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
Justin Bertram f9af366f07 ARTEMIS-1951 fix comparison bug 2018-06-23 11:57:38 -05:00
Clebert Suconic 901e5c4a98 NO-JIRA Improving ExpiryMessageTest 2018-06-23 10:33:33 -04:00
Clebert Suconic efd966d88d ARTEMIS-1928 Fixing body conversion of LargeMessages to AMQP 2018-06-22 15:48:15 -04:00
Justin Bertram 1ed7a616ee ARTEMIS-1930 require STOMP durable sub name to unsubscribe 2018-06-22 15:47:14 -04:00
Clebert Suconic 4f0bb98667 NO-JIRA Adding Redistribution & Loadbalancing test with AMQP 2018-06-22 14:30:35 -04: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
Clebert Suconic 6f72e0b4e5 ARTEMIS-1924 small tweaks on HeartBeat test 2018-06-20 11:26:59 -04:00
Clebert Suconic 69d9b6094a ARTEMIS-1924 Test consumer cleanup after socket connection reset 2018-06-19 17:54:20 -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