Mirror of Apache ActiveMQ Artemis
Go to file
Howard Gao d50f577cd5 ARTEMIS-1221 Duplicated ID causes LargeMessage lost at backup
When a large message is replicated to backup, a pendingID is generated
when the large message is finished. This pendingID is generated by a
BatchingIDGenerator at backup.

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

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

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

The solution to this is that instead of the backup generating
the pendingID, we make them all be generated in advance
at live server and let them replicated to backup whereever needed.
The ID generater at backup only works when backup becomes live
(when it is properly initialized from journal).
2017-06-29 00:03:47 +08:00
.mvn/wrapper ARTEMIS-613 Artemis build enhancements 2016-07-05 15:13:35 -04:00
.settings ACTIVEMQ6-1 - Initial HornetQ Donation Commit 2014-11-10 10:31:25 -06:00
artemis-boot [maven-release-plugin] prepare for next development iteration 2017-05-08 15:20:12 -04:00
artemis-cdi-client [maven-release-plugin] prepare for next development iteration 2017-05-08 15:20:12 -04:00
artemis-cli ARTEMIS-1253 Fixing NetworkHealthCheck being shutdown after failures 2017-06-26 16:15:39 -04:00
artemis-commons ARTEMIS-1253 Fixing NetworkHealthCheck being shutdown after failures 2017-06-26 16:15:39 -04:00
artemis-core-client ARTEMIS-1246 Fixing compatibility issue 2017-06-27 14:23:36 -04:00
artemis-core-client-all ARTEMIS-1129: Fixing tests after client all 2017-05-18 15:57:25 +01:00
artemis-distribution Spelling fixes 2017-05-30 10:32:41 +03:00
artemis-dto [maven-release-plugin] prepare for next development iteration 2017-05-08 15:20:12 -04:00
artemis-features [ARTEMIS-1196] Fix missing JSON support 2017-06-22 12:16:25 -04:00
artemis-jdbc-store ARTEMIS-1204 Replace open sync with AtomicBoolean 2017-06-26 18:41:21 +01:00
artemis-jms-client ARTEMIS-1255 Fixed authentication issues with XAConnectionFactory 2017-06-27 14:25:47 -04:00
artemis-jms-client-all ARTEMIS-1129: Fixing tests after client all 2017-05-18 15:57:25 +01:00
artemis-jms-server [ARTEMIS-1251] Log messages without prefixed id code in artemis-jms-server 2017-06-26 16:14:57 -04:00
artemis-journal ARTEMIS-1223 OutOfDirectMemoryError raised from TimedBuffer 2017-06-27 12:45:26 -04:00
artemis-junit [maven-release-plugin] prepare for next development iteration 2017-05-08 15:20:12 -04:00
artemis-maven-plugin [maven-release-plugin] prepare for next development iteration 2017-05-08 15:20:12 -04:00
artemis-native [maven-release-plugin] prepare for next development iteration 2017-05-08 15:20:12 -04:00
artemis-protocols ARTEMIS-1244 propagate retain flag of received message 2017-06-22 12:00:40 -04:00
artemis-ra ARTEMIS-1205: AMQP Shared Durable Subscriber incorrect behaviour 2017-06-19 12:44:13 +01:00
artemis-rest [ARTEMIS-1228] Log messages without prefixed id code in artemis-rest 2017-06-12 13:02:14 -05:00
artemis-selector [maven-release-plugin] prepare for next development iteration 2017-05-08 15:20:12 -04:00
artemis-server ARTEMIS-1221 Duplicated ID causes LargeMessage lost at backup 2017-06-29 00:03:47 +08:00
artemis-server-osgi [ARTEMIS-1259] Log messages without prefixed id code in artemis-server-osgi 2017-06-27 14:36:24 -04:00
artemis-service-extensions ARTEMIS-1189 - Fix checkstyle violations post checkstyle upgrade 2017-05-30 13:40:00 -04:00
artemis-tools ARTEMIS-1235 delete queues when broker.xml changes 2017-06-22 12:12:12 -04:00
artemis-web ARTEMIS-1253 Fixing NetworkHealthCheck being shutdown after failures 2017-06-26 16:15:39 -04:00
artemis-website [maven-release-plugin] prepare for next development iteration 2017-05-08 15:20:12 -04:00
docs NO-JIRA: Minor documentation fix 2017-06-22 16:12:01 -04:00
etc ARTEMIS-1189 - Fix checkstyle violations post checkstyle upgrade 2017-05-30 13:40:00 -04:00
examples ARTEMIS-1189 fixing checkstyle 2017-05-30 17:00:33 -04:00
integration/activemq-spring-integration [maven-release-plugin] prepare for next development iteration 2017-05-08 15:20:12 -04:00
scripts NO-JIRA: Adding script that will checkout a PR branch 2017-05-02 13:16:14 -04:00
tests ARTEMIS-1221 Duplicated ID causes LargeMessage lost at backup 2017-06-29 00:03:47 +08:00
.gitignore ARTEMIS-1129 Fixing tests after client all 2017-05-18 09:30:18 -04:00
.project More name changes to activemq 2014-11-19 16:01:54 -05:00
CMakeLists.txt ARTEMIS-163 First pass on the native AIO refactoring 2015-07-29 22:12:03 -04:00
LICENSE ARTEMIS-565 Replace json.org with javax.json 2016-07-25 21:44:57 -04:00
NOTICE NO-JIRA: update notice 2017-03-09 09:07:09 -05:00
README.md Adding OWASP reporting into pom 2016-09-13 17:06:25 +01:00
RELEASING.md NO-JIRA: small update on Releasing procedure 2017-05-08 14:52:27 -04:00
artemis_doap.rdf Update vendor to ASF 2015-05-30 08:37:28 +02:00
mvnw ARTEMIS-613 Artemis build enhancements 2016-07-05 15:13:35 -04:00
mvnw.cmd ARTEMIS-613 Artemis build enhancements 2016-07-05 15:13:35 -04:00
pom.xml [ARTEMIS-1196] Fix missing JSON support 2017-06-22 12:16:25 -04:00

