Microservices

Object Store Connector in Mule4

Object Store Connector in Mule4 allows you to save data as a key-value pair and access it later for any transformation or condition logic. The Object Store is primarily used to store watermarks, access tokens, and user information as a key-value pair.

Mule Runtime uses Object Stores to support some of its own components, for example:

  • The Cache module uses an Object Store to maintain all of the cached data.
  • The OAuth module (and every OAuth enabled connector) uses Object Stores to store the access and refresh tokens.
  • By default, each Mule app has an Object Store that is persistent and always available to the app without any configuration.
  • Flows can use it to persist and share data.

Types of Object Store:

  • Persistent: This is the default option for the ObjectStore. By using this option, stored data stays in the system even if the system or its runtime is down.
  • In-Memory: Though this functionality is not available explicitly, it can be selected. By not selecting the persistent option, ObjectStore, by default, becomes in-memory.

Mule4 has an inbuilt connector for Object Store. Object Store Connector in Mule4 provides 7 types of operation:

  1. Store:  Stores the given value using the given key.
  2. Retrieve: Retrieves the value stored for the given key. If there is no key with the given name then the default value is returned.
  3. Retrieve all keys:  Returns a list of all keys that the object store currently holds values for.
  4. Retrieve all: Retrieves all the key-value pairs present in the object-store.
  5. Contains: Checks if there is any value exists to the given key. If no value exists for the key, then false is returned.
  6. Remove: Removes the value associated with the given key from the object-store.
  7. Clear: Clears all the contents in the store. It removes all the content (keys and values) from the object-store.

Object Store Limitations:

  • Do not support transactional access or modification.
  • This is not alternative for Databases.

vasu34k

Recent Posts

Generative AI

Generative AI is a type of AI (such as ChatGPT) that can generate new forms…

5 months ago

Pair Programming

Pair programming is a software development technique in which two programmers work together at one…

5 months ago

AWS CodeWhisperer

Amazon recently released Amazon CodeWhisperer to the public. It is an AWS real-time AI code generator…

6 months ago

Multi-hop architecture Azure

Multi-hop architecture is a design approach for organizing data in the Delta warehouse. Multi-hop architectures…

9 months ago

MuleSoft Accelerators

MuleSoft Accelerators are predefined Mule applications, API specifications, and documentation that help to speed up the implementation life…

10 months ago

Introduction to OpenAPI

OpenAPI Specification also known as Swagger Specification is an API description format for REST APIs.…

1 year ago