[go: up one dir, main page]

0% found this document useful (0 votes)
10 views11 pages

Mule Interview Q & A

The document provides a comprehensive overview of ESB, Mule, web services, and related technologies. It covers the definition and features of ESB and Mule, differences between web services and APIs, and various HTTP methods and status codes. Additionally, it discusses RAML for API development, message structure, MEL and DataWeave languages, and variable management in Mule applications.

Uploaded by

Nani Ganesh
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
10 views11 pages

Mule Interview Q & A

The document provides a comprehensive overview of ESB, Mule, web services, and related technologies. It covers the definition and features of ESB and Mule, differences between web services and APIs, and various HTTP methods and status codes. Additionally, it discusses RAML for API development, message structure, MEL and DataWeave languages, and variable management in Mule applications.

Uploaded by

Nani Ganesh
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
You are on page 1/ 11

ESB, Mule and Web services Basics:

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

2)Why do we go for ESB


Ans: to eliminate point to point integration and better control over
technology stack in enterprise and data flow.

3)Mule ESB features


Ans: 1) Mule ESB is a lightweight Java programming language.
2) Cloud Support - it will be deployed in to external cloud servers
3) Community and enterprise editions
4) Quick API Development
5) 150+ Connectors these connectors are almost free whereas in other
ESB's it is licensed
6) Licence is very low compare to other ESB
7) Custom code can be written in JAVA, JavaScript, Ruby or Python

4)What are other ESB's other than Mule


Ans: 1)Apigee
2)Tibco
3)Dell Boomi
4)IBM ACE
5)Talend
6)Oracle Service Bus

5)What is a web service?


Ans: A Web service is a software service used to communicate between two
devices on a network. Typically, “HTTP” is the most commonly used protocol for
communication. Web service also uses SOAP, REST, and XML-RPC as a means of
communication.

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.

7)Web service VS API?


1) All Web services are APIs but all APIs are not Web services.
2) A Web service uses only three styles of use: SOAP, REST and XML-RPC for
communication whereas API may use any style for communication.
3) Web services might not perform all the operations that an API would
perform.
4) A Web service always needs a network for its operation whereas an API
doesn’t need

8)Any idea about micro services and their advantage?


Ans: Micro services are architectural style that structures an application as
a collection of loosely coupled services. Micro services are fine-grained and the
protocols are lightweight. This makes the application easier to understand,
develop, test and scale. Microservice-based architectures enable continuous
delivery and deployment.
SOAP & Rest
========================================================================
1)What is REST and SOAP? When do we go for these?

2)What are SOAP elements


Ans: 1) An Envelope element that identifies the XML document as a SOAP
message
2) A Header element that contains header information
3) A Body element that contains call and response information
4) A Fault element containing errors and status information

3)Can I expose my soap service in multiple protocols

4)What is the Default Connection idle time out in HTTP Connector


Ans: 30000 Millie seconds (30 Seconds) after this Http Connection will be
closed if it is idle

5)What is Response Time out in HTTP Requester


Ans: Maximum time that the request element will block the execution of the
flow waiting for the HTTP response.

6)How to increase time out in both soap and rest


Ans: Connection idle time out(Http Request, Http Listener), Response time
out(Http Request) can be increased HttpConnector->Connector Configuration->
Connection idle time out or Response time out

6)Differences between get, post and put methods


Ans:
GET: GET is used to request data from a specified resource.
GET requests can be cached
GET requests remain in the browser history
GET requests can be bookmarked
GET requests should never be used when dealing with
sensitive data
GET requests have length restrictions
GET requests is only used to request data (not modify)
POST: POST is used to send data to a server to create/update a
resource.
POST requests are never cached
POST requests do not remain in the browser history
POST requests cannot be bookmarked
POST requests have no restrictions on data length
PUT: PUT is used to send data to a server to create/update a resource.
The difference between POST and PUT is that PUT requests are
idempotent. That is, calling the same PUT request multiple times will always
produce the same result. In contrast, calling a POST request repeatedly have side
effects of creating the same resource multiple times.

7)Different status codes in http


