Real MuleSoft MCD-Level-2 Exam Dumps with Correct 62 Questions and Answers
Valid MCD-Level-2 Test Answers & MuleSoft MCD-Level-2 Exam PDF
NEW QUESTION # 20
A Mule application for processing orders must log the order ID for every log message output.
What is a best practice to enrich every log message with the order ID?
- A. Set a flow variable and edit the log4/2.xml file to output the variable as part of the message pattern
- B. Create a custom XML SDK component to wrap the logger processor and automatically add the order ID within the connector
- C. Use the Tracing module to set logging variables with a Mapped Diagnostic Context
- D. Use flow variables within every logger processor to log the order ID
Answer: C
Explanation:
To enrich every log message with the order ID, the developer should use the Tracing module to set logging variables with a Mapped Diagnostic Context (MDC). The Tracing module allows adding custom key-value pairs to log messages using MDC variables. The developer can use Set Logging Variables operation to set the order ID as an MDC variable and then use it in any logger processor within the same thread or event.
References:https://docs.mulesoft.com/tracing-module/1.0/tracing-module-reference#set-logging-variables
NEW QUESTION # 21
A custom policy needs to be developed to intercept all cutbound HTTP requests made by Mule applications.
Which XML element must be used to intercept outbound HTTP requests?
- A. http-policy:source
- B. http-policy:processor
- C. It is not possible to intercept outgoing HTTP requests, only inbound requests
- D. htt-policy:operation
Answer: A
Explanation:
The http-policy:processor element is used to intercept outbound HTTP requests made by Mule applications. It allows customizing the request before it is sent to the target API and modifying the response after it is received from the target API.
References:https://docs.mulesoft.com/api-manager/2.x/policy-mule4-custom-policy#policy-xml-file
NEW QUESTION # 22
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. Chain together the test suites and test cases for Flow-1 and Flow-2
- B. Use ''Before Test Case'' To collect data from Flow-1 test cases before running Flow-2 test cases
- C. Use ''Set Event to pass the input that is needed, and keep the test cases for Flow-1 and Flow-2 independent
- D. Use 'After Test Case' to produce the data needed from Flow-1 test cases to pass to Flow-2 test cases
Answer: C
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 # 23
Refer to the exhibit.
What required changes can be made to give a partial successful response in case the United Airlines API returns with a timeout?
- A. Add Flow Reference components inside a Try scope.
Set the payload to a default value'' insider the error handler using the ON Error Continue scope - B. Add a Scatter-gather component inside a Try scope.
Set the payload to a default value 'Error' inside the error handler using the On Error Propagate scope. - C. Add a Scatter-Gather component inside a Try scope.
Set the payload to a default value 'Error'' inside the error handler using the On Error Continue scope. - D. Add Flow Reference components inside a Try scope
Set the payload to a default value '' inside the error handler using the On Error Propagate scope
Answer: C
Explanation:
To give a partial successful response in case the United Airlines API returns with a timeout, the developer should add a Scatter-Gather component inside a Try scope, and set the payload to a default value 'Error' inside the error handler using the On Error Continue scope. A Scatter-Gather component allows sending multiple requests concurrently and aggregating the responses into an array. A Try scope allows handling errors that occur within it using an error handler. An On Error Continue scope allows continuing the flow execution after handling an error. Therefore, by using these components, the developer can send requests to both APIs in parallel, handle any timeout errors from United Airlines API, and return a partial response with a default value for that API. References: https://docs.mulesoft.com/mule-runtime/4.3/scatter-gather-concept
https://docs.mulesoft.com/mule-runtime/4.3/try-scope-concepthttps://docs.mulesoft.com/mule-runtime/4.3/on-err
NEW QUESTION # 24
Which plugin or dependency is required to unit test modules created with XML SDK?
- A. Junit
- B. XMLUnit
- C. MUnit Extensions Maven plugin
- D. MUnit Maven plugin
Answer: C
Explanation:
Explanation
To unit test modules created with XML SDK, the developer needs to use the MUnit Extensions Maven plugin.
This plugin allows testing XML SDK modules using MUnit by adding a dependency to the module under test and using a custom processor tag to invoke it. References:
https://docs.mulesoft.com/mule-sdk/1.1/xml-sdk#testing
NEW QUESTION # 25
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. Chain together the test suites and test cases for Flow-1 and Flow-2
- B. Use ''Before Test Case'' To collect data from Flow-1 test cases before running Flow-2 test cases
- C. Use ''Set Event to pass the input that is needed, and keep the test cases for Flow-1 and Flow-2 independent
- D. Use 'After Test Case' to produce the data needed from Flow-1 test cases to pass to Flow-2 test cases
Answer: C
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 # 26
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. Initialize, validate, compute, test, package, verify, install, deploy
- D. Validate, initialize, compile, test package, verify, install, deploy
Answer: D
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 # 27
Mule application A is deployed to CloudHub and is using Object Store v2. Mute application B is also deployed to CloudHub.
Which approach can Mule application B use to remove values from Mule application A'S Object Store?
- A. Object Store Connector
- B. Object Store v2 REST API
- C. CloudHub REST API
- D. CloudHub Connector
Answer: B
Explanation:
Explanation
To remove values from Mule application A's Object Store v2, Mule application B can use Object Store v2 REST API. This API allows performing operations on Object Store v2 resources using HTTP methods, such as GET, POST, PUT, and DELETE. Mule application B can use the DELETE method to remove values from Mule application A's Object Store v2 by specifying the object store ID and the key of the value to delete.
References: https://docs.mulesoft.com/object-store/osv2-apis
NEW QUESTION # 28
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:
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 # 29
Which type of cache invalidation does the Cache scope support without having to write any additional code?
- A. Write-through invalidation
- B. White-behind invalidation
- C. Notification-based invalidation
- D. Time to live
Answer: D
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 # 30
Which configurations are required for HTTP Listener to enable mTLS authentication?
- A. Set an appropriate keystore configuration and use persistent connections for the listener
- B. Set an appropriate reconnection strategy and use persistent connections for the listener
- C. Set an appropriate keystore and truststore configuration for the listener
- D. Set an appropriate truststore configuration and reconnection strategy for the listener
Answer: C
Explanation:
To enable mTLS authentication for HTTP Listener, the developer needs to set an appropriate keystore and truststore configuration for the listener. The keystore contains the certificate and private key of the Mule application that are used to prove its identity to clients. The truststore contains the certificates of trusted clients that are allowed to access the Mule application.References:https://docs.mulesoft.com/mule-runtime/4.3/tls-configuration#mutual-authentication
NEW QUESTION # 31
When implementing a synchronous API where the event source is an HTTP Listener, a developer needs to return the same correlation ID back to the caller in the HTTP response header.
How can this be achieved?
- A. Configure a custom correlation policy
- B. Enable the CorrelationID checkbox in the HTTP Listener configuration
- C. NO action is needed as the correlation ID is returned to the caller in the response header by default
- D. Enable the auto-generate CorrelationID option when scaffolding the flow
Answer: C
Explanation:
When implementing a synchronous API where the event source is an HTTP Listener, Mule automatically propagates some message attributes between flows via outbound and inbound properties. One of these attributes is correlation ID, which is returned to the caller in the response header by default as MULE_CORRELATION_ID. References:
https://docs.mulesoft.com/mule-runtime/4.3/about-mule-message#message-attributes
NEW QUESTION # 32
An API has been developed and deployed to CloudHub Among the policies applied to this API is an allowlist of IP addresses. A developer wants to run a test in Anypoint Studio and does not want any policies applied because their workstation is not included in the allowlist.
What must the developer do in order to run this test locally without the policies applied?
- A. Create a properties file specifically for local development and set the API instance ID to a value that is not used in API Manager
- B. Deactivate the API in API Manager so the Autodiscovery element will not find the application when it runs in Studio
- C. Run the test as-s, with no changes because the Studio runtime will not attempt to connect to API Manager
- D. Pass in the runtime parameter ''-Danpow.platform.gatekeeper=disabled''
Answer: A
Explanation:
Explanation
To run a test locally without the policies applied, the developer should create a properties file specifically for local development and set the API instance ID to a value that is not used in API Manager. This way, the developer can use different configuration properties for different environments and avoid triggering API autodiscovery when running tests locally. API autodiscovery is a mechanism that associates an API implementation with its corresponding API specification and policies in API Manager based on its API instance ID. By setting this ID to a value that does not exist in API Manager, the developer can prevent API autodiscovery from finding and applying any policies to the local test. References:
https://docs.mulesoft.com/api-manager/2.x/api-auto-discovery-new-concept#configuring-api-autodiscovery
https://docs.mulesoft.com/mule-runtime/4.3/configuring-properties
NEW QUESTION # 33
A system API that communicates to an underlying MySQL database is deploying to CloudHub. The DevOps team requires a readiness endpoint to monitor all system APIs.
Which strategy should be used to implement this endpoint?
- A. Create a dedicated endpoint that responds with the API status and reachability of the underlying systems
- B. Use an existing resource endpoint of the API
- C. Create a dedicated endpoint that responds with the API status and health of the server
- D. Create a dedicated endpoint that responds with the API status only
Answer: A
Explanation:
Explanation
To implement a readiness endpoint to monitor all system APIs, the developer should create a dedicated endpoint that responds with the API status and reachability of the underlying systems. This way, the DevOps team can check if the system API is ready to receive requests and if it can communicate with its backend systems without errors. References:
https://docs.mulesoft.com/mule-runtime/4.3/deployment-strategies#readiness-probes
NEW QUESTION # 34
The flow is invoicing a target API. The API's protocol is HTTPS. The TLS configuration in the HTTP Request Configuration global element is set to None. A web client submits a request to
http:localhost:8081/vehicles.
If the certificate of the target API is signed by a certificate authority (CA), what is true about the HTTP Request operation when the flow executes?
- A. The HTTP Request operation will succeed if the CA'S certificate is present in the JRE's default keystore
- B. The HTTP Request operation will succeed if the CA's certificate is present in the JRE's default truststore.
- C. The HTTP Request operation will always succeed regardless of the CA
- D. The HTTP Request operation will always fail regardless of the CA
Answer: B
Explanation:
Explanation
The HTTP Request operation will use the default truststore of the JRE to validate the certificate of the target API. If the CA's certificate is present in the truststore, the operation will succeed. Otherwise, it will fail with a handshake exception. References: https://docs.mulesoft.com/mule-runtime/4.3/tls-configuration#tls-default
NEW QUESTION # 35
An organization uses CloudHub to deploy all of its applications.
How can a common-global-handler flow be configured so that it can be reused across all of the organization's deployed applications?
- A. Create a Mule daman project.
Create a common-global-error-handler flow inside the domain project.
Use this domain project as a dependency. - B. Create a Mule Plugin project
Create a common-global-error-handler flow inside the plugin project.
Use this plugin as a dependency in all Mule applications - C. Create a common-global-error-handler flow in all Mule Applications Refer to it flow-ref wherever needed.
- D. Create a Mule plugin project
Create a common-global-error-handler flow inside the plugin project.
Use this plugin as a dependency in all Mute applications.
Import that configuration file in Mute applications.
Answer: B
Explanation:
Explanation
To configure a common-global-handler flow that can be reused across all of the organization's deployed applications, the developer should create a Mule Plugin project, create a common-global-error-handler flow inside the plugin project, and use this plugin as a dependency in all Mule applications. This way, the developer can import the common-global-error-handler flow in any application that needs it and avoid duplicating the error handling logic. References:
https://docs.mulesoft.com/mule-runtime/4.3/error-handling#global-error-handler
NEW QUESTION # 36
Which command is used to convert a JKS keystore to PKCS12?
- A. Keytool-importkeystore -srckeystore keystore jks-srcstoretype JKS -destkeystore keystore.p13
-deststoretype PKCS12 - B. Keytool-importkeystore -srckeystore keystore jks-srcstoretype PKCS12 -destkeystore keystore.p12
-deststoretype JKS - C. Keytool-importkeystore -srckeystore keystore p12-srcstoretype PKCS12 -destkeystore keystore.jks
-deststoretype JKS - D. Keytool-importkeystore -srckeystore keystore p12-srcstoretype JKS -destkeystore keystore.p12
-deststoretype PKCS12
Answer: D
Explanation:
To convert a JKS keystore to PKCS12, the developer needs to use the keytool-importkeystore command with the following options: -srckeystore keystore.jks -srcstoretype JKS -destkeystore keystore.p12 -deststoretype PKCS12. This command imports all entries from a source JKS keystore (keystore.jks) into a destination PKCS12 keystore (keystore.p12).
References:https://docs.oracle.com/en/java/javase/11/tools/keytool.html#GUID-5990A2E4-78E3-47B7-AE75-6D
NEW QUESTION # 37
A heathcare customer wants to use hospital system data, which includes code that was developed using legacy tools and methods. The customer has created reusable Java libraries in order to read the data from the system.
What is the most effective way to develop an API retrieve the data from the hospital system?
- A. Install libraries in a local repository and refer to it in the pm.xml file
- B. Refer to JAR files in the code
- C. Include the libraries writes deploying the code into the runtime
- D. Create the Java code in your project and invoice the data from the code
Answer: A
Explanation:
Explanation
To develop an API that retrieves data from a hospital system using reusable Java libraries, the developer should install libraries in a local repository and refer to it in the pom.xml file. This way, the developer can use Maven to manage dependencies and invoke Java code from Mule applications using Java Module operations.
References:
https://docs.mulesoft.com/mule-runtime/4.3/java-module-reference#add-the-java-module-to-your-project
https://docs.mulesoft.com/mule-runtime/4.3/java-module-reference#invoke-java-code
NEW QUESTION # 38
Which statement is true when using XML SDK for creating custom message processors?
- A. All operations are public
- B. Operations can be reused in recursive calls
- C. An XML SDK provides both inbound and outbound operations
- D. Properties are fields defined by an end user of the XML SDK component and serve as a global configuration for the entire Mule project in which they are used
Answer: A
Explanation:
Explanation
When using XML SDK for creating custom message processors, all operations are public by default and can be used by any Mule application that imports them. There is no way to make an operation private or protected in XML SDK. References: https://docs.mulesoft.com/mule-sdk/1.1/xml-sdk#operations
NEW QUESTION # 39
......
MCD-Level-2 Exam Questions and Valid PMP Dumps PDF: https://www.examslabs.com/MuleSoft/MuleSoft-Certified-Developer/best-MCD-Level-2-exam-dumps.html