Get Latest Sep-2023 Real MCD-Level-2 Exam Questions and Answers FREE
Truly Beneficial For Your MuleSoft Exam (Updated 62 Questions)
NEW QUESTION # 27
A Mule implementation uses a HTTP Request within an Unit Successful scope to connect to an API.
How should a permanent error response like HTTP:UNAUTHORIZED be handle inside Until Successful to reduce latency?
- A. Put the HTTP Request inside a try scope in Unit Successful.
In the error handler, use On Error Continue to catch permanent errors like HTTP UNAUTHORIZED. - B. Put the HTTP Request inside a try scope in Unit Successful.
In the error handler, use On Error Propagate to catch permanent errors like HTTP UNAUTHORIZED. - C. In Until Successful configuration, set the retry count to 1 for error type HTTP: UNAUTHORIZED.
- D. Configure retrying until a MULERETRY_EXHAUSTED error is raised or the API responds back with a successful response.
Answer: A
Explanation:
Explanation
To handle a permanent error response like HTTP:UNAUTHORIZED inside Until Successful, the developer should put the HTTP Request inside a try scope in Unit Successful, and use On Error Continue to catch permanent errors like HTTP UNAUTHORIZED in the error handler. This way, the developer can avoid retrying requests that will always fail due to a permanent error, and reduce latency. On Error Continue allows the flow to continue processing after handling the error. References:
https://docs.mulesoft.com/mule-runtime/4.3/until-successful-scope
https://docs.mulesoft.com/mule-runtime/4.3/on-error-continue-concept
NEW QUESTION # 28
A Mule application includes a subflow containing a Scatter.Gather scope. Within each log of the Scatter.Gatter. an HTTP connector calls a PUT endpoint to modify records in different upstream system. The subflow is called inside an Unit successful scope to retry if a transitory exception is raised.
A technical spike is being performed to increase reliability of the Mule application.
Which steps should be performed within the Mule flow above the ensure idempontent behavior?
- A. Ensure an error-handling flow performs corrective actions to roll back all changes if any leg of the Scatter-Gather fails
- B. Change the PUT requests inside the Scatter-Gather to POST requests
- C. None, the flow already exhibits idempotent behavior
- D. Remove the Put requests from the Scatter-Getter and perform them sequentially
Answer: A
Explanation:
Explanation
To ensure idempotent behavior within a Mule flow that contains a subflow with a Scatter-Gather scope, the developer should ensure an error-handling flow performs corrective actions to roll back all changes if any leg of the Scatter-Gather fails. Idempotency means that multiple identical requests have the same effect as a single request. Therefore, if one of the HTTP requests inside the Scatter-Gather fails, the error-handling flow should undo any changes made by other successful requests to ensure consistency and avoid partial updates.
References: https://docs.mulesoft.com/mule-runtime/4.3/scatter-gather-concept
https://docs.mulesoft.com/mule-runtime/4.3/error-handling
NEW QUESTION # 29
A healthcare portal needs to validate the token that it sends to a Mule API. The developer plans to implement a custom policy using the HTTP Policy Transform Extension to match the token received in the header from the heathcare portal.
Which files does the developer need to create in order to package the custom policy?
- A. JSON properties file, YAML configuration file
- B. Deployable ZIP file, YAML configuration file
- C. JSON properties file, XML template file
- D. XML template file, YAML configuration file
Answer: D
Explanation:
Explanation
To package a custom policy using the HTTP Policy Transform Extension, the developer needs to create an XML template file and a YAML configuration file. The XML template file defines the policy logic using Mule components and placeholders for user-defined properties. The YAML configuration file defines the metadata of the policy, such as its name, description, category, parameters, and dependencies. References:
https://docs.mulesoft.com/api-manager/2.x/http-policy-transform#packaging-the-policy
NEW QUESTION # 30
Refer to the exhibit.
A developer generates the base scaffolding for an API in Anypoint Studio.
Which HTTP status code is returned while testing using the API Kit console if no values are entered in client-secret?
- A. HTTP status code:403
- B. HTTP status code:200
- C. HTTP status code:400
- D. HTTP status code:500
Answer: A
Explanation:
Explanation
Based on the code snippet and schema.json file below, when testing using the API Kit console if no values are entered in client-secret, HTTP status code 403 (FORBIDDEN) is returned. This is because client-secret is defined as a required header parameter in schema.json file, which means that it must be present in every request. If no values are entered in client-secret, then it is equivalent to omitting this header parameter, which violates the schema and causes APIKit Router to return HTTP status code 403. References:
https://docs.mulesoft.com/apikit/4.x/apikit-4-headers
NEW QUESTION # 31
In a Mule project, Flow-1 contains a flow-ref to Flow-2 depends on data from Flow-1 to execute successfully.
Which action ensures the test suites and test cases written for Flow-1 and Flow-2 will execute successfully?
- A. Use 'After Test Case' to produce the data needed from Flow-1 test cases to pass to Flow-2 test cases
- B. Use ''Set Event to pass the input that is needed, and keep the test cases for Flow-1 and Flow-2 independent
- C. Use ''Before Test Case'' To collect data from Flow-1 test cases before running Flow-2 test cases
- D. Chain together the test suites and test cases for Flow-1 and Flow-2
Answer: B
Explanation:
Explanation
To ensure the test suites and test cases written for Flow-1 and Flow-2 will execute successfully, the developer should use a Set Event processor to pass the input that is needed by Flow-2, and keep the test cases for Flow-1 and Flow-2 independent. This way, the developer can isolate the testing of each flow and avoid coupling them together. References: https://docs.mulesoft.com/munit/2.3/munit-test-flow
NEW QUESTION # 32
A mule application exposes and API for creating payments. An Operations team wants to ensure that the Payment API is up and running at all times in production.
Which approach should be used to test that the payment API is working in production?
- A. Monitor the Payment API directly sending real customer payment data
- B. Create a health check endpoint that reuses the same port number and HTTP Listener configuration as the API itself
- C. Create a health check endpoint that listens on a separate port and uses a separate HTTP Listener configuration from the API
- D. Configure the application to send health data to an external system
Answer: C
Explanation:
Explanation
To test that the payment API is working in production, the developer should create a health check endpoint that listens on a separate port and uses a separate HTTP Listener configuration from the API. This way, the developer can isolate the health check endpoint from the API traffic and avoid affecting the performance or availability of the API. The health check endpoint should return a simple response that indicates the status of the API, such as OK or ERROR. References:
https://docs.mulesoft.com/api-functional-monitoring/afm-create-monitor#create-a-monitor
NEW QUESTION # 33
Which statement is true when working with correlation IDS?
- A. The Anypoint MQ Connector automatically propagates correlation IDS
- B. The HTTP Listener regenerates correlation IDs regardless of the HTTP request
- C. The HTTP Listener generates correlation IDS unless a correlation ID is received in the HTTP request
- D. The VM Connector does not automatically propagate correction IDs
Answer: C
Explanation:
Explanation
When working with correlation IDs, the HTTP Listener generates correlation IDs unless a correlation ID is received in the HTTP request. In that case, it propagates the received correlation ID throughout the flow execution. Correlation IDs are used to track events across different flows or applications. References:
https://docs.mulesoft.com/mule-runtime/4.3/about-mule-message#message-attributes
NEW QUESTION # 34
A company has been using CI/CD. Its developers use Maven to handle build and deployment activities.
What is the correct sequence of activities that takes place during the Maven build and deployment?
- A. Validation, initialize, compile, test, package, install verify, deploy
- B. Validate, initialize, compile, package, test, install, verify, verify, deploy
- C. Validate, initialize, compile, test package, verify, install, deploy
- D. Initialize, validate, compute, test, package, verify, install, deploy
Answer: C
Explanation:
Explanation
The correct sequence of activities that takes place during the Maven build and deployment is validate, initialize, compile, test package, verify, install, deploy. These are Maven lifecycle phases that define a sequence of goals to execute during a build process. Each phase represents a stage in the build lifecycle and can have zero or more goals bound to it. References:
https://maven.apache.org/guides/introduction/introduction-to-the-lifecycle.html
NEW QUESTION # 35
Which pattern should be used to invoke multiple HTTP APIs in parallel and roll back failed requests in sequence?
- A. VM queues as a reliability pattern with error handlers to roll back any requests
- B. A database as a transactional outbox and an Until Successful router to retry any requests
- C. A Parallel for Each scope with each HTTP request wrapped in a Try scope
- D. Scatter-Gather as central Saga orchestrator for all API request with compensating actions for failing routes
Answer: D
Explanation:
Explanation
To invoke multiple HTTP APIs in parallel and roll back failed requests in sequence, the developer should use a Scatter-Gather router as a central Saga orchestrator for all API requests with compensating actions for failing routes. A Scatter-Gather router executes multiple routes concurrently and aggregates the results. A Saga orchestrator coordinates a series of actions across different services and handles failures by executing compensating actions. Therefore, using a Scatter-Gather router as a Saga orchestrator allows invoking multiple HTTP APIs in parallel and rolling back any failed requests in sequence. References:
https://docs.mulesoft.com/mule-runtime/4.3/scatter-gather-concept
https://docs.mulesoft.com/mule-runtime/4.3/saga
NEW QUESTION # 36
Refer to the exhibit.
What is the result if ''Insecure'' selected as part of the HTTP Listener configuration?
- A. The HTTP Lister will accept any unauthenticated request
- B. The HTTP Listener will trust any certificate presented by the HTTP client
- C. Mutual TLS authentication will be enabled between this HTTP Listener and an HTTP client
- D. The HTTP listener will only accept HTTP requests
Answer: D
Explanation:
Explanation
Based on the exhibit below, if 'Insecure' is selected as part of the HTTP Listener configuration, the HTTP listener will only accept HTTP requests. This means that no TLS context will be configured for this listener and no encryption or authentication will be applied to incoming requests. The protocol attribute of this listener will be set to HTTP instead of HTTPS. References:
https://docs.mulesoft.com/http-connector/1.6/http-listener-ref#insecure
NEW QUESTION # 37
A developer is working on a project that requires encrypting all data before sending it to a backend application. To accomplish this, the developer will use PGP encryption in the Mule 4 Cryptography module.
What is required to encrypt the data before sending it to the backend application?
- A. The application needs the private key from the backend service to encrypt the data
- B. The application needs to both the private and public keys to encrypt the data
- C. The application needs to configure HTTPS TLS context information to encrypt the data
- D. The application needs the public key from the backend service to encrypt the data
Answer: D
Explanation:
Explanation
To encrypt the data before sending it to the backend application using PGP encryption, the application needs the public key from the backend service. PGP encryption uses a public-key cryptography system, which means that each party has a pair of keys: a public key and a private key. The public key is used to encrypt data, and the private key is used to decrypt data. Therefore, to encrypt data for a specific recipient (the backend service), the application needs to use the recipient's public key. The recipient can then use its own private key to decrypt the data. References: https://docs.mulesoft.com/mule-runtime/4.3/cryptography-pgp
NEW QUESTION # 38
A Mule application contain two policies Policy A and Policy A has order1, and Policy B has order 2. Policy A Policy B, and a flow are defined by he configuration below.
When a HTTP request arrives at the Mule application's endpoint, what will be the execution order?
- A. B1, A1, F1, A2, B2
- B. A1, B1, F1, B2, A2
- C. F1, A1, B1, B2, A2
- D. F1, B1, A1, A2, B2
Answer: B
Explanation:
Explanation
Based on the configuration below, when a HTTP request arrives at the Mule application's endpoint, the execution order will be A1, B1, F1, B2, A2. This is because policies are executed before and after the API implementation flow according to their order attribute. Policy A has order 1, which means it is executed first before Policy B, which has order 2. The flow is executed after both policies are executed before the flow.
Then, Policy B is executed after the flow before Policy A is executed after the flow. References:
https://docs.mulesoft.com/api-manager/2.x/policies-policy-order
NEW QUESTION # 39
Which type of cache invalidation does the Cache scope support without having to write any additional code?
- A. Time to live
- B. Write-through invalidation
- C. Notification-based invalidation
- D. White-behind invalidation
Answer: A
Explanation:
Explanation
The Cache scope supports time to live (TTL) as a cache invalidation strategy without having to write any additional code. TTL specifies how long the cached response is valid before it expires and needs to be refreshed. The Cache scope also supports custom invalidation strategies using MEL or DataWeave expressions. References: https://docs.mulesoft.com/mule-runtime/4.3/cache-scope#cache_invalidation
NEW QUESTION # 40
The Center for Enablement team published a common application as a reusable module to the central Nexus repository.
How can the common application be included in all API implementations?
- A. Add a Maven dependency in the PCM file with multiple-plugin as <classifier>
- B. Add a Maven dependency in the POM file with jar as <classifier>
- C. Copy the common application's source XML file and out it in a new flow file in the src/main/mule folder
- D. Download the common application from Naxus and copy it to the src/main/resources folder in the API
Answer: B
Explanation:
Explanation
To include a common application as a reusable module in all API implementations, the developer should add a Maven dependency in the POM file with jar as <classifier>. This way, the developer can reuse Mule code from another application by packaging it as a JAR file and adding it as a dependency in the POM file of the API implementation. The classifier element specifies that it is a JAR file. References:
https://docs.mulesoft.com/mule-runtime/4.3/mmp-concept#add-a-maven-dependency-to-the-pom-file
NEW QUESTION # 41
Refer to the exhibit.
The flow name is ''implementation'' with code for the MUnit test case.
When the MUnit test case is executed, what is the expected result?
- A. The test case passes
- B. The test case fails with an unexpected error type
- C. The test throws an error and does not start
- D. The test case fails with an assertion error
Answer: D
Explanation:
Explanation
Based on the code snippet and MUnit test case below, when the MUnit test case is executed, the expected result is that the test case fails with an assertion error. This is because the assert-equals processor compares two values for equality, and fails if they are not equal. In this case, the expected value is 'Hello World', but the actual value returned by the implementation flow is 'Hello Mule'. Therefore, the assertion fails and an error is thrown. References: https://docs.mulesoft.com/munit/2.3/assert-equals-processor
NEW QUESTION # 42
In a Mule project, Flow-1 contains a flow-ref to Flow-2 depends on data from Flow-1 to execute successfully.
Which action ensures the test suites and test cases written for Flow-1 and Flow-2 will execute successfully?
- A. Use 'After Test Case' to produce the data needed from Flow-1 test cases to pass to Flow-2 test cases
- B. Use ''Set Event to pass the input that is needed, and keep the test cases for Flow-1 and Flow-2 independent
- C. Use ''Before Test Case'' To collect data from Flow-1 test cases before running Flow-2 test cases
- D. Chain together the test suites and test cases for Flow-1 and Flow-2
Answer: B
Explanation:
Explanation
To ensure the test suites and test cases written for Flow-1 and Flow-2 will execute successfully, the developer should use a Set Event processor to pass the input that is needed by Flow-2, and keep the test cases for Flow-1 and Flow-2 independent. This way, the developer can isolate the testing of each flow and avoid coupling them together. References: https://docs.mulesoft.com/munit/2.3/munit-test-flow
NEW QUESTION # 43
Multiple individual Mute application need to use the Mule Maven plugin to deploy to CloudHub.
The plugin configuration should .. reused where necessary and anything project, specific should be property-based.
Where should the Mule Maven details be configured?
- A. Pom, xml
- B. Settings, xml
- C. A Bill of Materials (BOM) parent pm
- D. A parent pom.xml
Answer: D
Explanation:
Explanation
To reuse Mule Maven plugin configuration across multiple individual Mule applications, the developer should use a parent pom.xml file. A parent pom.xml file defines common configuration for one or more child projects that inherit from it. The developer can specify common properties and dependencies for all child projects in the parent pom.xml file, such as Mule Maven plugin configuration, and then reference them in each child project's pom.xml file using placeholders. References:
https://docs.mulesoft.com/mule-runtime/4.3/mmp-concept#parent-pom
https://maven.apache.org/guides/introduction/introduction-to-the-pom.html#Project_Inheritance
NEW QUESTION # 44
A developer has created the first version of an API designed for business partners to work commodity prices.
What should developer do to allow more than one major version of the same API to be exposed by the implementation?
- A. In Design Center, open the RAML and modify each operation to include the major version number
- B. In Anypoint Studio, generate scaffolding from the RAML, and then modify the flow names generated by APIKit to include a variable with the major version number
- C. In Design Center, open the RAML and modify baseUn to include a variable that indicates the version number
- D. In Anypoint Studio, generate scaffolding from the RAML, and the modify the <http:listerner> in the generated flows to include a parameter to replace the version number
Answer: C
Explanation:
Explanation
To allow more than one major version of the same API to be exposed by the implementation, the developer should modify the baseUri property in the RAML file to include a variable that indicates the version number.
The baseUri property defines the base URL of the API and can include variables that are replaced with actual values when mocking or deploying the API. By using a variable for the version number, the developer can expose different versions of the API using different base URLs and avoid conflicts or confusion. References:
https://docs.mulesoft.com/api-designer/design-modify-raml-specs#baseuri
https://docs.mulesoft.com/api-manager/2.x/api-versioning
NEW QUESTION # 45
......
MCD-Level-2 dumps Free Test Engine Verified By It Certified Experts: https://www.prep4king.com/MCD-Level-2-exam-prep-material.html

