Commit Graph

1195 Commits

Author SHA1 Message Date
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