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
Over 2 million developers have joined DZone. Join Today! Thanks for visiting DZone today,
Edit Profile Manage Email Subscriptions Moderation Admin Console How to Post to DZone Article Submission Guidelines
View Profile
Sign Out
Refcards
Trend Reports
Events
View Events Video Library
Zones
Culture and Methodologies Agile Career Development Methodologies Team Management
Data Engineering AI/ML Big Data Data Databases IoT
Software Design and Architecture Cloud Architecture Containers Integration Microservices Performance Security
Coding Frameworks Java JavaScript Languages Tools
Testing, Deployment, and Maintenance Deployment DevOps and CI/CD Maintenance Monitoring and Observability Testing, Tools, and Frameworks
Culture and Methodologies
Agile Career Development Methodologies Team Management
Data Engineering
AI/ML Big Data Data Databases IoT
Software Design and Architecture
Cloud Architecture Containers Integration Microservices Performance Security
Coding
Frameworks Java JavaScript Languages Tools
Testing, Deployment, and Maintenance
Deployment DevOps and CI/CD Maintenance Monitoring and Observability Testing, Tools, and Frameworks

Modern Digital Website Security: Prepare to face any form of malicious web activity and enable your sites to optimally serve your customers.

Containers Trend Report: Explore the current state of containers, containerization strategies, and modernizing architecture.

Low-Code Development: Learn the concepts of low code, features + use cases for professional devs, and the low-code implementation process.

E-Commerce Development Essentials: Considering starting or working on an e-commerce business? Learn how to create a backend that scales.

Related

  • A Comprehensive Guide To Working With JSON in JavaScript
  • DDD and Microservices
  • JavaScript's Secret Weapon: Unraveling the Mysteries of Proxies
  • Understanding Git

Trending

  • Configuring Spark-Submit
  • How to Do a Risk Analysis Service in a Software Project
  • Building a Real-Time Slackbot With Generative AI
  • How To Set up a Push Notification Service in 30 Minutes or Less
  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.

Ankit Lawaniya user avatar by
Ankit Lawaniya
·
Feb. 03, 18 · Analysis
Like (10)
Save
Tweet
Share
10.4K 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

  • A Comprehensive Guide To Working With JSON in JavaScript
  • DDD and Microservices
  • JavaScript's Secret Weapon: Unraveling the Mysteries of Proxies
  • Understanding Git

Comments

Partner Resources

X

ABOUT US

  • About DZone
  • Send feedback
  • Careers
  • Sitemap

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 100
  • Nashville, TN 37211
  • support@dzone.com

Let's be friends: