Oleg Oleg Oleg Oleg - 1 year ago 100
Java Question

AMQ212015 Can't write records bigger than the bufferSize(501760) on the journal

During a posting ~9MB message to activeMQ Artemis, following exception is thrown:

* 0000000000 W 2017-05-26T17:08:41.003 P002280 T000266 M0701168824 -- AMQ212015: failover occurred during prepare rolling back org.apache.activemq.artemis.api.core.ActiveMQException: Can't write records bigger than the bufferSize(501760) on the journal, code:GENERIC_EXCEPTION


min-large-message-size is set to 21MB.

What can be a reason of such error and how to fix this?

Tried to set journal-type to NIO explicitly (as described in https://developer.jboss.org/thread/147168), but it did not help.

It's a WildFly 10.1 Final

Answer Source

Actually the reason of such exception is journal-buffer-size parameter, which is 490KB by default. Additionally, it is also required to set file-size attribute of a journal which should not be less than buffer size. For the WildFly, it is set up in messaging subsistem like folowing:

<journal buffer-size="SIZE_IN_BYTES" file-size="SIZE_IN_BYTES" />
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download