Mulesoft Interview Questions | Top Mulesoft Interview Questions

Mulesoft Interview Questions | Mule ESB Interview Questions

1. What is SEDA architecture?
SEDA is staged event driven architecture. It breaks the complex event driven application into number of stages which 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.


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 become robust.
6. Performance increases.


1. Caching can be a problem.
2. Scheduling can be problem
3. Locking can be a problem

2. How SEDA can be implemented in mule?
Mule is built up on 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.

3. 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 interface by RAML.
4. We can use RAML for API documentation.
5. Its 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 modelling. RAML is both machine and human readable.

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

Example: in api documentation if documentation is needed in multiple languages then overlays can be used.

5. What are Extensions in RAML?
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 super class, 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.

6. What is transport barrier?
A "transport barrier" is when your Mule message goes through an endpoint that makes use of a transport (say for 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´s just a fancy way of saying we are sending a message across a transport. 

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

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

8. What are Invocation and Session properties in mule?
Mule Invocation Properties
  • Invocation properties can be set by you.
  • Invocation properties are lost when crossing a “transport barrier”.
Mule Session Properties
  • Session Properties can be set by you.
  • Session properties are preserved when crossing a “transport barrier”.
9. What are Invocation and Session properties in mule?
Mule Invocation Properties
  • Invocation properties can be set by you.
  • Invocation properties are lost when crossing a “transport barrier”.
Mule Session Properties
  • Session Properties can be set by you.
  • Session properties are preserved when crossing a “transport barrier”.

10. 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.

11. What is 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 gives us:
API Manager
Runtime manager
Design centre
Access management
Anypoint exchange
Anypoint visualizer: Anypoint Visualizer displays views of different aspects of 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.
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.
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.

12. 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:
a. Apply policies
b. Alerts by email if someone violets policy or response time is more, etc
c. SLA tiers
b. Autodiscovery

13. How many policies you have applied?
Give details of policies applied by you.

14. OAuth policy, how we can apply?

First of all we have to generate token via third party say okta.
for that we have to register in okta. It gives server URL and client URL.
Server URL is applied in Anypoint platform under oauth policy section.
Client URL is used to generate token via client credentials like client id and client secret of organization.
Once token is generated, we can use that token in our API to access it.

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

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

17. What is Jenkins? How to create job in Jenkins?
Jenkins is used for CI/CD (continuous integration/continuous deployment).
We can deployment our project to any server or cloud via Jenkins. If we make any change in code Jenkins will take the change automatically and deploy that code to the server.

We need to login to Jenkins portal to create job. Jenkins job is used to fetch the code form our repository and deploy the code to our server.

18. 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 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 connection is lost then MQ persist the message and resumes from the same point from where connection get lost.

2. We can configure MQ to process asynchronously.

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

20. How we can deploy our API in mule cloud?
By runtime manager of Anypoint platform we can deploy mule applications to mule cloudhub.
 In mule 3 cloudhub deployment, we need .zip project file.
In mule 4 cloudhub deployment, we need .jar project file.

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

22. What is API kit router?
API kit is used to route the request to various flows via http method and resource name.

23. What is dataweave? Name 10 dataweave inbuilt functions?
Dataweave is a language which 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.

24. 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.
Source is our existing payload.
Target is message or data which is used to modify our existing payload.

25. What is SAML? How we can apply SAML in our application?
SAML or security assertion mark-up language is used to do single sign on.
So users do not need to manually sign on each time and SAML is secured too.

We need to sign on third party for generation of token.
In Anypoint platform go to access management -> external identity and select SAML 2.0. and feed server URL given by third party in SAML policy section in Anypoint platform.
Access token is generated by client URL provided by client id and client secret of organization.
Once token is generated, we can access our API by applying access token in request.

26. How to convert HTTP to HTTPS in mule?
Ans: 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 which contains data in encrypted and decrypted form.
Trust Store: It is a client-side asset which contains data in encrypted and decrypted form.We need to give location of both key store and trust store in TLS configuration to convert HTTP to HTTPS

27. What is aggregator and splitter in mule?
Ans: Aggregator: Is used to aggregate or some of the response data. Ex: collection aggregator

Splitter: It is used to split or bifurcate the data. Ex: Collection splitter
28. What are core principles of ESB integration?
Ans: 1) Data orchestration 
2) Data transportation 
3) Data transformation 
4) Data mediation 
5) Non- functional consistency 

29. Integration design patterns?
Ans: 1) Canonical design pattern
2) Fascade design pattern

30. Mule object structure 

31. Name few ESBs
Ans: 1) Mule ESB
2) Tibco ESB
3) Dell-boomi 
4) Apache Camel
5) Fuse Jboss ESB

32. What is salesforce? Have you worked on salesforce connector?
Ans: Salesforce is a CRM application and used for storing customer related data. 

33. Dynamic and parameterized query in DB connector, how to execute and how to execute stored procedure in mule?
Ans: We used parameterized query in DB operations to avoid SQL injection. Dynamic queries lead to SQL injections. SQL injections is vulnerable thing and used to attack data driven applications and to hack database application. We can call store procedure from database connector in Mule

