Top 50 Mulesoft Interview Questions | Mule ESB Interview Questions

Below are Mulesoft Interview Questions based on the candidate's experiences and the company's interview pattern.


1. What is API LED connectivity in mule?
API LED connectivity is used to propagate messages from an application to another via different layers.
1) System API: It is used to expose all data from the backend and convert it into another desirable form.
2) Process API: In-process API we can filter desired data and perform the business operations in it.
3) Experience API – It is used to connect different UI devices. It facilitates UI to capture the same API in different platforms. 


2. What is SEDA architecture?
SEDA is a staged event-driven architecture. It breaks the complex event-driven application into a number of stages that are connected by queues. It decouples receiving, processing, and dispatching phases.

A Stage is analogous to an "Event". To simplify the idea, think of SEDA as a series of events sending messages between them.

Example: 
In a restaurant:
if waiter A has work of taking in the customers and allot a seat.
Waiter B has work of taking and processing order.
Waiter C has work of giving/taking bill and take out the customer.

Advantages of SEDA architecture:
1. we create a new thread for each request.
2. it is easy to program.
3. We can achieve higher parallelism in SEDA.
4. less time requires.
5. operation becomes robust.
6. Performance increases.

Disadvantages of SEDA architecture:
1. Caching can be a problem.
2. Scheduling can be a problem.
3. Locking can be a problem.

3. How SEDA can be implemented in mule?
Mule is built upon SEDA architecture.
In Mule, each component is treated as a stage with its own thread pool and work queue. If two flows are connected by queue let’s say by JMS component or by VM.

4. What is RAML?
RAML stands for Restful API Modelling Language. RAML can be used for:
1. API specification
2. We can mock API by RAML and API console.
3. We can generate an interface by RAML.
4. We can use RAML for API documentation.
5. It's a contract between APIs.

RAML lets you see what your API looks like as you design it, using easy-to-read plain text. RAML makes it easy to manage the API lifecycle from design to deployment to sharing. RAML is used for API modeling. RAML is both machine and human-readable.

5.  What are overlays in RAML?
Overlays are used to extend non-behavioral aspects of an API, such as descriptions, usage directions, and user documentation items.
Example: RAML 1.0 Overlay

For example: in API documentation if documentation is needed in multiple languages then overlays can be used.

6. What are Extensions in RAML?
The extension is used to extend or override behavioral aspects of the API.
Example: RAML 1.0 Extension

As you may infer from the name, extensions are used to extend an API by adding new behaviors and/or modifying existing behaviors of an API. An analogy from the object-oriented programming world would be a subclass extending a superclass, where the subclass can add new methods and/or override existing methods. An extension may also extend an API's non-functional aspects.
An extension might be used.

For example: to define additional resources that are exposed only to a select set of users, such as administrators or users having been assigned a particular role. An extension could also be used to add features for a newer version of an API.

7. What is a transport barrier?
A "transport barrier" is when your Mule message goes through an endpoint that makes use of a transport 
Example: HTTP endpoints, JMS, TCP, VM, etc.
There are two ways of calling flows in Mule:
1. Via an endpoint.
2. Via the Flow-Ref component.

The first case makes use of transports, therefore, your message goes through the whole serialization and deserialization processes. At the end of the day, you will still end up with the same payload but it will be a different Mule message. It is just a fancy way of saying we are sending a message across a transport. 


8. What are inbound and outbound properties in mule?
Mule Inbound Properties:
1. Inbound properties cannot be set by you.
2. Message sources (such as inbound endpoints) set them for you when they receive a message.
3. Inbound properties are lost when crossing a “transport barrier.”

Mule Outbound Properties:
1. Outbound properties can be set by you.
2. When crossing a “transport barrier”, outbound properties are automatically turned into inbound properties, and no longer exist as outbound properties.

9. When to use VM and when to flow ref?
VM endpoints enable message redelivery strategies to be configured in your exception handling blocks – this is not possible with flow-refs.  VMs can do this because they internally use a queue to hold messages while flow-refs are like simple method calls.

Contrast that to a private flow and chaining with flow-refs, if an exception occurs in the called flow even though we have a rollback strategy configured it will NOT execute because there is no internal queue involved.


10. What is the Anypoint platform?
Anypoint Platform is a complete solution for API-led connectivity that helps companies build application networks of apps, data, and devices, both on-premises and in the cloud. 
This hybrid integration platform includes iPaaS, ESB, and a unified solution for API management, design, and publishing.

