See information about the latest product version
Configuring the embedded global cache
Configure properties of the embedded global cache by using commands, WebSphere® Message Broker Explorer, an XML policy file, or the Message Broker API.
- For concept information, see Data caching overview.
- When you are using the global cache, increase the JVM heap size for execution groups that are hosting cache components. For more information, see the Planning environment capacity section of the WebSphere eXtreme Scale information center.
By default, the global cache is turned off, and the cache policy is set to disabled. To use the global cache, select a broker-level cache policy by using the cachePolicy parameter. The global cache has a default single-broker topology that can be used immediately without any configuration. To use the default topology, change the cache policy property to default. The broker sets a range of ports to use, but you can specify a particular range of ports. You can also specify the listener host that is used by the broker cache components. If your computer has more than one host name, setting the listener host ensures that the cache components use the correct host name.
When you use the default topology, execution group properties are read only; an error is issued if you try to change them. You can switch off the default topology by selecting a broker cache policy of none, and set properties explicitly for each execution group. For example, you might want to specify particular execution groups to host the catalog and container servers so that you can tune broker performance. The execution group properties that were set most recently by the broker-level policy are retained as a starting point for customization.
You can configure the global cache to span multiple brokers by providing an XML policy file. This policy file lists the brokers that share the cache, and for each broker specifies the listener host, port range, and the number of catalog servers hosted. You can use the policy file to set up a single broker that hosts two catalog servers. If one catalog server is lost, the broker switches to the other catalog server, ensuring that no cache data is lost.
To disable all cache components in the broker, set the cache policy property to disabled. Execution group properties are removed and cannot be changed. When the cache is enabled, the memory usage of execution groups that host cache components is larger. If this memory usage is an issue, and you do not need to use the global cache, set the cache policy property to disabled.
If you stop the execution group that contains the catalog server, the cache becomes unavailable. Therefore, if you switch off the default topology, ensure that you place the catalog server appropriately. If you restart the execution group that hosts the catalog server, it can no longer communicate with the container servers in other execution groups. Although these container servers are still running, they are no longer part of the cache, and your data is lost. Therefore, you must also restart the execution groups that host the container servers. Alternatively, restart the broker to reset all cache components.
- By using WebSphere Message Broker commands; see Configuring the embedded global cache by using commands.
- By using the WebSphere Message Broker Explorer; see Configuring the embedded global cache by using WebSphere Message Broker Explorer.
- By using a policy file; see Configuring the global cache for multiple brokers.
- By using the Message Broker API.
The cache manager properties are documented in the Javadoc for the Message Broker API (see Message Broker Java API.) You can also access the Javadoc for the Message Broker API through the Start menu at .