This is an automated email from the ASF dual-hosted git repository. robbie pushed a commit to branch main in repository https://gitbox.apache.org/repos/asf/activemq-artemis.git
commit 7abfbb40d062d37dcc2c5b8cb545a1b57cf56562 Author: Justin Bertram <[email protected]> AuthorDate: Tue Sep 24 13:36:47 2024 -0500 ARTEMIS-5057 add docs for large-message-sync --- docs/user-manual/large-messages.adoc | 61 ++++++++++++++++++++++++++++-------- docs/user-manual/persistence.adoc | 2 -- 2 files changed, 48 insertions(+), 15 deletions(-) diff --git a/docs/user-manual/large-messages.adoc b/docs/user-manual/large-messages.adoc index 051cb3bc77..b3eb3073b7 100644 --- a/docs/user-manual/large-messages.adoc +++ b/docs/user-manual/large-messages.adoc @@ -2,35 +2,70 @@ :idprefix: :idseparator: - -Apache ActiveMQ Artemis can be configured to store messages as files when these messages are beyond a configured value. - -Instead of keeping these messages in memory ActiveMQ Artemis will hold just a thin object on the queues with a reference to a file into a specific folder configured as large-messages-directory. +Apache ActiveMQ Artemis can be configured to give special treatment to messages which are beyond a configured size. +Instead of keeping the entire contents of these messages _in memory_ the broker will hold just a thin object on the queues with a reference to the content (e.g. in a file or a database table). This is supported on Core Protocol and on the AMQP Protocol. == Configuring the server -Large messages are stored on a disk directory on the server side, as configured on the main configuration file. - +When using the xref:persistence.adoc#file-journal-default[file journal] large messages are stored on disk on the server. The configuration property `large-messages-directory` specifies where large messages are stored. -For JDBC persistence the `large-message-table` should be configured. [,xml] ---- -<configuration xmlns="urn:activemq" - xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:schemaLocation="urn:activemq /schema/artemis-server.xsd"> - <core xmlns="urn:activemq:core" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="urn:activemq:core"> +<configuration...> + <core...> ... - <large-messages-directory>/data/large-messages</large-messages-directory> + <large-messages-directory>data/large-messages</large-messages-directory> ... </core> </configuration> ---- -By default the large message directory is `data/largemessages` and `large-message-table` is configured as "LARGE_MESSAGE_TABLE". +By default `large-messages-directory` is `data/largemessages`. + +[NOTE] +==== +For the best performance we recommend using the file journal with the large messages directory on a different physical volume to the message journal or paging directory. +==== + +For xref:persistence.adoc#jdbc-persistence[JDBC persistence] the `large-message-table` should be configured. + +[,xml] +---- +<configuration...> + <core...> + ... + <store> + <database-store> + ... + <large-message-table-name>LARGE_MESSAGES_TABLE</large-message-table-name> + ... + </database-store> + </store> + ... + </core> +</configuration> +---- + +By default `large-message-table` is `LARGE_MESSAGE_TABLE`. + +By default when writing the final bytes to a large message all writes are synchronized to the storage medium. +This can be configured via `large-message-sync`, e.g.: + +[,xml] +---- +<configuration...> + <core...> + ... + <large-message-sync>true</large-message-sync> + ... + </core> +</configuration> +---- -For the best performance we recommend using file store with large messages directory stored on a different physical volume to the message journal or paging directory. +By default `large-message-sync` is `true`. == Configuring the Core Client diff --git a/docs/user-manual/persistence.adoc b/docs/user-manual/persistence.adoc index 8f006a6b67..edaab5c87a 100644 --- a/docs/user-manual/persistence.adoc +++ b/docs/user-manual/persistence.adoc @@ -294,8 +294,6 @@ The Apache ActiveMQ Artemis JDBC persistence layer offers the ability to store b [NOTE] ==== - - Using the ActiveMQ Artemis File Journal is the *recommended* configuration as it offers higher levels of performance and is more mature. Performance for both paging and large messages is especially diminished with JDBC. The JDBC persistence layer is targeted to those users who _must_ use a database e.g. due to internal company policy. --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected] For further information, visit: https://activemq.apache.org/contact
