DZone
Thanks for visiting DZone today,
Edit Profile
  • Manage Email Subscriptions
  • How to Post to DZone
  • Article Submission Guidelines
Sign Out View Profile
  • Post an Article
  • Manage My Drafts
Over 2 million developers have joined DZone.
Log In / Join
Refcards Trend Reports
Events Video Library
Refcards
Trend Reports

Events

View Events Video Library

Related

  • Momento Migrates Object Cache as a Service to Ampere® Altra®
  • Why I Ditched Redis for Cloudflare Durable Objects in My Rate Limiter
  • Real-Object Detection at the Edge: AWS IoT Greengrass and YOLOv5
  • Monitoring and Managing the Growth of the MSDB System Database in SQL Server

Trending

  • Metal and Skins
  • Advanced Error Handling and Retry Patterns in Enterprise REST Integrations
  • Stop Choosing Sides: An Engineering Leader's Framework for Build, Buy, and Hybrid AI Agents in 2026
  • Your AI Is Not Failing, Your Context Is
  1. DZone
  2. Coding
  3. Languages
  4. Working With Object Store in Mule, Part 1

Working With Object Store in Mule, Part 1

In this first part of this series, we explore the concept of object stores and persistent stores, and how they relate to Mule apps.

By 
Ankit Lawaniya user avatar
Ankit Lawaniya
·
Feb. 03, 18 · Analysis
Likes (10)
Comment
Save
Tweet
Share
11.1K Views

Join the DZone community and get the full member experience.

Join For Free

Mule Object Store

An Object Store Connector is one of the most useful connectors provided in the Mule runtime. It is used for storing the state of the application and can be shared across applications. Mule uses object stores whenever it needs data to persist for later retrieval. It is a convenient way to store objects for later retrieval by key, essentially a key-value, store. By default, this is in-memory, but it can also be easily changed to persist to file.

Why Object Stores?

We often get the requirement where we need some application data to be used and shared across multiple applications. Though we can easily use a database for this purpose, where we have to query our DB to get this data, the disadvantage of this approach is whenever we need data we need to query our database. We can also use Object Store in Mule to make this a little easier.

Note: 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, so no user configuration is necessary.

How to Download Object Store Connector

To use the Object Store module in Anypoint Studio, we must first download the Object Store Connector from the Anypoint Exchange. Alternatively, you can install it from Anypoint Studio.

Download Connector from the Anypoint Exchange:

Image title

Download Connector through Anypoint Studio:

Image title

Use Cases

In most cases, Mule creates and manages object stores automatically, so no configuration is necessary. However, you may explicitly configure an object store in the following cases:

  • When configuring an idempotent message filter or until a successful scope occurs.

  • When configuring a custom component that must use an object store to persist information.

  • When storing or retrieving information from a Mule flow through the Object Store module, this is available as an extension.

Mule Provides Two Types of Object Stores:

  • In-memory store –  Stores objects in local Mule runtime memory. Objects are lost on the shutdown of the Mule runtime. Prior to Mule 3.5.0, in-memory store was the default. As of Mule 3.5.0, persistent store is the default.

  • Persistent store – Mule persists data when an object store is explicitly configured to be persistent. Mule creates a default persistent store in the file system. In a standalone Mule runtime, Mule creates a default persistent store in the file system.

In the Next Post…

With these basics in mind, our next post, Working With Object Store in Mule - Part 2, we will see the operations supported by Object Store and how can we use them in an application.

Hope this helps, thanks!

Keep learning!

Object (computer science)

Opinions expressed by DZone contributors are their own.

Related

  • Momento Migrates Object Cache as a Service to Ampere® Altra®
  • Why I Ditched Redis for Cloudflare Durable Objects in My Rate Limiter
  • Real-Object Detection at the Edge: AWS IoT Greengrass and YOLOv5
  • Monitoring and Managing the Growth of the MSDB System Database in SQL Server

Partner Resources

×

Comments

The likes didn't load as expected. Please refresh the page and try again.

  • RSS
  • X
  • Facebook

ABOUT US

  • About DZone
  • Support and feedback
  • Community research

ADVERTISE

  • Advertise with DZone

CONTRIBUTE ON DZONE

  • Article Submission Guidelines
  • Become a Contributor
  • Core Program
  • Visit the Writers' Zone

LEGAL

  • Terms of Service
  • Privacy Policy

CONTACT US

  • 3343 Perimeter Hill Drive
  • Suite 215
  • Nashville, TN 37211
  • [email protected]

Let's be friends:

  • RSS
  • X
  • Facebook