Mule 4 + MuleSoft + Top 100 Interview Questions & Answers (2022 Update)

January 5, 2022   393 Views
  • MuleSoft was founded by Ross Mason in 2006, based in San Francisco. As stated on the company’s website, the name MuleSoft comes from the ability of this platform to eliminate the “donkey work”. The company chose this name to reflect its platform’s hybrid capabilities, also because mules are a hybrid combination of donkeys and horses. 
  • MuleSoft filed for its initial public offering (IPO) in 2017. In May 2018, Mulesoft was acquired by Salesforce, which is a Software as a Service (SaaS) provider. MuleSoft technology is now a part of the Salesforce Integration Cloud.
Is MuleSoft hard to learn?

Mule supports multiple scripts. If one has a basic understanding of OOPs, Java, Python, Ruby, or Groovy, then one can learn Mule ESB. There are multiple resources online to help you learn these.

Why is MuleSoft so famous?

Mulesoft makes it easy to build connected experiences and unifies data to present a single view to the customer. Each integration done this way can also become a building block that is reusable. By using Mulesoft, time for development is saved. Also, the production environments become easier to use.

Is MuleSoft a good career?

The demand for a career in Mulesoft is steadily growing. Anypoint by Mulesoft, being a top integration platform has become the choice for a number of developers for their careers.

Does MuleSoft require coding?

In Mule applications, DataWeave is a functional language used to perform data transformations. For this purpose, coding is required. However, the requirement for coding is not much in this case.

Here are MuleSoft interview questions and answers for fresher as well as experienced candidates to get the dream job.

1) What is MuleSoft?

MuleSoft is an integration platform for connecting enterprise and SaaS applications in the cloud and on-premise.

2) What are the different types of variables in MuleSoft?

The different types of variables in MuleSoft are as follows: 

  • Flow Variable: This is used to either set or remove variables that are tied to a particular message in the current flow.
    Syntax: #[flowVars.Code]
  • Record Variable: This is used for the batch processing flows. Unlike any other variable, these are special variable sets that are used only inside a Batch Job.
    Syntax: #[recordVars.Code]
  • Session Variable: This is used to either set or remove variables tied to a particular message for the entire lifecycle. 
    Syntax: #[sessionVars.Code]

3) What are the different tools and services offered by MuleSoft?

MuleSoft helps in the task of data integration diligently and efficiently. The tools and services offered by MuleSoft include:

  • API Designer: API Designer is a web-based tool that contains a console and a scripting notebook for JavaScript.
  • API Manager: API Manager is a management tool that allows organizations in managing users, traffic, and service level agreements.
  • Anypoint Studio: Anypoint Studio is a graphical design environment to build and edit APIs and integrations.
  • API Portal: This is a portal that offers developers different kinds of documents, tutorials, and code snippets related to APIs.
  • API Analytics: API Analytics is an analytics tool that allows a user to track the specifications of an API. This also includes its performance, usage, and reliability. Additionally, it offers a dashboard and charts.

4) What are the various types of messages in MuleSoft?

Various types of messages in MuleSoft are:

  • Echo and Log message – These are used to log messages and move them from inbound to outbound routers. Inbound Routers means a single event is received via an endpoint and the router controls how and if this event gets routed into the system. Outbound routers mean once a message has been processed by a component an outbound router can be used to determine which components get the result event.
  • Bridge Message – This is a passed message from inbound to outbound routers.
  • Build Message – These are messages created from fixed or dynamic values.

5) What is fan-in?

Fan-in helps in taking a decision to continue flow execution. It be used in combination with fan out.

6) What is a fan-out?

Fan out is primitive that can be used to input messages through the output terminal once or more than one time. It can also be used as a combination of both fan-out and fan-in.

7) The features of Mule ESB are?

  • Offer SLA (Service Level Agreement) monitoring and API management facility.
  • It has easy to use and drag and drop graphical design.
  • Mule ESB provides high scalability.
  • It enables developers to deploy in one click cloud or on-premise deployments.

8) The basic principles of ESB Integration are?

The basic principles of ESB integration are:

  • Transportation: It negotiates between different formats like JDBC, HTTP, JMS, etc.
  • Transformation: It deals with the transportation of data between data formats needed by the ESP connector.
  • Non-functional consistency: It is the way of how monitoring and security policies are applied and should be consistent.
  • Mediation: It involves offering different interfaces to:
    1. Enables different channels to the same component implementation.
    2. Support various service versions for backward compatibility.

