Hear from Salesforce leaders on how to create and deploy Agentforce agents.
Contact Us 1-800-596-4880

Mule Object Stores

An object store is a facility for storing objects in or across Mule applications. Mule uses object stores to persist data for eventual retrieval. Internally, Mule uses object stores in various filters, routers, and other message processors that need to store state between messages. In most cases, Mule creates and manages object stores automatically.

To learn about Object Store management in Runtime Manager, see Managing Application Data with Object Stores or more generally, Configuring an Object Store for Cache.

Note: To access and manipulate object stores in Mule applications, download the Object Store connectorLeaving the Site in Anypoint Studio.

Use Cases

You may explicitly configure an object store when configuring:

Mule provides two types of object stores:

  • In-memory store – stores objects in local Mule runtime memory. Objects are lost on shutdown of the Mule runtime.

  • Persistent store – Mule persists data when an object store is explicitly configured to be persistent. In a standalone Mule runtime, Mule creates a default persistent store in the file system. See also: About Persisting Object Stores in Runtime Manager

If you do not specify an object store, the default persistent object store is used.

For more information, see the Object Stores and Clustering section of the Cache Scope document.

Tip: The default object store created for all new caching strategies supports cluster mode out of the box, with the exception of the cache scope which uses the old default caching strategy.

XML Example

The following example demonstrates how to configure object stores in the following three situations:

  1. idempotent filter with an in-memory object store.

  2. idempotent filter with a persistent object store.

  3. Until a successful scope occurs with an in-memory object store.