Mule Interview Q & A
Mule Interview Q & A
========================================================================
1)What is ESB ?
Ans: It is a set of rules and principles for integrating numerous
applications together over a bus-like infrastructure. The core concept of the ESB
architecture is that you integrate different applications by putting a
communication bus between them and then enable each application to talk to the bus.
This decouples systems from each other, allowing them to communicate without
dependency on or knowledge of other systems on the bus.
6)What is an API?
Ans: An API exactly defines the methods for one software program to interact
with the other. API may use any means of communication to initiate interaction
between applications. An API doesn’t always need to be web based.
8)In post method one resource is already requested, again sending same request to
the resource what happen
Ans: This is called twinning we can eliminate this using Idempotent filter in
MULE
9)Tell me the steps to configuring HTTPS
Ans: One-way SSL
For normal SSL, on the server connector(Http Listener) we need a
keystore where the servers certificate and private key reside. If we need one way
SSL in http Request then we need to add trust store to call external HTTPS requests
where trust store have external cer imported
HTTP Listener
configure the server connector with both server keystore and
truststore as well as set ‘requireClientAuthentication’ to ‘true’ on the ‘tls-
server’ (i.e. truststore) attribute. This shall force the server connector to check
client requests in the trust store prior to granting access.
REF: https://dzone.com/articles/configuring-https-mule
One example is setting up SSL for tomcat is server side of SSL while
setting up JDBC over SSL is client side of SSL connection. If you are implementing
SSL on Server side you need a KeyStore to store your server certificate and private
key.
Anytime a client will connect to the server, server will present its
certificate stored in KeyStore and client will verify that certificate by comparing
with certificates stored on its trustStore.
1) Keystore is used to store your credential (server or client) while
truststore is used to store others credential (Certificates from CA).
REF: https://www.java67.com/2012/12/difference-between-truststore-vs.html
16)What are the performance aspects of REST API and explain why it is so
Ans: REST offers better support for browser clients using JSON
REST provides superior performance, particularly through caching for
information that’s not altered and not dynamic.
REST is generally faster and uses less bandwidth. It’s also easier to
integrate with existing websites with no need to refactor site infrastructure. This
enables developers to work faster rather than spend time rewriting a site from
scratch. Instead, they can simply add additional functionality.
REF: https://stackify.com/soap-vs-rest/
Messages
========================================================================
1)Message structure in detail?
2)What are immutable properties in message
3)What is outbound properties and when do we go for this.
4)property Transformer
5)What is the attribute which gives request payload type in Message
MEL Language
========================================================================
1)What are the context objects in MEL explain in detail?
2)how to retrieve Current time in MEL with syntax
3)how to retrieve below in MEL with syntax
a. queryParams
b. Json Data
c. xml data.
Data-weave Language.
========================================================================
1)how to create functions/variable
2)how to create flowVars/sessionVars/properties in DWL
3)how to call inboundProperites/flowVars/sessionVars in DWL
4)What are global functions? how to define and call global functions
5)how to call the java code
6)how to call other flows in dwl?
7)How to skip null in DML
8)filters
9)ascending and descending order
10)range selector operators
11)++ and +
12)$$ and $
13)What is
map
mapObject,
Pluk,
Flatten
distinct
orderby,
groupBy
splitBy
reduce,
remove.
using
Variables
========================================================================
1)What is flow and Session Variable syntax to retrieve and when do we go for these
variables
2)What are the scope of flow and session variables if we are using VM connector
3)What is the scope of various variables. i.e flow variable,session Variable and
Record variable.
4)Will Flow variable accessible after external HTTP request Call
Queues
A single message will be received by exactly one consumer. If there are no
consumers available at the time the message is sent it will be kept until a
consumer is available that can process the message.
Exception handling
========================================================================
1)Exception handling
2)What are the exception strategies used in the project
catch ,choice,global,reference,roll-back
3)exception syntax- data weave exception syntax
4)Tell me what are all exception strategies mule supports
5)Differences between custom exception and catch exception
6)Mention Few Exceptions you encounter while developing API's in mule
Ans: 1) java.net.ConnectException (Occur when http connection time out is
reached)
2) org.mule.module.launcher.DeploymentInitException:
InitialisationException: A ListableObjectStore must be configured on
UntilSuccessful. if object store is not declared for UntilSuccessful scope
3) java.nio.channels.UnresolvedAddressException no proper http url for
requester
DB Questions
========================================================================
1)What is the payload of DB select query - ?
2)how to insert multiple records in DB- using bulk mode
3)How can i call multiple operations in DB- (means insert and update)
4)how to call the stored procedure
5)how to call the functions.
6)What is parametrized query and DynamicQuery.
7)how to insert bulk records- if one record failed in bulk what happens
8)How to call multiple queries in the DB. means(insert/update/delete) in single DB
Connector
9)What is the response type of Select/insert/update/delete operation
10)What is mean by water mark
11)In which scenarios we will use parametrized in which scenario we use dynamic
queries
12)What is set query limit
13)How to implement Pagination in DB
14)What is a view in DB
Ans:We can store Compiled query in view to fetch the result.
scatter gather
========================================================================
1)What happens if exception raised in one flow.
2)if you handle exception what is the behaviour
3)how to make scatter gather sequentially
4)if any exception raised in scatter gather . how do we know which route is failed.
5)What is the output of the scatter gather - List
6)time out option in scatter gather - ?
7)is scatter gather output can be multipleData formats? - Yes
8)is scatter gather same message copy of the message process
9)i have two end points A and B. I make use of scatter gather component exposed
through http Request. If I hit this resource which end point will trigger first?
10)in scatter gather i am sending request it will goes sequential or parallel?
11)after completing scatter gather which format of data come
Domain
========================================================================
1)What is domain and when do we go for this
2)What is difference between domain and global configuration.
3)What are the limitations in the Domains
Munit:
========================================================================
1)some Asserts in Munit
2)how to mock in Munit
3)What is the importance of MUnit
4)if exception raised in Munit then how to handle that
5)how to skip the test cases for different environments
6)How to add Munit for a flow
Ans: Right click on flow -> create new Suite
7) How to mock in Munit Test case
8)How to ignore Munit test case
Deployments:
========================================================================
1)how do you deploy the application in different environment
2)how do you deploy you application? are you deploying in cloud or on premises
3)how to deploy a project on premises
4)how to deploy a project to cloud hub
5)API Policies/ and securities
6)how to read the properties file based on the environment.
7)how to maintain common configuration across all the modules - domains
8)i have one single repository , I have to deploy in Jenkins , maven and QA. How to
differentiate these server
9)Differences between cloud and on premise deployment
10) Explain about deployment architecture you have used in your project
Mule4
========================================================================
1)Differences between mule 3 and mule 4
variable and function declaration has changed
null exception avoid
when otherwise - if else condition
MISC
=======================================
1)cloud advantages
2)What is composite source- it accepts variety of requests
3)how do you secure you project
HTTPS
oAuth2
clientid
secret
4)how to track each request in the Logs
5)have you written any reusable components
Audit Component- reused
Reference Exception handling
SMTP Flow
6)What is API Lead connectivity.
7)Can Experience layer directly call system api -Yes
8)Auto discovery
9)can I read multiple properties files
10)What is empty logger ?
11)How to pass the arguments to mule at runtime.
12)How to call the java Class
13)What is entry point resolvers.
org.mule.model.resolvers.EntryPointNotFoundException: Failed to find entry
point for component, the following resolvers tried but failed:
if we have two methods with same signature(with single string parameter) we
get this exception to resolve it we need to specify the entry point of method
<component class="com.mulesoft.training.MathOperation" doc:name="Java">
<method-entry-point-resolver>
<include-entry-point method="power"/>
</method-entry-point-resolver>
</component>
14) What is poll component
15)What are the connectors you worked in your project
HTTP, FILE, DB, VM, JMS, web service consumer, sales force, HTTPS , SFTP
16)Agile Methodology and Terminologies
productOwner
Scrum master
sprint - 2 weeks
user stories
Scrum call
demo on the implementation
retrospective meeting
17)which connectors are used in your projects
18)how to configure Jenkins to git hub and maven
19)which dependency it maven will added to connect to Jenkins
20)I' am giving one input file that file inbound end point is http, I need trigger
that middle of the flow how can achieve that
Ans: through Mule Requester component we can call JMS or file in middle of the
flow
21)What is message to object transformer do
22)Differences between web server and application server
23)wrapper in mule
24)What is agile methodology
25)Which components you are worked
26)What is mutable and immutable objects
27)How to specify SMTP Email
Ans: Using parse Template we can specify the HTML structure with Place holders to
place the dynamic Values. This component will take .template extension by default
28)What is inbound endpoint?
Ans: In a flow the starting component which receives a request is called as
inbound end point