9) What is Mule Expression Language?

MEL or Mule Expression Language is a light-weight mule specific language that can be used to access and evaluate data in the payload.

10) List various types of endpoints in Mule ESB

Various types of Endpoints in Mule are 1) JMS, 2) HTTP, 3) SMTP, 4) IMAP, and 5) AJAX.

11) What is the full form of SDO?

The full form of SDO is a Service Data Object.

12) What are different types of Exception Handling in MuleSoft Mule 4?

Different types of exception handlings are:

  • Rollback exception handling.
  • Default exception handling.
  • Catch exception handling.
  • Global exception handling.
  • Choice exception handling.

13) What are the advantages of using ESB?

The advantages of using ESB are:

  • It offers a high level of the operational controlling facility from the portal that is based on the web.
  • ESB provides numerous connectivity options using SaaS-based applications.
  • It provides API and analytics management.
  • ESB is equipped with numerous bug fixing and automated testing facilities.
  • EDI (Electronic Data Interchange)/B2B (business to business) integration.
  • Batch integration feature using real-time integration methods.

14) What is a transient context?

Transient context is used to pass the values within the existing flow, either requesting flow or the responding flow.

15) What is Mule Transformer?

Mule transformer is an event instance that refers to a library, org.mule.api.MuleEvent. This object carries the message with the event. The main aim of the Mule transformer is to create a chain of transformers.

16) What is API?

API is the acronym for Application Programming Interface. It is a software interface that allows two applications to interact with each other without any user intervention.

APIs provides product or service to communicate with other products and services without having to know how they’re implemented.

17) What are the features of API?

Here are some essential features of API:

  • Efficiency
  • Wider reach
  • Customizable
  • Personalization
  • Data ownership
  • Easy integration with GUI
  • Time effective
  • Language-independent

18) What is the payload in MuleSoft?

The payload is a mule runtime variable that stores objects or arrays. It helps developers to access payload under different forms.

19) What are the various parts of composing a message in Mule?

Different parts of composing a message in Mule are:

  • Properties: it contains the header or meta-information or header similar to the SOAP (Simple Object Access Protocol) message.
  • Payload: It is the main data context carried by a particular message.
  • Multiple name attachments: It provides support for multiple messages or payload that occurs during event processing.

20) What are the flow processing strategies in MuleSoft?

MuleSoft has six types of strategy for flow processing:

  • A queued asynchronous flow processing
  • Custom flow processing
  • Tread per processing
  • Queued flow processing
  • Non-blocking flow processing
  • Synchronous flow processing
  • Asynchronous flow processing

21) What is Correlation Context in MuleSoft?

It is a primitive that is used to pass values from request flow to response flow.

22) What are the different types of primitives used in Mediation?

Different types of primitives used in Mediation are:

  • Endpoint lookup
  • Data handler
  • Message element setter
  • DB lookup
  • Service Invoke
  • Type filter
  • Stop
  • Sub Flow
  • Custom mediation fan-out
  • Fan-in
  • Even emitter
  • Header setters
  • Message logger
  • XSLT
  • BO MapMessage filter
  • Fail

23) Name different types of ESPs used in the market now days?

Different types of ESPs used in the market are:

  • Mule ESB
  • JBoss fuse ESB
  • Talend

24) Define the model layer in Mule 4?

The model layer is the first logical layer. It represents the runtime environment that hosts services. This layer describes the behaviour of Mule when processing requests that are handled by services. It offers services with default values to simplify configuration.

25) Explain connector in MuleSoft?

A connector in Mule controls how a particular protocol used. It can be configured with parameters which are specific to that protocol. The connector holds any state context which can be shared with any entity in charge of actual communications.

26) What is Endpoint in Mule?

An endpoint in MuleSoft indicates a particular usage of a protocol. It is for polling, reading from, or writing to a destination.

Therefore, it controls what underlying entities would be used with a dependent connector.

27) Define component in Mule

Components perform an important role in MuleSoft services. Every service is organized with core components and core and inbound and outbound routers.

They are used to implement behavior in service. It can be very simple, like logging messages or invoking other services.

28) What is the use of Outbound Endpoint in MuleSoft?

Outbound Endpoint in MuleSoft is used to perform the following things:

  • Send SOAP messages
  • Write to file streams
  • Send email messages

29) Define configuration builders In MuleSoft?