Anypoint Platform provides us:
1) API Manager
2) Runtime manager
3) Design center
4) Access management
5) Anypoint exchange
6) Anypoint visualizer: Anypoint Visualizer displays views of different aspects of the application network graph. It provides a real-time graphical representation of the APIs and the Mule applications that are running and discoverable.
It collects the data from the APIs, Mule applications, and proxies deployed to CloudHub or standalone mule runtime engine to discover all incoming and outgoing connections through an embedded plugin.
7) Anypoint Monitoring: Anypoint Monitoring provides visibility into integration across your Application Network graph. It provides feedback from the Mule flows and components in your application network graph.
8) Secret Manager: Secret Manager uses secure vault technology to store and control access to private keys, passwords, certificates, and other secrets. Use Secret Manager to write, read, manage your secret, keys, Transport Layer Security Certificate (TLS), and many other documents.

11. What is API Manager?
API Manager is the component of Anypoint Platform that helps in managing the APIs for an organization.
From API manager we can:
1) Apply policies.
2). Alerts by email if someone violates policy or response time is more, etc.
3). SLA tiers.
4). Autodiscovery.

12. What are exception strategies?
1. Default exception strategy
2. Catch exception strategy
3. Rollback exception strategy
4. choice exception strategy 
5. reference exception strategy.

13. What are processing strategies?
1. Synchronous processing strategy
2. Queued asynchronous strategy
3. Non-blocking processing strategy.

14. What is MQ and why we should use it?
MQ or message queue is used to connect applications from each other to send data or messages.
Let’s say if we want to connect the mule application with Mainframe, we can use MQ to connect it and exchange data.

We can also use web services to communicate between applications but MQ is preferred because:

1.  If the connection is lost then MQ persists the message and resumes from the same point from where the connection gets lost.
2. We can configure MQ to process asynchronously.

15. What is Anypoint MQ?
Anypoint MQ is the queueing facility given by Mulesoft in the Anypoint platform. It comes only in the paid version. We can create queues and call that queues from our mule flow via client id and client secret from of our organization and queue name.

16. What is an API kit?
API kit is required to convert RAML into Mule flows.

17. What is an API kit router?
API kit is used to route the request to various flows via HTTP method and resource name.

18. What is dataweave? Name 10 dataweave inbuilt functions?
Dataweave is a language that is used to transform data from one form to another. For example: JSON to XML. There are many facilities given in dataweave language to do modifications in our data.

19. What is message enricher? How it works?
Message enricher is used to enrich our payload with some other data.
We can modify our payload with some other data. There are two main attributes in message enricher: source and target.
the source is our existing payload and the target is message or data which is used to modify our existing payload.

20. How to convert HTTP to HTTPS in mule?
For conversion of HTTP to HTTPS we need to do TLS configuration in these we need to generate security certificates like key store and trust store.
Key Store: It is a server-side asset that contains data in encrypted and decrypted form.
Trust Store: It is a client-side asset that contains data in encrypted and decrypted form. We need to give the location of both the key store and trust store in the TLS configuration to convert HTTP to HTTPS.

21. What are aggregators and splitters in the mule?
Aggregator: This is used to aggregate or some of the response data. Example: collection aggregator
Splitter: It is used to split or bifurcate the data. Example: Collection splitter

22. What are the core principles of ESB integration?
1) Data orchestration 
2) Data transportation 
3) Data transformation 
4) Data mediation 
5) Non- functional consistency 

23. Name two Integration design patterns?
1) Canonical design pattern
2) Facade design pattern

24. What is Mule object structure?



25. What is the dynamic and parameterized query in the DB connector, how to execute and how to execute the stored procedure in mule?
We used parameterized queries in DB operations to avoid SQL injection. Dynamic queries lead to SQL injections. SQL injections are the vulnerable thing and used to attack data-driven applications and to hack database applications. We can call store procedure from database connector in Mule

26. What are the different types of variables in mule?
There are three types of variables in mule: 
1) Flow variable 
2) Session variable
3) Record variable

Flow variable: We can store data or values in the flow variable and can access them in the flow. A flow variable cannot cross the transport barrier or endpoints. 
Session variable: We can access session variable anywhere in the flow and session variable can cross transport barrier in some cases Example: VM
Record variable: Record variables are used in batch processing.

27. How to perform batch processing in mule?
Batch processing is a technique to process data in batches. In mule, there are four phases in batch processing. 
1) Input – In this stage data is gathering and transform into desired input.
2) Load And Dispatch – In this stage batches are created for processing.
3) Process – In this stage batch steps are processed one by one and output is forwarded to the final stage.
4) On Complete – It is the optional stage that is used to show the report of the records process. 

28. How to consume soap web service in mule?
By using web service consumer. We need to give WSDL path in web service consumer component to consume soap web service.

29. How to consume the rest web service in mule?
By using an HTTP connector.

