Simulado MCD 03
Simulado MCD 03
1)
2)
3)
4)
5)
6)
7)
8)
9)
10)
11)
12)
13)
14)
15)
16)
17)
18)
19)
20)
21)
22)
23)
24)
25)
26)
27)
28)
29)
30)
Gabarito
1)
Explicação
Process section is must to get code compiled successfully in Anypoint Studio. Process section must have
one or more processors.
2)
Explicação
APIkit Router
The APIkit router is a key message processor that validates requests against the RAML definition, enriches
messages, for example by adding default values to the messages, and routes requests to a flow. "Bad
request" is returned if the request is invalid, for example, and "Not implemented" is returned if the RAML
resource that you request is not associated with a flow.
Hence correct answer is Validates requests against RAML API specifications and routes them to API
implementations
3)
Explicação
Mule applications can be scaled vertically by changing worker size. Mule applications can be scaled
horizontally by adding more workers.
Horizontal Scaling
Multiple workers of small vCore capacity helps to improve throughput of high frequency small payload type
applications. For example your application is a http API Proxy, and you have a lot of clients sending frequent
requests, but each request is small payload and utilizes only little cpu or memory. Horizontally scaling will
allow you to have more capacity as well as redundancy.
Vertical Scaling
Large single vCore workers are useful for high CPU intensive integrations or APIs. Ones that are processing
large payloads but small number of actual requests. If you want these single large payloads to be processed
even quicker, increase the vCore size.
4)
Explicação
Correct answer is Specify throttling , security and other policies
5)
Explicação
Organization Administrators can approve/revoke/delete SLA tier access requests via API Manager only.
Task Prerequisite
To manually approve or reject requests, you must have:
Configured the SLA tier for the application
The Organization Administrator, API Manager Environment Administrator, or the Manage Contracts
permission
6)
Explicação
Application properties can be defined in .yaml or in .properties file.
Supported Files
The Configuration Properties support both YAML configuration files ( .yaml ) and Properties configuration files
( .properties ). String is the only supported type in both file formats. Use the format that you find easier to
read and edit.
YAML file example:
<configuration-properties file="ports.yaml"/>
port: "8957"
http:
port: "8081"
http.port=8081
Explicação
POM.xml contains info about the project and configuration details used by Maven to build the project.
pom.xml File
<project root>/pom.xml
Project Object Model file that defines settings for a Maven project describing an application. It includes all
settings necessary to build the application such as build plugin configurations. Note that the pom.xml exists
on a per-project basis and is distributed along with a project.
8)
Explicação
Metadata is stored in application-types.xml flle located under src/main/resources.
Mule 4 applications contain an application-types.xml file, which is where metadata around your data types is
stored. For example, if you create a new CSV type, that metadata will be added to this file. This new file is
easy to share, commit, and merge when conflicts arise, which enables you to do more metadata-driven
development.
9)
Explicação
Gold is not valid category for connector types.
10)
Explicação
WSDL is used to define the contract in case of SOAP . RAML/OAS is used to REST services
11)
Explicação
Pick First is not valid type. Rest all are valid type of event processor.
Choice Router :
The Choice router dynamically routes messages through a flow according to a set of DataWeave
expressions that evaluate message content. Each expression is associated with a different routing option.
The effect is to add conditional processing to a flow, similar to an if / then / else code block in most
programming languages.
Only one of the routes in the Choice router executes, meaning that the first expression that evaluates
to true triggers that route’s execution and the others are not checked. If none of the expressions are true ,
then the default route executes.
Round Robin :
The Round Robin router iterates through a list of two or more routes in order, but it only routes to one of the
routes each time it is executed. It keeps track of the previously selected route and never selects the same
route consecutively. For example, the first time Round Robin executes, it selects the first route. The next
time, it selects the second route. If the previously selected route is the last route in the list, Round Robin
jumps to the first route.
First Successful :
The First Successful router iterates through a list of configured processing routes until one of the routes
executes successfully. If any processing route fails execution (throws an error), the router executes the next
configured route.
If none of the configured routes execute successfully, the First Successful router throws an error.
12)
Explicação
Choice router finds the FIRST true condition, then distribute the event to the ONE matched route.
The Choice router dynamically routes messages through a flow according to a set of DataWeave
expressions that evaluate message content. Each expression is associated with a different routing option.
The effect is to add conditional processing to a flow, similar to an if/then/else code block in most
programming languages.
Only one of the routes in the Choice router executes, meaning that the first expression that evaluates to true
triggers that route’s execution and the others are not checked. If none of the expressions are true, then the
default route executes.
13)
Explicação
Scatter-Gather Router
The Scatter-Gather component is a routing event processor that processes a Mule event through different
parallel processing routes that contain different event processors. Each route receives a reference to the
Mule event and executes a sequence of one or more event processors. Each of these routes uses a
separate thread to execute the event processors, and the resulting Mule event can be either the same Mule
event without modifications or a new Mule event with its own payload, attributes, and variables. The Scatter-
Gather component then combines the Mule events returned by each processing route into a new Mule event
that is passed to the next event processor only after every route completes successfully.
The Scatter-Gather component executes each route in parallel, not sequentially. Parallel execution of routes
can greatly increase the efficiency of your Mule application and may provide more information than
sequential processing.
The Scatter-Gather
component receives
a Mule event and sends a reference of this Mule event to each processing route. Each of the processing
routes starts executing in parallel. After all processors inside a route finish processing, the route returns a
Mule event, which can be either the same Mule event without modifications or a new Mule event created by
the processors in the route as a result of the modifications applied. After all processing routes have finished
execution, the Scatter-Gather component creates a new Mule event that combines all resulting Mule events
from each route, and then passes the new Mule event to the next component in the flow.
Based on above explanation , correct answer is Entire event would be sent to each route in parallel.
14)
Explicação
Correct answer is Validation module's Is Null operation
Validate Null
Fails if the value is not null and not an instance of NullPayload
15)
Explicação
In case of an error , batch job completes in flight steps and stops further processing.
MuleSoft Doc Ref : Handling Errors During Batch Job | MuleSoft Documentation
The default is all processing will stop but we can change it by Max Failed Record field.
General -> Max Failed Records: Mule has three options for handling a record-level error: Finish
processing, Continue processing and Continue processing until the batch job accumulates a maximum
number of failed records. This behavior can be controlled by Max Failed Records.
The value +ve integer, corresponds to Continue processing until the batch job accumulates a maximum
number of failed records.
16)
Explicação
MuleSoft Doc Ref : https://docs.mulesoft.com/api-manager/2.x/policy-mule3-tutorial-manage-an-api#to-add-
the-tier
17)
Explicação
Root element is always required while creating XML response in DataWeave transformation.
Mule Ref Doc : Select XML Elements | MuleSoft Documentation
18)
Explicação
You can define your own DataWeave functions using the fun declaration in the header of a DataWeave
script. Sample is as below. ----------------------------------------
%dw 2.0
output application/json
---
toUpper("hello")
19)
Explicação
One cloudhub worker can host one Mule application only.
CloudHub Workers
Workers are dedicated instances of Mule runtime engine that run your integration applications on CloudHub.
Workers have the following characteristics:
Capacity
Each worker has a specific amount of capacity to process data. Select the size of your workers when
configuring an application.
Isolation
Each worker runs in a separate container from every other application.
Manageability
Each worker is deployed and monitored independently.
Locality
Each worker runs in a specific worker cloud, such as the US, EU, or Asia-Pacific.
The memory capacity and processing power of a worker depends on how you configure it at the application
level.
Worker sizes have different compute, memory, and storage capacities.
20)
Explicação
Debugger can be used to debug applications to see event data moving from one flow to other.
When you run your application in Debug mode, the application stops immediately after executing the event
processor with the breakpoint. Using the Mule Debugger View, you can browse through the contents of the
message as it exists at that point in the flow, and evaluate a Dataweave expression against the captured
event.
The Visual Debugger is completely distinct from the Java Debugger contained in Studio; in fact, you may run
both debuggers concurrently on your application.
When debugging on your local machine, Studio Visual Debugger listens for incoming TCP connections on
localhost port 6666. This port must be available on your machine. This means not blocked by a firewall or
other security software.
21)
Explicação
Correct answer is PUT as it replaces the original version of the resource, whereas the PATCH method
supplies a set of instructions to modify the resource.
What is PUT?
PUT method is used to update resource available on the server. Typically, it replaces whatever exists at the
target URL with something else. You can use it to make a new resource or overwrite an existing one. PUT
requests that the enclosed entity must be stored under the supplied requested URI (Uniform Resource
Identifier).
GET
The GET method requests a representation of the specified resource. Requests using GET should only
retrieve data.
POST
The POST method submits an entity to the specified resource, often causing a change in state or side
effects on the server.
PATCH
The PATCH method applies partial modifications to a resource.
22)
Explicação
Its primary function is to design and develop fully functional Mule applications in a hosted development
environment which is the correct answer.
Flow Designer
In Flow Designer, you create Mule applications to integrate systems into workflows. You create them as
projects that have one or more flows. A project contains the flows for one Mule application. A flow consists of
a sequence of cards, with each card representing a core component, connector, module, or API. Each card
receives input data, carries out a specific task that makes use of the input data, and then sends the output
data from that task to the next card in the flow. The final card in a flow is usually one that sends a notification
that the Mule application has completed its task or that sends data.
23)
Explicação
Correct answer is Creates reusable APIs and assets designed to be consumed by other business units.
An application network is pretty simple; it is a way to connect applications, data and devices through APIs
that exposes some or all of their assets and data on the network. That network allows other consumers from
other parts of the business to come in and discover and use those assets. Building an application network
involves developing reusable assets and then encouraging those in the business to reuse and self-serve
those assets. Then, they can get used and reused in different ways inside the organization. Connections can
then be built between these assets. It is necessary to allow development teams in the business to build what
is needed — to self-serve the reusable assets created by others to in order to develop something new — and
then expose it to the rest of the organization to be reused.
24)
Explicação
Correct answer is Creates a mock service for an API
API Notebook is an open source, shareable web application for API documentation, interactive API tutorial
and example generatation, and a client for your API endpoints. Using API Notebook, you can make requests
and quickly transform the responses into readable format. However it cannot be used to mock service for an
API.
25)
Explicação
Correct answer is client-id-required
client-id-required enforces clients to add client_id and client_secret.
- client-id-required:
queryParameters:
client_id:
type: string
client_secret:
type: string
2) Reference the trait in each of the methods to specify that each of the methods require these query
parameters. After each method in the RAML file, add is: [client-id-required]. For example:
/users:
get:
is: [client-id-required]
26)
Explicação
Correct answer is Publish consume: Synchronous. Publish: Asynchronous.
Anypoint Connector for JMS (JMS Connector) Publish consume operation enables you to publish a
message to any specified destination, and then consume the message reply on a different specified
destination. Request and reply is a very common pattern between applications.
When using this operation, the JMSReplyTo header of the outgoing message contains the ID of the
destination on which your application waits to consume a response. The destination might be a well-known
destination or a temporary destination created with the purpose of receiving a single response message.
The result of the operation is the message received as a response, with the same structure as invoking the
Consume operation.
Mule Ref Doc : Publish Messages and Consume Replies Using the JMS Connector | MuleSoft
Documentation
Mule Ref Doc : Publish Messages Using the JMS Connector | MuleSoft Documentation
27)
Explicação
Correct answer is As query parameters in the HTTP Request operation
28)
Explicação
Correct answer is Array of Mule event objects
The file’s attributes section carries the file’s metadata (such as name, creation time, and size).
The List operation requires the directoryPath parameter, which represents the relative path of the directory
to list, unless you specify the full path of the directory. The path is relative to the working directory value
defined in the configuration referenced by the config-ref parameter. If no configuration is referenced, the
working directory defaults to the value of the user.home system property. If the system property is not set,
the connector fails to initialize.
Next is an example of a List operation that references a file configuration and thus uses a relative path:
<file:list config-ref="File_Config" directoryPath="relativePath" />
As mentioned earlier, this returns an array of messages. In Anypoint Studio, DataSense displays the
metadata for the operation’s output:
29)
Explicação
Core (dw::Core) This module contains core DataWeave functions for data transformations. It is automatically
imported into any DataWeave script.
30)
Explicação
Correct answer is Specify throttling , security and other policies
MuleSoft Doc Ref : https://docs.mulesoft.com/api-manager/2.x/api-gateway-capabilities-mule4