MuleSoft is a configuration builder to translate a configuration file into the graph of the object that makes the running node of ESB.

30) List the types of configuration builders in MuleSoft?

Types of configuration builders In MuleSoft are 1) Spring-driven builder and 2) script builder.

31) What Is TSD in Mule?

TSD or transport service descriptor is a connector used for technical configuration. It defines classes name used for message receivers, dispatchers, and requesters. This default value can vary to grasp the behaviour of transport.

32) Define multicasting router in MuleSoft?

Multicasting router in MuleSoft sends messages to more than one endpoints over different transports. It allows the user to move the same messages across different endpoints.

33) What are the characteristics of Global Endpoint?

Characteristics of global endpoint are:

  • The global endpoint is not typified or outbound routing.
  • It can be usable in different places of configuration files.
  • The global service name must be applied so that it can reference the endpoint.
  • It helps to clarify the usage of a particular destination.

34) Explain VM transport in MuleSoft?

The VM (Virtual Machine) transport is a special type of transport that can be used to send a message via memory. These messages never leave the Java Virtual Machine, and the Mule instance is running in.

35) Name different types of web services

Different types of web services: 1) RESTful web services and 2) SOAP web services.

36) What are Web Services?

Web services are a standardized way or medium to propagate communication between the client and server applications on the World Wide Web.

37) What is Restful Web Service?

Restful Web Service is a light-weight, maintainable, and scalable service that is built on the REST architecture. Restful Web Service, expose API from your application in a secure, uniform, stateless manner to the calling client. The calling client can perform predefined operations using the Restful service.

38) Mention the difference between SOAP and REST

The difference between SOAP and REST is:

SOAPREST
SOAP stands for Simple Object Access ProtocolREST stands for Representational State Transfer
SOAP cannot make use of REST since SOAP is a protocol, and REST is an architectural pattern.REST can make use of SOAP as the underlying protocol for web services because, in the end, it is just an architectural pattern.
SOAP can only work with XML format. As seen from SOAP messages, all data passed is in XML format.REST offers various data formats such as JSON, plain text, HTML, XML, etc. But the most preferred format for transferring data is JSON.

39) What is RAML?

The full form of RAML is the RESTful API Modeling Language. It is a YAML-based language that describes RESTful APIs.

RAML is best for the information needed to describe RESTful APIs. It is similar to WSDL (Web Services Description Language).

RAML contains request/response schema, URI parameter, endpoint URL, HTTP methods, and query.

40) What is caching?

The cache concept is a way of storing the copy of the file in the cache, or any temporary storage location to access it quickly.

41) What are the Models?

Model is a grouping of services that are created in MuleSoft studio. User has the liberty to start and stop all the services inside a particular model.

42) Name supported languages by MuleSoft

Supported languages of MuleSoft are 1) Ruby, 2) Python, 3) Groovy, and 4) JavaScript.

43) List various the categories of Mule Processors

Categories of Mule Processors are: 1) Components, 2) Exception strategies, 3) Business events, 4) Routers, 5) Connectors, and 6) Transformers.

44) What are the configuration patterns provided by MuleSoft?

Configuration patterns provided by of MuleSoft are:

  • Bridge
  • Validator
  • WS proxy
  • Simple service pattern
  • HTTP proxy

45) What are the advantages of the logger component?

The advantages of the logger component are:

  • Users can add this core component anywhere in the workflow.
  • It can be configured to any combination of strings and expressions.

46) What is scheduler Endpoint?

Scheduler Endpoint is a MuleSoft component or middleware are working on time-based conditions. It allows the user to trigger whenever this condition is met.

47) Explain the parameters to configure a scheduler

Parameters related to configuring a scheduler are:

  • Frequency: It is a frequency used by Scheduler to triggers flows.
  • Start Delay: It is the time to wait before triggering any flow.
  • Time Unit: The time unit for frequency and Start Delay.

48) What is Choice Router?

Choice Router dynamically routes messages using a flow. It is based on a set of DataWeave expressions to evaluate the message content.

49) What is a Scatter-Gather Router?

Scatter-Gather Router is the most used routing event processor. It can send a request message to more than one target concurrently. This router then collects responses from all routes and aggregate back into one response.

50) What are error types in MuleSoft?

Following are the effort types:

  • Transformation
  • Expression
  • Routing
  • Duplicate_Message
  • Source_Response
  • Timeout
  • Security
  • Connectivity
  • Validation