30. What is flow, sub-flow and private flow?
1) flow: Flow contains message source and message processors which are used to perform a certain operation.
2) Sub-flow: Sub Flow is used to break the main flow into smaller flows to increase readability. In sub-flow main flow’s encryption strategy is used. Sub Flow is synonymous. We can connect the sub-flow from the main flow way flow reference components.
3) Private Flow: Flow without message source is known as private flow it has its own exception strategy. 

31. What is invoke component in mule?
It is used for JAVA support in mule. We can execute JAVA code from invoke component.


32. What is the API lifecycle in mule?
1) Design 
2) Simulate
3) Feedback 
4) Validate

33. What is Munit? How to perform it?
Munit is the unit testing framework in mule. It is like Junit in JAVA. We need to generate Munit flows from mule flows and performed Munit testing. The green bar indicates successful testing and Red bar indicates the error. 

34. What is a VM connector? List out the Difference between flow reference and VM?
In VM: 
1) VM is used for asynchronous processing.
2) It is used to connect different mule applications.
3) It is used to connect applications via queues.
4) When we distribute our work across clusters.

In Flow reference: 
1) We use flow reference to connect the sub-flow from the main flow.
2) Process is synchronous.

35. What is Synchronous & Asynchronous flow?
Synchronous flow: 
1) In this same thread is responsible for the execution of the whole process.
2) So, more time is elapsed in it.
Asynchronous flow: 
1) More than one thread is required to execute a process.
2) There is a separate thread for message receiving, message processing, and message dispatching. 

36. What are API proxy and API gateway.
1) API proxy: API proxy is a proxy URL that is used to secure API by avoiding accessing the original URL. Proxy URL is generated from API manager in Anypoint platform.
2) API gateway: API gateway restricts the unwanted malicious attacks from the hackers and the security policies apply to API gateway.

37. How to iterate collections in mule?
1) By using a map operator.
2) By using for each scope.

38. What are mule scopes? How many scopes you have used?
Scopes: Scopes contain multiple message processors for performing certain operations.
Example: for each, async, transactional.

39. How to handle transactions in mule?
By using a transactional scope.

40. What is MEL? How to consume headers in mule?
MEL or Mule expression language is used to access Inbound properties in mule, like query parameters, URI parameters, and headers.
We can consume headers in mule by message.inboundproperties.hearders  

41.How to apply basic authentication in mule?
Basic authentication is used to secure API by username and password, so we need to go to the policy section in API manager and select basic authentication. Before it we need to enable the security manager and choose a username and password.

42. What is cache scope, until successful scope & first successful scope in mule?
1) Cache Scope: Cache Scope is used in mule to store the data which is used again and again. There are two types of object store we used in caching.
1) In memory object store 
2) Persistent store 

2) Until Successful Scope: Until Successful scope is used for a resource to execute successfully. In this scope, we give retries to connect to the resource if the resource connects successfully within given retries then scope gives the successful response.

3) First Successful in Mule: First successful components return payload of the branch which gives successful response first.

43. What is the poll scope and watermarking in mule?
1) Poll scope: Poll scope is used for polling. If you want to execute the operation within a gap of a certain time then we can use poll scope.

2) Watermarking: Adding new data without replacing old data is known as watermarking. If 10 records are read from the database and return in file and new 2 records are added to the database so that 2 new records will be added to the file without replacing all the records.

44. What is CORS?
CORS or Cross-Origin Resource Sharing is a technique by which we can access our API in JAVA script and other JAVA script-supported languages for this we need to enable CORS policy in the Anypoint platform.

45. What is scatter-gather in mule? How it works in detail.
Scatter gather is a routing component that routes the payload via different branches, and we get output in the form of an array in the output node.
By default, if any branch gives error then the whole operation will not stop, and it returns the output of the successful branches. If any branch fails, it gives composite routes exception and we can track the exception in a particular branch by sequential ID.

46. What is an object store?
Object Store is used to store objects. There are 2 types of object store mainly we have:
1) In memory object store
2) Persistent store 

47. Diff between map object and map operator in mule?
Sr.no
Map Operator
Map Object
1
The output of the map operator is an array
The output of map object is an object
2
Transformation function lambda invokes 2 parameter index and value. Index refers to the positions of key and value.
Transformation function lambda invokes 2 parameter key and value.
3
The index is denoted by $$ sign and value by $
Key is denoted by $$ and value by $


48. What are different Thread pools in mule?
There are 3 thread pools in the mule.
1) Receiving thread pool – It is used for receiving messages from the message source.
2) Processing thread pool – It is used for processing the message 
3) Dispatching thread pool – It is used to dispatch the message out of the flow.

49. how many minimum components required for valid flow in mule?
At least one message processor.

50. What is autodiscovery in mule?
Autodiscovery is a technique for API management. It is used for API pairing or API tracking.