34. Types of variable in mule?
Ans: There are three types of variable in mule: 
1) Flow variable 
2) Session variable
3) Record variable

Flow variable: We can store data or values in Flow variable and can access in the flow. A flow variable cannot cross the transport barrier or end points. 
Session variable: We can access Session variable anywhere in the flow and Session variable can cross transport barrier in some cases for ex. VM
Record variable: Record variable are used in batch processing.

35. How to perform batch processing in mule
Ans: Batch processing is a technique to process data in batches. In mule there are four phases in batch processing. 
1) Input – In these stage data is gathering and transform into desired input.

2) Load And Dispatch – In these phase batches are created for processing.

3) Process – In these phase batch steps are processed one by one and output is forwarded to final stage.

4) On Complete – These is the optional stage which is used to show the report of the records process. 

36. How to consume soap web service in mule
Ans: By using web service consumer. We need to give WSDL path in web service consumer component to consume soap web service.

37. how to create soap web service in mule
Ans: By using apache CXF component in mule.

38. How to consume rest web service in mule?
Ans: By using HTTP connector.

39. What are advantages of ESB?
Ans: 1) Defining API specifications 
2) Connection of applications by que and web services 
3) Routing of data 
4) Deployment of application to server or cloud 
5) Manage applications 
6) Data format conversion

40. What is flow, sub flow and private flow?
Ans: Flow – Flow contains message source and message processors which are used to perform a certain operation.

Sub Flow – Sub Flow is used to break the main flow into smaller flows to increase the readability. In sub flow main flow’s encryption strategy is used. Sub Flow are synonymous. We can connect sub flow from the main flow way flow reference components.

Private Flow – Flow without message source is known as private flow it has its own exception strategy. 

41. Have you worked on mule 4?
Ans: Yes 

42. Difference between mule 3 and mule 4
Mule 4
Mule 3
In Mule 4 the project is by default mavenized, so we do not need to convert into maven project manually.
We need to convert project into maven project manually.
In cloud hub deployment we need to deploy .jar project file from runtime manager
In mule 3 cloud hub deployment we need to deploy .zip project file from runtime manager
In mule 4 exception handling is changed, we use on error continue and on error propagate to handles error 
We use mule exception strategy like catch, rollback, choice etc.
Mule expression language is eliminated in mule 4
Mule expression language is present in mule 3
Data weave version is changed to 2.0
Data weave version is 1.0
Transformer are eliminated in mule 4
Transformer are present in mule 3
In mule 4 there is no need to manually tune the runtime it has self-tuning engine
In mule 3 we need to manually tune the runtime

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

44. What is API LED connectivity in mule
Ans: API LED connectivity is used to propagate message from an application to another via different layers.
1) System API – It is used to expose all data from backend and convert into another desirable form.

2) Process API – In process API we can filter desired data and perform business operation in it.

3) Experience API – It is used to connect different UI devices. It facilitates UI to capture the same API in different platforms. 

45. What is API lifecycle in mule?
Ans: 1) Design 
2) Simulate
3) Feedback 
4) Validate

46. How to read flat file in mule and how to read fix width format in mule?
Ans: Both flat file and fix width format functionality support is present in transform message component in mule.

47. In how many connectors you worked? Explain in detail
Ans: List the connectors you have worked on:

48. What is Munit? How to perform it?
Ans: 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. Green bar indicates successful testing and Red bar indicates error. 

49. What is VM connector? Diff between flow reference and VM?
Ans: 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 cluster.

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

50. What is Synchronous & Asynchronous flow?
Ans: Synchronous flow: 
1) In this same thread is responsible for execution of 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 separate thread for message receiving, message processing and message dispatching. 

51. What is API proxy and API gateway.
Ans: API proxy: API proxy is proxy URL which is used to secure API by avoid accessing original URL. Proxy URL is generated from API manager in Anypoint platform.

 API gateway: API gateway restricts the unwanted malicious attacks from the hackers and the security policies applies on API gateway.

52. How to iterate collections in mule?
Ans: 1) By using map operator.
2) By using for each scope.

53. What are scopes. How many scopes you have used?
Ans: Scopes: Scopes contains multiple message processors for performing certain operations.
I have used Scopes like for each, async, transactional are used.

54. How to handle transactions in mule?
Ans: By using transactional scope.

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

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

57. What is Mongo DB connector? Have you used it?
Ans: Mongo DB connector is used to connect Mongo DB. Mongo DB credentials are applied to Mongo DB connector to access it.

58. What is cache scope and until successful & first successful scope in mule?
Ans: 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 

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 than scope gives successful response.

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

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

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

60. What is CORS?
Ans: 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 Anypoint platform.

61. How to validate schema in mule?
Ans: By schema validation filter.

62. How we can send email in mule?
Ans: By using SMTP and attachment transformer in mule.

63. How to use property file in mule?
Ans: For this we need to configure property place holder in global elements. We can access value by ${keyname} anywhere in the mule components.

