By default, all messages published to WSO2 Message Broker are persistent, that is, they are stored in the Apache Cassandra permanent message store before they are delivered back. If you need to improve performance, you can use in-memory mode so that messages are stored in memory instead of persisted in the message store. It is vital to keep the memory usage at a manageable level, so this mode is only recommended for small messages that are quickly published and consumed.
You enable in-memory mode at the Message Broker level, not at the message level, and must restart the Message Broker server after configuring it. In-memory mode is supported for standalone configurations only, so you must ensure that clustering is disabled when you enable in-memory mode.
InMemoryModeparameter and clustering setting as follows: