1.What are the flow processing strategies and their types?
Flow processing strategy determines how Mule implements message processing. Its types are:
- Synchronous
- Asynchronous
- Queued
- Queued Asynchronous
- Custom
- Thread-per-processor
- Non-Blocking
2. What is a Mule transformer?
Mule transformers prepare a message by altering its contents. You can use a prebuilt transformer for data conversion. For example, you can use an XML-to-Object transformer to convert an XML message to a Java object.
3. What are the configuration patterns provided by MuleSoft?
Configuration patterns make things easier to use. You have the following configuration patterns in MuleSoft:
- Bridge
- Validator
- WS Proxy
- Simple Service Pattern
- HTTP Proxy
4. List various the categories of Mule Processors
- Connectors
- Components
- Filters
- Routers
- Scopes
- Transformers
- Exception Strategies
- Business Events
5.What are the different types of variables in MuleSoft?
There are three primary variable types in MuleSoft:
There are three primary variable types in MuleSoft:
- Flow variable: Sets or removes variables tied to a message in the current flow.
- Record variable: Special variable used only inside Batch Jobs.
- Session variables: Sets or removes variables tied to a message in the entire lifecycle.
6.What are the different types of messages in MuleSoft?
There are three primary types of messages:
- Echo and log messages: Used for logging and moving messages from the inbound to outbound routers.
- Bridge messages: They are the passed messages from inbound to outbound routers.
- Build messages: Created from fixed or dynamic values.
7.How can we improve the performance of the Mule Application in MuleSoft?
Ways to improve the performance of Mule Applications:
- Data validation must be at the start of the flow
- Use of streaming for data processing.
- Non-repeatable stream: Cannot be read more than once or consumed simultaneously
- Repeatable in-memory stream: A new feature in Mule.
<file:read path="smallFile.json">
<repeatable-file-store-stream inMemorySize="10" bufferUnit="KB"/>
</file:read>
- Repeatable file stored stream: A new feature in Mule 4
<repeatable-in-memory-stream initialBufferSize="512" bufferSizeIncrement="256" maxInMemorySize="2000" bufferUnit="KB"/>
</file:read>
8. How can code in MuleSoft be optimized for memory efficiency?
To optimize the MuleSoft code:
FLOW SUBFLOW
It has a strategy for exception handling | It gets strategy for exception handling
sources that trigger execution exists, like HTTP | no event sources exist to trigger execution
less efficient to reference a flow. | referencing a flow shows a good performance
10. Mention the basic principles of ESB integration
The basic principles of ESB integration are:
11.Mention the different types of exception handling.
Different types of exception handling:
12. Mule3 Vs Mule4
Mule 4 improvements make it easier to learn, develop, and manage than Mule 3. Benefits include:
Up to 50% fewer steps and concepts to learn than Mule 3
If you are currently running Mule 3 applications, read this documentation to get an overview of the Mule 4 capabilities and to learn the differences between Mule 3 and Mule 4, to know when to migrate to Mule 4, and to understand what is required to migrate apps to Mule 4.
To understand the options for migrating your apps from Mule 3 to Mule 4, review Migration to Mule 4.
How Mule Selects a Flow Processing Strategy
Each flow varies in the degree to which it can benefit from the transactional reliability of synchronous processing, as opposed to the high throughput of the queued-asynchronous alternative.
Mule selects a processing strategy for a flow based on two criteria:
The flow’s exchange pattern
Whether or not the flow is transactional
A flow employs one of two exchange patterns, determined by the exchange pattern of the flow’s inbound endpoint:
A request-response exchange pattern is used when the sender of the messages, such as the flow’s inbound endpoint expects a response or some kind of result to return to the caller.
A one-way exchange pattern is used when no response is expected, or when the result is sent to some other flow or system and not back to the caller.
If the exchange pattern is request-response, Mule applies a synchronous processing strategy.
In addition, some inbound endpoints can be configured to operate transactionally, regardless of their exchange pattern. If a flow is transactional, Mule applies a synchronous processing strategy.
The following table summarizes how Mule chooses a flow processing strategy:
Exchange PatternTransactional?Flow Processing Strategy
Request-Response
Yes
Synchronous
Request-Response
No
Synchronous
One-way
Yes
Synchronous
One-way
No
Queued-Asynchronous
Last-mile security protects the backend services that are proxied by API Services. The primary goal of last-mile security is to prevent so-called "end-run" attacks, where an app developer discovers the URL for a backend service and bypasses any API proxies to directly hit the backend URL.
What is Runtime Fabric? Runtime Fabric (RTF):
Anypoint Runtime Fabric enables you to deploy Mule applications and API proxies to a Kubernetes cluster that you create, configure, and manage.
MuleSoft Runtime Fabric - A Short Overview - Apisero
Anypoint Runtime Fabric Overview | MuleSoft Documentation
Mule Cashing:
Identifying key aspects of your data such as when to use cache and which cache strategy to follow, helps you to improve processing performance:
Is the data frequently called, with often repeated results?
Can you afford eventual consistency between the data source and the cache information?
At least for a while until cache refreshes.
Mule runtime engine (Mule) offers customizable strategies, such as the Cache scope and the HTTP Caching API Gateway policy, to enable cache according to your needs. Both strategies help applications that constantly request the same data by reducing the processing load, especially network interactions with a remote host.
Cache Scope
HTTP Caching
Configure the Cache Scope :
In your Mule app, add a Cache scope to a flow.
Click to open the General tab for the Cache scope.
Configure the Cache scope:
Provide a Display Name.
Select a Caching Strategy.
Examples:
From the UI: My_Caching_Strategy
In the Studio XML: cachingStrategy-ref="My_Caching_Strategy"
MuleSoft recommends that you reference a Caching Strategy that uses an ObjectStore instead of using the default in a production environment.
If you need to create a Caching Strategy, see the procedure in See Also.
Opt to set up a filter for specific payloads if you need one.
Example that uses a DataWeave expression: filterExpression="#[user.isPremium()]"
If the message matches the expression(s), Mule executes the Caching Strategy.
HTTP Caching Policy:
Policy Name
HTTP caching
Summary
Caches HTTP responses from an API implementation
Category
Quality of Service
First Flex Gateway version available
v1.0.0
Returned Status Codes
No return codes exist for this policy