51) What are the features of MUnit?

The features of MUnit are:

  • In MUnit framework, a developer can create a Mule test by using Java code as well as Mule code.
  • The programmer can design and test Mule APIs and apps, either in XML or graphically within Anypoint studio or platform.
  • MUnit allows integrating the testing into the current CI/CD process.
  • MUnit offers auto-generated tests and coverage reports to reduce manual work.
  • Developers can also use local FTP/DB/mail servers to make the testing process more portable through the Continous Integration.
  • It allows enabling/disable tests.
  • Programmers can extend the MUnit framework using plugins.
  • Features to verify message processor calls.
  • It provides error reports with a Mule stack trace.

52) What is Exchange?

Exchange is a hub for the development team. It is used to store and access API, connectors, templates, documentation, and more.

53) What are the advantages of SOAP?

The advantages of SOAP are:

  • SOAP is the perfect medium that is developed for web service to talk with client applications.
  • SOAP is a light-weight protocol which can be used for data interchange between applications.
  • SOAP protocol can work any programming language based applications on Windows and Linux platforms.
  • It does not require customization to run the web services built on the SOAP protocol to work on the WWW.

54) Define Batch Jobs in Mule ESB

A batch job is an element in Mule that split large size messages into records that process asynchronously in a batch job.

55) Explain the Mule data integrator.

A mule data integrator is a tool that is used for mapping data by visualizing it. It offers drag and drop feature to make a developer’s coding process easier.

56) What are Batch Jobs in Mule ESB?

In Mule ESB, a batch job is an element in a mule that splits large messages into records. These records are then processed asynchronously in a batch job.

Batch Jobs in Mule ESB

Within an application, one can initiate a Batch Job scope, which splits messages into individual records, performs actions upon each record, and then reports on the results and potentially pushes the processed output to other systems or queues. With this, we can handle large quantities of incoming data from an API into a legacy system. We can also synchronize data sets between business applications.

57) What is Worker in MuleSoft?

In Mulesoft, Worker is a dedicated instance of Mule hosted on AWS that is used to run the integration applications.

Following are some of the features of workers:

  • Capacity: For the purpose of data processing, every worker has a given amount of capacity.
  • Isolation: Isolation means that every worker runs in a separate container from every other application.
  • Manageability: Manageability means that the deployment and management of each worker are done independently.
  • Locality: In this feature, every worker runs and is located on a specific worker cloud. 

58) What is Mule Runtime?

A runtime engine that is used to host and run Mule applications, is called a Mule runtime. This is similar to an application server. Mule runtimes can be provisioned either on the premises or also on the cloud. A single Mule runtime can host several Mule applications. Here is the figure representing Mule runtime. 

Mule Runtime Flow

59) How is Reliability achieved in MuleSoft?

Reliability in Mule means Zero message loss. To make this happen, applications must be designed in a way to capture the state of a running process/instance, which can be picked up by another running node in the cluster. Reliable messaging is given by built-in support of transactions in transport, if the application uses a transactional transport such as Java Message Service (JMS), Virtual Machine (VM), Database (DB), etc. A reliable messaging pattern is essential when dealing with non-transactional endpoints.

60) How can we improve the performance of the Mule Application in MuleSoft?

The following are some ways to improve the performance of the Mule Application in MuleSoft:

  • Put the data validation at the start of the flow.
  • Use Streaming to process data.
  • Save the results of the application and reuse them later.
  • Process data asynchronously wherever is possible.

61) How can Code in MuleSoft be optimized for memory efficiency?

The code in MuleSoft be optimized for memory efficiency in the following ways:

  • One should not save the payload into the flow variable. This is because it is a more memory consuming element.
  • The unnecessary part of the document should not be loaded while processing.
  • For highly concurrent scenarios, one should use better database polling.
  • Use Dataweave for transformations.

62) What do you mean by Flow in Mule?

‘Flow’ is when we combine together multiple individual processors in order to handle a receipt, its processing and eventual routing of a message. We can connect several flows together to build one whole application. This application can then be deployed on Mule, on-premise, or another app server, or also on the cloud.

Simply put, the sequences of the message processors are called flows. A message entering a flow can pass through a large variety of processors. In the figure shown below, after receiving the message through a request-response inbound endpoint, Mule then transforms the content into a new format. The business logic is then processed in a component before returning a response through the message source.

Flow in Mule 4

63) What is Subflow in mule?