100: Information responses
100 Continue
This interim response indicates that everything so far is OK and
that the client should continue with the request or ignore it if it is already
finished.
101 Switching Protocol
This code is sent in response to an Upgrade request header by the
client, and indicates the protocol the server is switching to.
102 Processing (WebDAV)
This code indicates that the server has received and is
processing the request, but no response is available yet.
103 Early Hints
This status code is primarily intended to be used with the Link
header to allow the user agent to start preloading resources while the server is
still preparing a response.
200: Successful responses
200: Ok
The request has succeeded.
201: Created
The request has succeeded and a new resource has been created as
a result of it.
202: Accepted
The request has been received but not yet acted upon.
300: Redirection messages
301: Moved Permanently
This response code means that the URI of the requested resource
has been changed permanently. Probably, the new URI would be given in the response.
307: Temporary Redirect
308: Permanent Redirect

400: Client error responses


400: Bad Request
This response means that server could not understand the request
due to invalid syntax.
401: Unauthorized
The client must authenticate itself to get the requested
response.
403: Forbidden
The client does not have access rights to the content
404: Not Found
The server can not find requested resource.
405: Method Not Allowed
The request method is known by the server but has been disabled
and cannot be used for that resource
408: Request Time out
This response is sent on an idle connection by some servers
412: Precondition Failed
417: Expectation Failed

500: Server error responses


500: Internal Server Error
The server has encountered a situation it doesn't know how to
handle.
501: Not Implemented
502: Bad Gateway
got an invalid response while working as a gateway
503: Service Unavailable
The server is not ready to handle the request. Common causes are
a server that is down for maintenance or that is overloaded.
504: Gateway Timeout
This error response is given when the server is acting as a
gateway and cannot get a response in time.
REF: https://developer.mozilla.org/en-US/docs/Web/HTTP/Status

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

Two Way SSL


Http Request
configure an HTTPS client connector with both client keystore and
truststore. The client keystore shall contain the clients public certificate and
private key. The client truststore shall contain the servers certificate.

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

10)I want mutual authentication security how to provide HTTPS


Ass: Refer Two Way SSL in ABove Ans

11)What is key store, trust store and object store


Ans: Key Store: will store Private Key and own identity certificate which
program should present to other parties (Server or client) to verify its identity.
Trust store: is used to store certificates from trusted Certificate
authorities(CA) which are used to verify certificate presented by Server in SSL
Connection

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

2) Keystore is needed when you are setting up server side on SSL, it is


used to store server's identity certificate, which server will present to a client
on the connection while trust store setup on client side must contain to make the
connection work. If you browser to connect to any website over SSL it verifies
certificate presented by server against its truststore.

3) Though I omitted this on the last section to reduce confusion but


you can have both keystore and truststore on client and server side if the client
also needs to authenticate itself on the server. In this case, client will store
its private key and identify certificate on keystore and server will authenticate
the client against certificate stored on server's trust store.

REF: https://www.java67.com/2012/12/difference-between-truststore-vs.html

12)After consuming rest, exactly what you do


Ans: First i will verify the Status code that is returned by the External
system and if it is valid success response the i will check if my return type is
not Same as the response what I have received I will convert it using transform
Message and send it back to the Listener

13)What is http listener and http request


Ans:
Http Listener:
will be used if we are exposing a REST service to others by
implementing REST service. i.e. someone else is going to call your flow over HTTP.
This is used as a Message Source in the flow.
Http Requester:
when you want to call another HTTP URL inside mule flow to get
some data, eg. consuming any REST API's. This is used inside flow as message
processing component. ie. When you are the client making the outbound request (e.g.
I want to make a call to google.com) then you are going to use an http requester.
REF: https://forums.mulesoft.com/questions/92094/when-to-use-http-requestor-
vs-http-listener.html

14)HTTP and HTTPS corresponding port numbers


Ans:
HTTP – Port 80
HTTPS – 443
FTP – 21
FTPS / SSH – 22
POP3 – 110
POP3 SSL – 995
SMTP – 25 (Alternate: 26)
SMTP SSL – 587
MySQL – 3306

15)Is Rest API is good are Soap


Ans: When it comes to Performance and simplicity to get the info it is REST
When it comes to in built standards and security then SOAP is the best
option
REF: https://smartbear.com/blog/test-and-monitor/understanding-soap-and-rest-
basics/

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/

17)Multiple ways to consume Soap Service in mule


Ans: 1) Web serice consumer
2) for Multipart WSDL we can use CXF component with JAXB Object
COnversion
REF: https://dzone.com/articles/multipart-wsdl-with-mule-esb

