Chapter 36. Other Tuning Options

This section describes other places in JBoss EAP messaging that can be tuned.

  • Use asynchronous send acknowledgements.

    If you need to send non-transactional, durable messages and do not need a guarantee that they have reached the server by the time the call to send() returns, do not set them to be sent blocking. Instead use asynchronous send acknowledgements to get your send acknowledgements returned in a separate stream. However, in the case of a server crash, some messages might be lost.

  • Use pre-acknowledge mode.

    With pre-acknowledge mode, messages are acknowledged before they are sent to the client. This reduces the amount of acknowledgment traffic on the wire. However, if that client crashes, messages will not be redelivered if the client reconnects.

  • Disable security.

    There is a small performance boost when you disable security by setting the security-enabled attribute to false.

  • Disable persistence.

    You can turn off message persistence altogether by setting persistence-enabled to false.

  • Sync transactions lazily.

    Setting journal-sync-transactional to false provides better transactional persistent performance at the expense of some possibility of loss of transactions on failure.

  • Sync non-transactional lazily.

    Setting journal-sync-non-transactional to false provides better non-transactional persistent performance at the expense of some possibility of loss of durable messages on failure.

  • Send messages non-blocking.

    To avoid waiting for a network round trip for every message sent, set block-on-durable-send and block-on-non-durable-send to false if you are using JMS and JNDI, or set it directly on the ServerLocator by calling the setBlockOnDurableSend() and setBlockOnNonDurableSend() methods.

  • Optimize the consumer-window-size.

    If you have very fast consumers, you can increase the consumer-window-size to effectively disable consumer flow control.

  • Use the core API instead of the JMS API.

    JMS operations must be translated into core operations before the server can handle them, resulting in lower performance than when you use the core API. When using the core API, try to use methods that take SimpleString as much as possible. SimpleString, unlike java.lang.String, does not require copying before it is written to the wire, so if you reuse SimpleString instances between calls, you can avoid some unnecessary copying. Note that the core API is not portable to other brokers.