Using the flow-reference element of Mule, we can call a subflow. When the sublow is called using a flow-reference element by the main flow, the entire message structure (attachments, payload, properties, etc.) is passed along with the context (transactions, session, etc.) Similarly, the entire message along with the context is returned to the main calling flow after the processing of the message is done in the subflow. 

Following are some features of Subflow:

  • Subflows are very useful when you want to add re-usable logic, as you can call sub-flows multiple times.
  • Referring subflows gives better performance than referring a flow.
  • Subflows don’t have event sources. 

64) What is the difference between Flow and Subflow in mule?

FlowSubflow
A private flow has its own strategy for exception handling. It also does not have a source defined. Although a sublow processes messages synchronously, it gets the strategy of processing and of exception handling from the calling flow. 
Flows can have sources (such as HTTP Listener to receive a request) that trigger the flow execution.Subflows don’t have event sources. For example, you can’t place an HTTP Listener in subflow.
Referring flows gives a performance not as good as compared to subflows.3. Referring subflows gives better performance
Each flow can have its own error handling.4. Subflows don’t have an error handling. It inherits the error handling strategy from parent flow.

65) What is a Mule transformer?

A Mule transformer is used to strictly enforce the types of data it receives and its outputs. One configuration can be used to relax this – An exception won’t be reported for bad input, but the original message will be returned without enforcing the expected result type by the transformer. Thus, this option should be used sparingly. A depiction of a Mule transformer is shown in the flowchart below. Mule has multiple transformers and each project you do might potentially have one transformer. 

There are different ways in which a transformer can alter a message:

  • Payload type transformation – In this, the message payload data type is transformed from one binary form to another. As an example, a java.util.Map can be transformed into a javax.jms.MapMessage.
  • Payload format transformation – In this, the message payload data format is transformed from one form to another. As an example, a byte array that has an XML document instance is transformed into a byte array that has a plain-text instance for logging.
  • Properties transformation – In this, the properties of the message are changed. This could be done by either adding, modifying or removing existing properties. As an example, a message that requires a given property to be set prior to being sent to a JMS destination.

Usually, transformers come in pairs. In these pairs, the second transformer cannot perform what the first one performs. 

As an example, the payload format transformations such as compression and decompression, are handled by 2 different transformers. One of these transformers is able to reverse the action of the other one. This is what is called a round-trip transformer. The original message should be restituted by making a message go through a transformer and its round-trip. 

Mule Message Transformation Example

66) What are the available resources used for modularizing configuration in Mule?

The resources used for modularizing configuration in Mule are as follows:

  • Independent Configuration: To load a number of independent configuration files one after the other, a mule instance is used.
  • Inherited Configuration: One Configuration inherits a Configuration from another different configuration. This is like the name ‘inheritance’ suggests – a parent-child relationship between the 2 configurations. This ensures that no configuration file will be omitted booting of the application takes place. This is the guarantee that this dependency provides.

The following is an example: 

<model name=”myConfig”><model name=”myConfig” inherit=”true”>
  • Imported Configuration: This also supports spring configuration. This enables us to easily use the spring config file to Mule configuration files. If we need to extend instance.xml then the spring context file will be imported:
<spring:beans>
   <spring:import resources=”instance-beans.xml”/>
</spring:beans> 
  • Heterogeneous configuration: In this type of configuration, we can utilize many types of files as the term ‘heterogeneous’ signifies. By using the Groovy script method and Spring XML Configuration builders, we can create the instances.

67) How are the messages in Mule composed?

There are four different parts of the composed message in Mule. These are as follows:

  • Payload – This is the main context of data carried by a given message.
  • Properties – Similar to the SOAP message, this contains meta-information or header
  • Multiple Name Attachments – This is used to provide support for multi-part messages.
  • An Exceptional Payload – to hold errors that occur during the processing of the event.
Message Object in Mule 4

Mule4 Event Structure

Mule 4 Event

68) What are the parameters to configure a scheduler?

The Scheduler component in Mule helps us to trigger a flow when a time-based condition is met. 

The parameters related to configuring a scheduler are as follows:

  • Frequency: The Scheduler uses frequency to trigger flows.
  • Start Delay: This signifies the time to wait before triggering a flow.
  • Time Unit: This is the time unit for frequency and for Start Delay.

For example in some use cases where you need to do a specific task at a particular period of time or repeatedly at a fixed interval, your integration flow can be scheduled via Scheduler.

