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
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" />