The HTTP Caching policy enables you to cache HTTP responses for reuse. Caching these responses speeds up the response time for user requests and reduces the load on the backend. For example, if your backend exposes an endpoint for which the responses to requests are not likely to change, you can reuse the HTTP responses and bypass the backend request processing by using the HTTP Caching policy.
OAuth 2.0
OAuth 2.0 is the latest version of OAuth that works both ways, as a protocol and as a framework. It has fixed the bottleneck of early OAuth versions and promotes interoperability. As it effectively fixed potential issues, it soon gained popularity and is presently used by famous apps like Twitter and Facebook.
What’s worth noting here is that its prime aim is to control access to specific resources like user data and API.

OAuth 2.0 Token Introspection Policy:
Policy Name
OAuth 2.0 Token Introspection Policy
Summary
Allows access only to authorized client applications
Category
Security
First Flex Gateway version available
v1.3.0
Returned Status Codes
400 - Invalid token
401 - Unauthorized access or error when connecting to the authorization server
403 - Forbidden, invalid client application credentials
500 - Bad response from authorization server, or WSDL SOAP fault error
The OAuth 2.0 Token Introspection policy enables you to configure OAuth 2.0 using any third-party Identify Provider (IdP), such as Okta, AWS, Azure or Google Cloud Platform. The policy allows for tokens based on the OAuth 2.0 Authorization Framework to be authorized without having to register an external IdP server in the Anypoint Platform.
The policy validates the token sent by the client to the protected API, and allows access to the backend server only if the introspection endpoint authorizes the token.
OAuth Vs JWT Token:JWT is mainly used for APIs while OAuth can be used for web, browser, API, and various apps or resources.
JWT token vs oauth token: JWT defines a token format while OAuth deals in defining authorization protocols.
JWT is simple and easy to learn from the initial stage while OAuth is complex.
OAuth uses both client-side and server-side storage while JWT must use only client-side storage.
JWT has limited scope and use cases. OAuth is highly flexible and can be easily used in a wide range of situations.
Both are the parts of the process that verifies the credibility of a user entering a system or network. So, could it be that we can use them together? Will try to find it out next.
On high level, yes both tokens can be used based on requirement, will publish this scenario based on your request.
Ref: OAuth vs JWT - What is the Difference?
- Save and reuse the results of an application.
- Asynchronous data processing wherever possible.
- Using the flow references over the VM endpoints
- Using the connectors to deploy connection pooling
- Deploying Dataweave for performance transformation
- Staying away from session variables
- Avoiding the session variable’s serialization
More Details at:
- https://gouravshivhare.blogspot.com/2024/10/performance-tuning-in-mule4-applications.html
8. How can code in MuleSoft be optimized for memory efficiency?
To optimize the MuleSoft code:
- Avoid payload in the flow variable
- Avoid loading the unnecessary part of the document
- Better database polling in highly concurrent scenarios
- Use of Dataweave for transformations.
9. What is the difference between a flow and a subflow?
FLOW SUBFLOW
It has a strategy for exception handling | It gets strategy for exception handling
sources that trigger execution exists, like HTTP | no event sources exist to trigger execution
less efficient to reference a flow. | referencing a flow shows a good performance
10. Mention the basic principles of ESB integration
The basic principles of ESB integration are:
- Orchestration: Synchronizing two or more services
- Transformation: Transforming data to an application-specific format
- Transportation: Handling transfer protocols
- Mediation: Multiple interfaces for multiple versions
- Non-functional Consistency: A mechanism for managing transactions and security.
11.Mention the different types of exception handling.
Different types of exception handling:
- Catch exception strategy
- Reference exception strategy
- Choice exception strategy
- Rollback Exception Strategy
12. Mule3 Vs Mule4
- Mule 3 variables represent message metadata, while Mule 4 is based on an event model where each mule event is composed of a message and relevant variables.
- Mule 4 has introduced DataWeave 2.0, Reusable Streaming, improved processing strategies, operation based connectors, and much more.
- Mule 4 has taken a step ahead and come up with some error groups, types and different way to handle them.
- In Mule 4, any component that needs to deal with multiple messages can simply set the payload of the message to a List of Mule Messages.
Mule 4 improvements make it easier to learn, develop, and manage than Mule 3. Benefits include:
- Easier and faster app development
- Seamless access and data mapping
- Simplified connectivity
- Auto-tuned and highly performant runtime
Up to 50% fewer steps and concepts to learn than Mule 3
If you are currently running Mule 3 applications, read this documentation to get an overview of the Mule 4 capabilities and to learn the differences between Mule 3 and Mule 4, to know when to migrate to Mule 4, and to understand what is required to migrate apps to Mule 4.
To understand the options for migrating your apps from Mule 3 to Mule 4, review Migration to Mule 4.
How Mule Selects a Flow Processing Strategy
Each flow varies in the degree to which it can benefit from the transactional reliability of synchronous processing, as opposed to the high throughput of the queued-asynchronous alternative.
Mule selects a processing strategy for a flow based on two criteria:
The flow’s exchange pattern
Whether or not the flow is transactional
A flow employs one of two exchange patterns, determined by the exchange pattern of the flow’s inbound endpoint:
A request-response exchange pattern is used when the sender of the messages, such as the flow’s inbound endpoint expects a response or some kind of result to return to the caller.
A one-way exchange pattern is used when no response is expected, or when the result is sent to some other flow or system and not back to the caller.
If the exchange pattern is request-response, Mule applies a synchronous processing strategy.
In addition, some inbound endpoints can be configured to operate transactionally, regardless of their exchange pattern. If a flow is transactional, Mule applies a synchronous processing strategy.
The following table summarizes how Mule chooses a flow processing strategy:
Exchange PatternTransactional?Flow Processing Strategy
Request-Response
Yes
Synchronous
Request-Response
No
Synchronous
One-way
Yes
Synchronous
One-way
No
Queued-Asynchronous
Last-mile security protects the backend services that are proxied by API Services. The primary goal of last-mile security is to prevent so-called "end-run" attacks, where an app developer discovers the URL for a backend service and bypasses any API proxies to directly hit the backend URL.
What is Runtime Fabric? Runtime Fabric (RTF):
Anypoint Runtime Fabric enables you to deploy Mule applications and API proxies to a Kubernetes cluster that you create, configure, and manage.
MuleSoft Runtime Fabric - A Short Overview - Apisero
Anypoint Runtime Fabric Overview | MuleSoft Documentation
Mule Cashing:
Identifying key aspects of your data such as when to use cache and which cache strategy to follow, helps you to improve processing performance:
Is the data frequently called, with often repeated results?
Can you afford eventual consistency between the data source and the cache information?
At least for a while until cache refreshes.
Mule runtime engine (Mule) offers customizable strategies, such as the Cache scope and the HTTP Caching API Gateway policy, to enable cache according to your needs. Both strategies help applications that constantly request the same data by reducing the processing load, especially network interactions with a remote host.
Cache Scope
HTTP Caching
Configure the Cache Scope :
In your Mule app, add a Cache scope to a flow.
Click to open the General tab for the Cache scope.
Configure the Cache scope:
Provide a Display Name.
Select a Caching Strategy.
Examples:
From the UI: My_Caching_Strategy
In the Studio XML: cachingStrategy-ref="My_Caching_Strategy"
MuleSoft recommends that you reference a Caching Strategy that uses an ObjectStore instead of using the default in a production environment.
If you need to create a Caching Strategy, see the procedure in See Also.
Opt to set up a filter for specific payloads if you need one.
Example that uses a DataWeave expression: filterExpression="#[user.isPremium()]"
If the message matches the expression(s), Mule executes the Caching Strategy.
HTTP Caching Policy:
Policy Name
HTTP caching
Summary
Caches HTTP responses from an API implementation
Category
Quality of Service
First Flex Gateway version available
v1.0.0
Returned Status Codes
No return codes exist for this policy
The HTTP Caching policy enables you to cache HTTP responses for reuse. Caching these responses speeds up the response time for user requests and reduces the load on the backend. For example, if your backend exposes an endpoint for which the responses to requests are not likely to change, you can reuse the HTTP responses and bypass the backend request processing by using the HTTP Caching policy.
OAuth 2.0
OAuth 2.0 is the latest version of OAuth that works both ways, as a protocol and as a framework. It has fixed the bottleneck of early OAuth versions and promotes interoperability. As it effectively fixed potential issues, it soon gained popularity and is presently used by famous apps like Twitter and Facebook.
What’s worth noting here is that its prime aim is to control access to specific resources like user data and API.
OAuth 2.0 Token Introspection Policy:
Policy Name
OAuth 2.0 Token Introspection Policy
Summary
Allows access only to authorized client applications
Category
Security
First Flex Gateway version available
v1.3.0
Returned Status Codes
400 - Invalid token
401 - Unauthorized access or error when connecting to the authorization server
403 - Forbidden, invalid client application credentials
500 - Bad response from authorization server, or WSDL SOAP fault error
The OAuth 2.0 Token Introspection policy enables you to configure OAuth 2.0 using any third-party Identify Provider (IdP), such as Okta, AWS, Azure or Google Cloud Platform. The policy allows for tokens based on the OAuth 2.0 Authorization Framework to be authorized without having to register an external IdP server in the Anypoint Platform.
The policy validates the token sent by the client to the protected API, and allows access to the backend server only if the introspection endpoint authorizes the token.
OAuth Vs JWT Token:JWT is mainly used for APIs while OAuth can be used for web, browser, API, and various apps or resources.
JWT token vs oauth token: JWT defines a token format while OAuth deals in defining authorization protocols.
JWT is simple and easy to learn from the initial stage while OAuth is complex.
OAuth uses both client-side and server-side storage while JWT must use only client-side storage.
JWT has limited scope and use cases. OAuth is highly flexible and can be easily used in a wide range of situations.
Both are the parts of the process that verifies the credibility of a user entering a system or network. So, could it be that we can use them together? Will try to find it out next.
On high level, yes both tokens can be used based on requirement, will publish this scenario based on your request.
Ref: OAuth vs JWT - What is the Difference?
Comments
Post a Comment