69) Why we use identity management? How many ways we can ensure data and API security?

We can configure identity management to set up users for Single sign-on

 Following are below SSO Standard

  • Open ID connect
  • SAML 2.0
  • Salesforce
  • Open AM
  • OKTA
  • Ping Federate

there are multiple ways to ensure data and API security:

  • Multi-factor Authentication
  • Token-based authentication
  • Digital signature
  • Public key cryptography
  • Digital certificate

70) What all different API policies should be applied on different API levels like Experience, Process and System Level?

Experience Layer

  • XML or JSON threat protection – this will protect against the oversized XML or JSON payload
  • Client ID enforcement – authentication is need for proper use of an API, only client authorized can use the API and no one else
  • SLA-based Rate Limiting – this is more need in case we want to monetize an API otherwise ignored e.g.
    • Free – 20 request per minute
    • Unlimited – 100K request per minute
  • IP blacklisting – this can be used if we want to limit the consumption of an API to particular IPs e.g. IPs know for hacking etc.
  • Tokenization – to tokenize any element which can be sensitive e.g. credit cards etc.
  • HTTP Caching – in case we think the response don’t change frequently and it’s ok to send the same response for particular request
  • Cross-Origin resource sharing – is a standard mechanism that allows JavaScript XMLHttpRequest (XHR) calls executed in a web page to interact with resources from non-origin domains. CORS is a commonly implemented solution to the “same-origin policy” that is enforced by all browsers.
  • JWT Validation – JSON web token validation

Process Layer

  • IP whitelisting – making sure the request are coming from allowed VPC or within organization
  • SLA-based Rate Limiting – it will make sure that target system will not go down in case of burst request
  • Client ID enforcement – authentication is need for proper use of an API, only client authorized can use the API and no one else
  • Spike Control – it will protect the system against burst requests
  • Tokenization – to tokenize any element which can be sensitive e.g. credit cards etc.

System Layer

  • IP whitelisting – making sure the request are coming from allowed VPC or within organization
  • SLA-based Rate Limiting – it will make sure that target system will not go down in case of burst request
  • Client ID enforcement – authentication is need for proper use of an API, only client authorized can use the API and no one else
  • Spike Control – it will protect the system against burst requests
  • Tokenization – to tokenize any element which can be sensitive e.g. credit cards etc.

Other – based on requirement and can be applied on any level

  • Header removal or injection – add remove HTTP header
  • Message logging – Logs custom messages between policies and flow. the payload will be consumed by the policy if it’s a non-repeatable streams

71) What is Cloudhub?

Cloudhub is an (iPasS) Integrated platform as a service which is multi-tenant, secure, highly available service where we can deploy our integration application on cloud also integrate on-premise application with cloud services

Cloudhub Architecture
  • Platform Services: Shared CloudHub platform services and APIs, which includes CloudHub Insight, alerting, logging, account management, virtual private cloud/secure data gateway, and load balancing
  • Global Worker Clouds: An elastic cloud of workers, Mule instances that run integration applications

72) How many ways you can deploy application on Cloudhub?

  • Anypoint Studio
  • Runtime Manager
  • Anypoint CLI
  • Cloudhub API

73) What is the difference between op-premise deployment and cloud hub deployment strategy?

  • With Cloud hub deployment strategy you can deploy maximum 10 Application on 1 vCore machine but in on-premise you can deploy 100 application on 1 vCore depends on the
  • In Cloudhub mule runtime will be managed by the MuleSoft, in on-premise mule runtime will be managed by the Customer itself

74) What is persistent queue?

  • Persistent queues ensure zero message loss and allow you to distribute non-HTTP workloads across a set of workers.
  • Persistent queues also guarantee delivery of your messages; even if one or more workers or data-centers go down.
  • Persistent queues facilitate disaster recovery and provide resilience to hardware or application failures.

75) Why we used Anypoint VPN?

We use Anypoint VPN to create a secure connection between MuleSoft VPC and on-premise network

76) What happens to your logs when you delete mule application from Cloudhub?

After you delete your application your log data is no longer accessible through the console, Cloudhub archive old log data for a limited period of time before being purged, if you want to recover data you have to raise support ticket with MuleSoft.

77) What is Object Store V2?

  • Object Store v2 lets Cloudhub applications store data and states across batch processes, Mule components and applications, from within an application.
  • Persists keys for 30 days unless updated. If a key is updated, the TTL (time-to-live) is extended by another 30 days from the current expiration date
  • Allows for an unlimited number of entries. There is no limit on the total size of v2 object-stores.
  • Stores values up to 10 MB

