Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

By default, all the messages published to WSO2 Message Broker will be are persistent, i.e messages that is, they are stored in the Apache Cassandra Message Store permanent message store before they are delivered back. There can be instances where it is useful to have an If you need to improve performance, you can use in-memory mode (with non-persistent messages) where latency to write to and read from Permanent Message Store is not come into play. Thus the message publishing and message consuming is fast when using this mode.When using in-memory mode it so that messages are stored in memory instead of persisted in the message store. It is vital to keep the memory usage in a manageable level.  Thus at a manageable level, so this mode can is only be recommended for small messages that are quickly published fast and consumed fast. 

There is no way to define non-persistent or persistent at message level using JMS way in WSO2 MB currently. It is only a setting at broker which you need to define as a configuration before starting WSO2 Message Broker Server.

To enable In-Memory mode, open

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.

To enable in-memory mode:
  1. Open <MB_HOME>/repository/conf/advanced/qpid-config.xml

...

  1. for editing.
  2. Configure the InMemoryMode parameter and clustering setting as follows:
Code Block
languagehtml/xml
<broker>
...
   <InMemoryMode>true</InMemoryMode>

Note that In-Memory mode is only supported for standalone mode, i.e when above mode is enabled "clustering" should be disabled (configuration resides at the same qpid-config configuration file).

Code Block
languagehtml/xml
<broker>
...
   <clustering>
   <enabled>false</enabled>