To Use Object Store

Object Store v2 (OSv2) lets you share data and states across batch processes, Mule components, within a single application. You can also use object store as a distributed object store for advanced use cases such as API caching and API rate limiting.

OSv2 is enabled by default in the Anypoint Platform EU Control Plane and in Mule 4.

In Mule 3, enable OSv2 from Anypoint Platform > Runtime Manager for each application you want to access OSv2.

Note: To use OSv2, you must have an entitlement for this product. Contact your MuleSoft Sales representative for more information.


OSv2 consists of these components:

  • Object Store Connector

    Use with Anypoint Studio to construct flows to write to and read from the object store. You can install the Object Store connector using Anypoint Exchange from within Anypoint Studio. After installed, search Studio for "objectstore". The Object Store connector works with both Object Store version 1 and version 2. Use Studio to create an application that you deploy to Runtime Manager where the application runs and serves requests to read to and write from the object store.


    Lets you create and delete objects, set TTL (time to live) for objects, and set usage limits.

  • Runtime Manager

    When you enable object store, the Runtime Manager > Application Data setting changes its label to Object Store. From the object store interface, you can administer objects and their values in the object store. The interface also lets you delete object store objects.

To Install the Object Store Connector

  1. In Anypoint Studio, click the Exchange icon in the Studio task bar.

  2. Click Login in Anypoint Exchange.

  3. Search for this connector and click Install.

  4. Follow the prompts to install the connector.

When an updated version of a connector is released, Anypoint Studio displays the Updates Available popup in the bottom right corner of Studio. Click the popup and install the new version.

To Use Object Store Connector in an Application

  1. In Anypoint Studio, click File > New > Mule Project.

  2. Create a simple flow such as the following:

    Building Block


    HTTP connector

    Click Green Plus sign
    Host = All interfaces [] (Default)
    Port = 8081
    Click OK
    Path = /store
    Allowed Methods = POST

    Object to String

    No settings (use defaults)

    JSON to Object

    Return Class = java.util.Map

    Object Store connector

    Click Green Plus sign and click OK
    Operation = Store
    Key = #[payload.key]
    Value Reference = #[payload.value]

    Set Payload

    Settings = KEY: #[payload.key] AND VALUE: #[payload.value] WERE SAVED OK

    When done, the flow appears as:


  3. Save the application. Test run the application so you know it works. Right-click the canvas and click Run project <name>. If the application starts successfully, you can stop it. Right-click the canvas and click Stop project <name>.

  4. Right-click your application’s name in Anypoint Studio’s Package Explorer and click Anypoint Platform > Deploy to Cloud.

  5. At the User login window, specify your Anypoint Platform username and password, and click Sign In. If you don’t have an Anypoint Platform login, click Sign Up.

  6. In Runtime Manager:

    • Give the application a name. Each name is unique and becomes the URL under which your application is stored in Runtime Manager. The URL is in the form <application_name> Ensure the application name gets a green checkmark for proper naming and being unique.

    • Set the Runtime version to a version with OBJECT-STORE in the runtime name.

    • Click the Use Object Store v2 checkbox.

  7. After configuring your application, click Deploy Application.

  8. Runtime Manager prompts you to ensure you want to make this choice.

  9. Start your application.

When you choose a Runtime Version containing OBJECT-STORE in the version name, the Application Data label in the Runtime Manager navigation bar on the left side of the screen changes to Object Store.

To Send Data to an Object Store

From a command line prompt, use a utility to send JSON data to your Mule application. This can be a command such as curl, Postman, or a browser extension. For Windows, you can use Postman, curl, or cygwin.

For example:

curl -X POST -H "Content-Type: application/json" -d '{ "key": "TestKey01", "value": "This is an object store test" }' "http://<application_name>"

Change <application_name> to the name you chose when you deployed your application. Each time you submit this command, change the key’s name so that each key is unique.

To View Data in an Object Store

To view data in the Object Store:

  1. Log into Anypoint Platform and click Runtime Manager.

  2. Click the name of your application to view the application’s dashboard.

  3. Click Object Store from the left navigation bar:


    The Object Store user interface appears as follows:


    • The default Object Store name is DEFAULT_USER_STORE.

    • The default time to live (TTL) value is 14 days (1209600 seconds) and the maximum TTL is 30 days (2592000 seconds).

  4. Click the Object Store name. You can click a key name to view its value.

  5. To delete a key, hover over a key name, and click the trash can icon.