78) How can one mule app access the object store of another mule app?

To share data between Mule 4 apps create a flow to retrieve the data using the Retrieve operation in the Object Store Connector 

In Mule 3, use the Object Store v2 REST API to read from one app and store to another.

79) What is Anypoint MQ?

  • Anypoint MQ is a multi-tenant, cloud messaging service that offers customers to perform asynchronous messaging scenarios between their applications.
  • Anypoint MQ is fully integrated with Anypoint Platform
  • Anypoint MQ requires a separate Enterprise subscription

80) How MuleSoft scheduler runs in multi worker cloud hub environment

Mule runtime cluster or multi-worker Cloudhub deployment, the Scheduler runs (or triggers) only on the primary node (that is, only in one Mule runtime).

81) How you can prevent your application hosted in Cloudhub from being publicly accessible

Remove the Anypoint VPC Firewall rules with source Anywhere (0.0.0.0/0) and port 8081/82 or create a whitelist in your dedicated load balancer with the IP Address you want to authorize.

82) What is Control Plane?

In Anypoint Platform, the control plane consists of Anypoint Design Center, Anypoint Management Center, and Anypoint Exchange, API Manager Etc. Control plane is used to deploy, monitor and manage the running application in Mule runtime.

83) What is Anypoint runtime Plane?

Anypoint runtime plane is used where we deploy the mule runtime application also where the mule runtime engine runs, in case of Cloudhub runtime plane will be managed by MuleSoft and for on-premise and RTF Runtime plane will be managed by Customer.

84) What is EU Control Plane?

MuleSoft hosts a version of the Anypoint Platform control plane entirely within the EU (Frankfurt or Dublin data centers). This enables you to deploy and manage your APIs, applications, and related data entirely within the European Union. This includes data and metadata about your MuleSoft implementation. The EU control plane ensures that all MuleSoft data is stored within the EU.

85) How many ways you can configure the Dedicated Load Balancer

There are three ways to create and configure a dedicated load balancer for your Anypoint VPC

  • Runtime Manager from Anypoint Platform
  • The Cloudhub load-balancer create command from the Anypoint Platform CLI
  • The Cloudhub API

86) How can you achieve the High Availability in MuleSoft?

  • HA is to keep overall system operational when a system component fails, usually it is achieved with multiple level of fault tolerance or load balancing.
  • In case of on-premise you can deploy the mule application on multiple Clusters
  • In case of Cloudhub you can deploy the mule application on multiple cloud hub workers i.e horizontal scaling to multiple mule run time.

87) How to invoke the Custom Java Class from inside a Dataweave?

%dw 2.0
Import java!com.mycompany::classname
output application/json
---
{
  a: classname::methodName("myString")
}

88) How to access secure property inside Dataweave?

By using p(‘secure::<property name>’) we can access the secure property defined as part of secure property file in mule application

89) How to call Flow from inside a Dataweave?

You can use Dataweave lookup function to call flow from inside a Dataweave It works in Mule apps that are running on Mule Runtime version 4.1.4 and later. It takes the flow’s name and an input payload as parameters. For example, lookup(“flowname”, payload)

90) How to Log message in Dataweave?

Use log(” Current Time Stamp “,now()) function in Dataweave

91) What is the difference between map, mapObject and pluck?

  • map is used to iterate over array
  • mapObject is used to iterate over object and return object
  • pluck iterates over an object and returns an array of keys, values, or indices in that object.

From the functionality wise all are same but work on different input and return different output, where array and object are Java array and Java object.

92) What is minimum and maximum Worker size available in Cloudhub?

0.1 vCores is the Minimum and 16 vCores is the maximum worker size available in Cloudhub

93) What is horizontal scaling and vertical scaling?

Vertical scaling is to increase the worker size, when you want to process the CPU Intensive API’s or process large payload with small number of request increase the vCore size.

Horizontal scaling is to increase the number of workerif you want to increase the throughput of high frequency small payload

94) How to achieve clustering in MuleSoft?

We can achieve this by adding multiple workers to your application to make it horizontally scale, Cloudhub automatically distribute multiple workers for same application across 2 or more data centres for maximum reliability When deploying your application to two or more workers, the HTTP load balancing service distributes requests across these workers, allowing you to scale your services horizontally. Requests are distributed on a round-robin basis.