64. What is filter in mule? Explain At least 5 types of filters?
Ans: Filter is used for filtering task if the given condition is matched then is allows to pass the payload otherwise restrict it.

5 Types of filters are as follows:
1) Message filter 
2) Schema validation filter
3) Or filter
4) And filter
5) Not filter

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

66. What is choice in mule?
Ans: Choice is a routing component in mule which is used to route the message on the basics of given conditions. 

67. What is Anypoint exchange?
Ans: Anypoint exchange is an online portal given by mulesoft to store and access assets publicly and private. We can store connectors, components etc in Anypoint exchange.

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

69. How can we apply encryption and decryption in mule?
Ans: Encryption and decryption is applied via encryption component in mule. Encryption technique like:
1) PGP Encryption
2) JCE Encryption
3) XML Encryption 
can be applied 

70. LDAP connector in mule?
Ans: LDAP or Light Weight Directory Access Protocol is used to access network directories. LDAP connector is used in mule to access it. Operations like search, create, update, delete can be used.

71. Diff between map object and map operator in mule?
Map Operator
Map Object
Output of map operator is array
Output of map object is object
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.
Index is denoted by $$ sign and value by $
Key is denoted by $$ and value by $

72. Name 10 dataweave operators.
Ans: 1) Split space by
2) Pluck 
3) Flatten
4) Now
5) Seil
6) ABS
7) Min
8) Max
10) Random 

73. Thread pools in mule
Ans: There are 3 thread pools in mule.
1) Receiving thread pool – It is used for receiving message in 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.

74. minimum components required for valid flow in mule
Ans: At least one message processor.

75. What is autodiscovery in mule
Ans: Autodiscovery is a technique for API management. It is used for API pairing or API tracking.

76. How can we use if-else condition in mule?
Ans: By using when-otherwise in mule.

77. What is C4E in Mulesoft?

78. What are API best practices?

1 comment:

If you have any doubt, please let me know

© 2020

Share on :

Mule 4:

XML to JSON in mule 4 Web service consumer VM Validation in Mule 4 Until Successful
Sub flow Set Variable & Remove Variable Set Transaction ID Scatter Gather Round Robin
Consume Restful Service CRUD in Mule 4 Parse Template Object to JSON Load Static Resource
JSON to XML Invoke Idempotent Filter ForEach Flat file to JSON
Fixwidth to JSON First Successful File Execute Error Handling
Email Dynamic Evaluate Custom Business Event CSV to JSON Copybook to JSON
Choice Router Async RabbitMQ

Mule 3:

Database Connector Async CXF Attachement XSLT
Mongo DB Cache scope Custom Business Event Gzip Compress Expression
SMTP For Each Expression Javascript Filter Reference
Salesforce Message Enricher Groovy Parse Template Idempotent
VM Poll Invoke Ruby Message
Webservice consumer Python Transformer reference Message Property Not
Collection Aggregator First Sucessful Catch Exception Strategy Reference Exception Strategy Or
Choice Message Chunk Aggregator Choice Exception Strategy Global Exception Strategy Schema Validation
Custom Aggregator Scatter Gather Custom Exception Strategy Batch Processing MEL
M Unit RAML Map Operator API Mocking Dataweave

Converter Tools :

JSON to XML Converter XML to JSON Converter Decimal to Binary Decimal to Octal Binary to Decimal
Binary to Hexadecimal Binary to Octal Hexadecimal to Decimal Hexadecimal to Binary Hexadecimal to Octal
Octal to Decimal Octal to Binary Octal to Hexadecimal Number to Words Converter Text to Hex Converter
Hex to Text String to Binary Converter Binary to String Converter Word to HTML Converter Word to PDF Converter
JSON to YAML Converter CSV to JSON Converter XML to XSLT Converter XML to YAML Converter
JSON to CSV Converter JSON to TSV Converter CSV to TSV Converter CSV to XLS Converter

Image Tools :

PNG to JPG Converter PNG to BMP Converter PNG to GIF Converter JPG to PNG Converter JPG to BMP Converter
JPG to GIF Converter GIF to PNG Converter GIF to JPG Converter GIF to BMP Converter PNG to PDF Converter
JPEG to PDF Converter JPG to PDF Converter BMP to PDF Converter GIF to PDF Converter

String Utilities :

Reverse String Random String Generator Base64 Encoder Base64 Decoder Words Counter
Remove Accents Remove Duplicate Lines Remove Empty Lines Remove Line Breaks Remove Similar Lines
Sort Text Lines Reverse Text Lines Random Words Generator

Number Utilities :

Square Root Calculator Random Number Generator Area of Circle Calculator Date Calculator

Other Tools :

Find IP of Website Password Generator URL Encoder URL Decoder lorem ipsum Generator
IP to Hostname Port Checker JSON Escape JSON Unescape

Free Rest APIs for Testing :

GET Sample Rest APIs POST Sample Rest API PUT Sample Rest API PATCH Sample Rest API DELETE Sample Rest API
Login Sample Rest API User Registration Sample API User Registration Unsuccessful Sample Rest API Delay Response