For storing Objects in or across Mule Applications, Batch Processes and Components, Object Stores are used. MuleSoft Object Store lets you store data in the form of key value pairs and get it stored & retrieved through MuleSoft Object Store Connector. In this MuleSoft Object Store V2 Tutorial, you will learn basics of Object Store and you will learn from the associated video tutorial, how to use Object Store V2 in your Mule 4 Applications.
MuleSoft Object Store Introduction
For your MuleSoft Applications, Object Store v2 is used to store data and states across batch processes, Mule components and applications, from within an application or by using the Object Store REST API in the form of Key Value Pairs.
While you can use Object Store functionality explicitly in your Mule Applications as per your use-cases; Mule also internally uses object stores in various filters, routers, and other message processors that need to store states between messages.
Mule 4 Object Store Connector
MuleSoft provides Object Store Connector which provides many useful operations that you can use to store & retrieve data from your Mule Applications in the Object Stores. MuleSoft Object Store Connector can be made available in your AnyPoint Studio by getting it from AnyPoint Exchange.
Currently Available Operations in Mule 4 Object Store Connector
The Clear Operation is used to completely remove all objects (key value pairs) from an Object Store.
The Contains operation is used to check if a value exists against a specific key in the Object Store or not.
The Remove operation is used to remove value against a specific key in the Object Store.
The Retrieve operation is used to get value from Object Store against a given Key.
- Retrieve All
Retrieve All operation is sued to get all Key Value Pairs from an Object Store.
- Retrieve All Keys
Retrieve All Keys operation returns a list of all available Keys in the Object Store.
Store Operation is used to store an object in the Object Store against a given Key.
Mule 4 Object Store V2 Tutorial: How to Store & Retrieve Data from Object Store
Watch below video tutorial on TutorialsPedia YouTube Channel where I have demonstrated an example scenario explaining how you can use Mule 4 Object Store Connector operations to store data in Object Store and then Retrieve Data from the Object Store.
Feel free to comment below if you have any ambiguities or any questions.