95) How will you combine 2 arrays into single array in MuleSoft?

We can use flatten dataweave function to combine two arrays in to single array.

96) What are target variable in MuleSoft?

When creating a flow in mule app, we can store data in variable so that any component in a flow can use it. In Mule 4 Target Variable replaces the Message Enricher of Mule 3, target variable is available with most of the connectors.

97) How many phases are there for batch job in Mule 4?

Each batch job contains 3 different Phase

  • Load and Dispatch.
  • Process
  • On Complete.

98) When we should use batch processing?

You can use batch processing when:

  • Synchronizing data sets between business applications, such as syncing contacts between two different ERPs
  • Extracting, transforming and loading (ETL) information into a target system, such as uploading data from a flat file (CSV) to Hadoop.
  • Handling large quantities of incoming data from an API into a different systems

99) Why we use Batch Aggregator scope?

Batch Aggregator scope is used to accumulate a subset of records from a batch step and process them to external source or service for example rather than processing single record to target system you can use batch aggregate to process all the records at once. You can also configure batch aggregator scope to process fixed size groups of records inside a batch aggregator scope.

100) What is the difference between For each and Batch Process?

For each do the processing in single thread while Batch Process performs multi-threaded processing.

101) How to manage the Transaction in MuleSoft?

MuleSoft supports two types of transactions

  • Single resource (Local)
  • XA transactions (extended architecture)

You can configure the transaction depends on the requirement

You can start a transaction from a message source. In this case, the entire flow takes part in transaction This is useful when working with messaging connectors to prevent the consumption of the message if a problem occurs when processing it, allowing you to retry later (because of the rollback).

You can also use the Try block which support the transaction when you want to handle the transaction in middle of the flow

There are below transaction Action define the type of action that operations take regarding transactions

  • Always_Begin
  • Always_Join
  • Begin-or-join
  • Join-if-possible
  • Indifferent
  • None
  • Not Supported

102) How will you implement caching in MuleSoft?

There are 2 ways to implement the caching in MuleSoft

  • Use Object Store
  • Use Cache scope to cache the Response

103) What is RAML? 

  • RAML stands for Restful API Modelling Language,
  • RAML is a well-defined contract in a human readable format to actually exist as your source code
  • it is open-specification language built on YAML 1.2 and JSON for describing Restful APIs.
  • Restful API Modelling Language (RAML) makes it easy to manage the API lifecycle from design to deployment to sharing. It’s concise and reusable; you only have to write what you need to define and you can use it again and again.  

104) What are API Fragments in RAML?

API Fragment is part of RAML specification; it is not in itself a complete RAML specification. These are the small reusable component used in API specification. You can create fragment and publish it to exchange to make it reuse in the organization. Example of Fragments: Library, Data Type etc.

105) Why we use Design Center?

  • Design center can be used to write API definitions with RAML using API Designer
  • You can also create API Fragment in RAML, after you create a specification or fragment you can publish it to Anypoint Exchange so that it can be reused in the organization
  • Design center can also be used to create mule applications using flow designer

106) What is API Autodiscovery?

  • API Autodiscovery is used to pair the API in API Manger to it deployed mule application
  • When autodiscovery is correctly configured in your Mule application you can say that your application’s API is tracked by or paired to API Manager.
  • An API in a Mule runtime can only be associated with one autodiscovery instance. No two Autodiscoveries can be associated to the same API in a Mule Runtime.

107) What is API Gateway?

API Gateway is embedded inside mule runtime, using this gateway any user can apply basic authentication policy on top of Mule application, enrich and incoming outgoing message or any other complex capability to an API without writing code. Basically it is an orchestration layer on top of your back end API to help you separate orchestration from implementation.

108) What is the difference between Throttling and Rate Limiting?

Rate Limiting and Throttling are the API Policies available in MuleSoft, you can apply these policies through API Manager.

Rate Limiting: The Rate Limiting policy limits the number of requests an API accepts within a window of time. The API rejects requests that exceed the limit

Throttling: The Throttling policy queues requests that exceed limits for possible processing in a subsequent window. The API eventually rejects the request if processing cannot occur after a certain number of attempts. You can configure a delay between retries, as well as limit the number of retries.

For working examples you may refer: Mule 4 + MuleSoft Certified Developer – Level 1 (Mule 4) Study Material + Latest Dump