18)Until successful scope in calling Soap or Rest services


Ans:We can call soap or rest in Until successful scope. It stores any
MuleEvent it receives and tries to process it a configured number of times at the
defined retry frequency. By default, until successful processing occurs
asynchronously from the main flow. After passing a message into the until
successful scope, the main flow immediately regains control of the thread
REF: https://dzone.com/articles/until-successful-scope-in-mule
RAML
========================================================================
1)Life cycle of API development using RAML
2)What are the data types in RAML
3)Sample RAML syntax - key words
4)Best practises in RAML
5)What are Traits and ResourceTypes in RAML
6)How to include Examples and schemas from external files in RAML
7)How to read the keys from the properties file in RAML.
8)Can I include one RAML file into another RAML file- Yes
9)How to define securities in RAML
10)RAML version 0.8 and 1.0 - differences
11)How to define Post in RAML and how to validate the post request (using json
schema)
12)How many flows it generates if you are using Uri parameters
13)Post/put/patch methods usage
14)Can I give the same resource twice with different methods- NO
15)When do we go for 200 and 201 codes in RAML
16)What is API Kit router?
17)How to define securities in RAML
19)API Auto discovery
20)How to validate get Request and Post Request
21)Difference between put and patch
22)What is Uri and query parameters
23)RAML advantages
24)how to call get post put at a time in RAML
25)how to work with ApiKitRouter
26)How to validate URI parameters in RAML
27)How to validate Query parameters in RAML

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

14)What are the operators you are used in data weave


15)How to convert one date format to other date format
16)how to avoid null pointer exceptions in dwl
17)how to externalize the script
18)how to data retrieve from List - map
19)how to write if in dwl 1.0?
20)What are the operators you are used in data weave
21) how to get distinct records in DW
Ans:Distinct BY
22)How to sort elements in DW
Ans:Sort BY
23)How to get Current time in DW
Ans: now

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

Flows, Flow ref and VM and JMS


========================================================================
1)What is flow ref and VM connector when do we go for these
2)main flow , private flow and sub flow difference
3) Difference between VM and JMS
4)JMS -AnypointMQ. Any point studio.
5)What is JMS , ACTIVE MQ
6)Differences between queue and topic
Topics
When you publish a message it goes to all the subscribers who are interested
- so zero to many subscribers will receive a copy of the message. Only subscribers
who had an active subscription at the time the broker receives the message will get
a copy of the message.

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.

Files & Batch Processing


========================================================================
1)difference for each and batch processing
2)How to create batch job.
3)What is the scope of Record variable.
4)while processing the records if exception occurs what happens
5)What are phases in batch processing -
Load on dispatch - internally it has queue. all the records are load in
to the queue
internally uses collection splitter.
6)splitter and collection splitter
7)how do I know how many records are processed/failed.
8)message enricher.
9)how to call batch job from another flow
10)how to avoid multiple queries from sales force.
11)is my record variable is available on complete stage.
12)batch commit
13)how to stop the batch job in multiple records are failed.
14)What is the criteria to accept the request in the batch steps
15)What is meant by Delta load and full Load
16)I have a file of 50MB data you need to splitting how to do it
17) What is batch processing

18) What are different scheduling strategies in Batch


Ans: 1) ORDERED_SEQUENTIAL (Default)
2) ROUND_ROBIN

Processing strategies, scopes and filters


========================================================================
1) What are different Processing strategies
. synchronous
. queued asynchronous
. non blocking (3.9)

2)What are the scopes in mule


A sync
messageEnricher
untilSuccessful
CompositeSource
batch
Commit
request-reply

3)how to do parallel processing


4) Explain about various thread types and its usage in Mule
5)Where you have used Async scope
used for Auditing
6) What are different filters in mule
7) What is idempotent filter

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

Properties Files & Calling


=========================================================================
1)How to create PropertiesFiles in mule
2)how to create properties file in dwl
3)how to call properties file- how many ways to call
4)how to refer multiple environments preterite's in your projects
5)What is configuration for refer properties files- context place holder
properties files loads before deployment
any changes in the properties file . you need to redeploy the
project in to the server.

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

Any point Platform


=========================================================================
1)What is the any point platform manager, exactly what it do
2)Throttling and rate limiting
3)Where you will configure the policies
4) What are the policies u have worked on
4) What are the properties we have in Oauth policy

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

You might also like