README.md

ActiveMQ Artemis

This file describes some minimum 'stuff one needs to know' to get started coding in this project.

Source

For details about the modifying the code, building the project, running tests, IDE integration, etc. see our Hacking Guide.

Building the ASYNC IO library

ActiveMQ Artemis provides two journal persistence types, NIO (which uses the Java NIO libraries), and ASYNCIO which interacts with the linux kernel libaio library. The ASYNCIO journal type should be used where possible as it is far superior in terms of performance.

ActiveMQ Artemis does not ship with the Artemis Native ASYNCIO library in the source distribution. These need to be built prior to running "mvn install", to ensure that the ASYNCIO journal type is available in the resulting build. Don't worry if you don't want to use ASYNCIO or your system does not support libaio, ActiveMQ Artemis will check at runtime to see if the required libraries and system dependencies are available, if not it will default to using NIO.

To build the ActiveMQ Artemis ASYNCIO native libraries, please follow the instructions in the artemis-native/README.

Documentation

Our documentation is always in sync with our releases at the Apache ActiveMQ Artemis website.

Or you can also look at the current master version on github.

Examples

To run an example firstly make sure you have run

$ mvn -Prelease install

If the project version has already been released then this is unnecessary.

Each individual example can be run using this command from its corresponding directory:

$ mvn verify

If you wish to run groups of examples then use this command from a parent directory (e.g. examples/features/standard):

$ mvn -Pexamples verify

Recreating the examples

If you are trying to copy the examples somewhere else and modifying them. Consider asking Maven to explicitly list all the dependencies:

# if trying to modify the 'topic' example:
cd examples/jms/topic && mvn dependency:list

Open Web Application Security Project (OWASP) Report

If you wish to generate the report for CCV dependencies, you may run it with the -Powasp profile

$ mvn -Powasp verify

The output will be under ./target/dependency-check-report.html for each sub-module.