MuleSoft MCD - Level 1 Practice Test - Questions Answers, Page 13
List of questions
Related questions
Question 121
Refer to the exhibits.
<a target='_blank' href='http://localhost:8081/'>What is the response when a client submits a request to http://localhost:8081?</a>
Explanation:
-----------------------------------------------------------------------------------------------------------------------------------
Here's specifically what is happening here:
1) Payload is successfully set to ''Before''
2) Is null validation is used which will pass the message only if payload is null. In this case as payload is not null, it creates an Error Object. Flow execution stops
#[error.description] = ''Validation error''
3) Because no error handler is defined, the Mule default error handler handles the error
4) ''Validation error'' is the error message returned to the requestor in the body of the HTTP request with HTTP Status Code: 500
Reference diagram:
Question 122
Refer to the exhibits.
How many private flows does APIKIt generate from RAML specification?
Explanation:
APIKIt Creates a separate flow for each HTTP method. Hence 4 private flows would be generated.
MuleSoft Documentation Referrence : https://docs.mulesoft.com/mule-runtime/4.3/build-application-from-api
Question 123
Refer to the exhibits.
Mule application has an HTTP request configuration where host name is hardcoded. Organization is looking to move host and port values to configuration file. What valid expression can be used to so that HTTP configuration can pick the value from configuration file?
Explanation:
Correct answer is ${training.host}
Question 124
Mule application contains ActiveMQ JMS dependency. Mule application was compiled and run successfully in Anypoint Studio. The mule application must now be exported from Anypoint Studio and shared with other developer. What export options should be selected to create the smallest JAR file that can be imported into other developer's Anypoint Studio and run successfully?
Explanation:
Correct answer is Select only Attach Project Sources only
You must keep the Attach Project Sources option selected to be able to import the packaged JAR file back into a Studio workspace.
Deselect the Include project modules and dependencies option.
This option skips bundling the actual modules and external dependencies required to run the Mule application in a Mule runtime engine, creating a lightweight JAR file package that does not include any dependencies specified in the Mule application's pom.xml file.
The generated JAR file is not a functional deployable archive and cannot be deployed to a Mule runtime engine, but instead offers a way to archive only the source files that make up the Mule application. This is the same as using the -lightWeightPackage flag when packaging using the Mule Maven Plugin and is useful if you want to distribute your project to other Studio installations because it only keeps a reference to all its dependencies. When you import a lightweight package into Studio, all your dependencies are automatically downloaded
MuleSoft Doc Ref : https://docs.mulesoft.com/studio/7.8/import-export-packages
Question 125
Refer to exhibits.
What message should be added to Logger component so that logger prints 'The city is Pune' (Double quote should not be part of logged message)?
Explanation:
Correct answer is The city is #[payload.City]
Answer can get confused with the option #['The city is' ++ payload.City] But note that this option will not print the space between is and city name. This will print The city isPune
Question 126
Refer to the exhibits.
A web client submits the request to the HTTP Listener. What response message would be returned to web client?
Explanation:
Correct answer is String is not blank.
-------------------------------------------------------------------------------------------------------------------------------------------------
Here's specifically what is happening here:
1) Payload is successfully set to ''Start''
2) The Is Blank String validator creates an Error Object because the payload is string 'Start'. Execution stops
#[error.description] = ''String is not blank''
3) Because no error handler is defined, the Mule default error handler handles the error. Remember, at its heart, the Mule Default Error handler is an error handling scope with just an on error propagate
4) ''String is not blank'' is the error message returned to the requestor in the body of the HTTP requestHTTP Status Code: 500
Reference Diagram:
Question 127
What is minimal requirement in a flow for a Mule application to compile?
Explanation:
Process section is must to get compiles. Process section must have one or more processors
Question 128
What is the purpose of the api:router element in APIkit?
Explanation:
The APIkit Router is a key message processor that validates requests against the provided definition, enriches messages (for example by adding default values to the messages) and routes requests to a particular flow. Also, the Router raises errors messages if errors occurs while routing, validating or processing the user request.
Question 129
How we can scale deployed Mule application vertically on cloudhub?
Explanation:
Mule applications can be scaled vertically by changing worker size. Mule applications can be scaled horizontally by adding more workers.
Question 130
What is not the function of API Gateway ?
Explanation:
Correct answer is Specify throttling , security and other policies
MuleSoft Doc Ref : https://docs.mulesoft.com/api-manager/2.x/api-gateway-capabilities-mule4
API Gateway is responsible for below functions.
1) Determine which traffic is authorized
2) Meter the traffic
3) Logs transaction
4) Apply throttling and other policies (Not specifying. These are specified in API Manager)
Question