This page was exported from IT Certification Exam Braindumps [ http://blog.braindumpsit.com ] Export date:Sat Apr 12 19:09:26 2025 / +0000 GMT ___________________________________________________ Title: (Oct-2023) MCD-Level-2 Exam Dumps Contains FREE Real Quesions from the Actual Exam [Q20-Q35] --------------------------------------------------- (Oct-2023) MCD-Level-2 Exam Dumps Contains FREE Real Quesions from the Actual Exam Free Test Engine Verified By MuleSoft Certified Developer Certified Experts NO.20 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?  Create a health check endpoint that listens on a separate port and uses a separate HTTP Listener configuration from the API  Configure the application to send health data to an external system  Create a health check endpoint that reuses the same port number and HTTP Listener configuration as the API itself  Monitor the Payment API directly sending real customer payment data ExplanationTo 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-monitorNO.21 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?  Object Store v2 REST API  CloudHub Connector  Object Store Connector  CloudHub REST API ExplanationTo 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-apisNO.22 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?  Initialize, validate, compute, test, package, verify, install, deploy  Validate, initialize, compile, package, test, install, verify, verify, deploy  Validate, initialize, compile, test package, verify, install, deploy  Validation, initialize, compile, test, package, install verify, deploy ExplanationThe 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.htmlNO.23 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?  Create a properties file specifically for local development and set the API instance ID to a value that is not used in API Manager  Pass in the runtime parameter ”-Danpow.platform.gatekeeper=disabled”  Deactivate the API in API Manager so the Autodiscovery element will not find the application when it runs in Studio  Run the test as-s, with no changes because the Studio runtime will not attempt to connect to API Manager ExplanationTo 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-autodiscoveryhttps://docs.mulesoft.com/mule-runtime/4.3/configuring-propertiesNO.24 Refer to the exhibit.Based on the code snippet, schema,json file, and payload below, what is the outcome of the given code snippet when a request is sent with the payload?  The Mule flow will execute successfully with status code 200, and the response will be the JSON sent in request  The Mule flow will execute successfully with status code 204  The Mule flow will throw the exception ‘JSON:SCHEMA_NOT_HONOURED  The Mule flow will execute successfully with status code 200m and a response will display the message” Age in years which must equal to or greater than zero.” ExplanationBased on the code snippet, schema.json file, and payload below, the outcome of the given code snippet when a request is sent with the payload is that the Mule flow will throw the exception‘JSON:SCHEMA_NOT_HONOURED’. This is because the payload does not conform to the schema.json file, which specifies that age must be a number greater than or equal to zero. The payload has age as a string with a negative value, which violates the schema. Therefore, the validate-schema operation throws an error with type‘JSON:SCHEMA_NOT_HONOURED’. References:https://docs.mulesoft.com/json-module/1.1/json-validate-schemaNO.25 Refer to the exhibit.A Mule application pom.xml configures the Maven Resources plugin to exclude parsing binary files in the project’s src/main/resources/certs directory.Which configuration of this plugin achieves a successful build?         ExplanationTo configure the Maven Resources plugin to exclude parsing binary files in the project’s src/main/resources/certs directory, option C should be used. This option specifies that any files with .cer or .jks extensions under the certs directory should be excluded from filtering. Filtering is a process of replacing placeholders with actual values in resource files during the build process. Binary files should not be filtered because they may become corrupted or unusable. References:https://maven.apache.org/plugins/maven-resources-plugin/examples/filter.htmlhttps://maven.apache.org/plugins/maven-resources-plugin/examples/include-exclude.htmlNO.26 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?  Use flow variables within every logger processor to log the order ID  Set a flow variable and edit the log4/2.xml file to output the variable as part of the message pattern  Create a custom XML SDK component to wrap the logger processor and automatically add the order ID within the connector  Use the Tracing module to set logging variables with a Mapped Diagnostic Context ExplanationTo 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-variablesNO.27 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?  Create a dedicated endpoint that responds with the API status and reachability of the underlying systems  Create a dedicated endpoint that responds with the API status and health of the server  Use an existing resource endpoint of the API  Create a dedicated endpoint that responds with the API status only ExplanationTo 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-probesNO.28 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?  The test case fails with an assertion error  The test throws an error and does not start  The test case fails with an unexpected error type  The test case passes ExplanationBased 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-processorNO.29 Refer to the exhibit.When creating a new project, which API implementation allows for selecting the correct API version and scaffolding the flows from the API specification?  Import a published API  Generate a local RAML from anypoint Studio  Download RAML from Design Center’  Import RAML from local file ExplanationTo create a new project that selects the correct API version and scaffolds the flows from the API specification, the developer should import a published API. This option allows importing an API specification that has been published to Anypoint Exchange or Design Center, and selecting a specific version of that API specification.The developer can also choose to scaffold flows based on that API specification. References:https://docs.mulesoft.com/apikit/4.x/apikit-4-new-project-taskNO.30 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?  Use ‘After Test Case’ to produce the data needed from Flow-1 test cases to pass to Flow-2 test cases  Use ”Before Test Case” To collect data from Flow-1 test cases before running Flow-2 test cases  Chain together the test suites and test cases for Flow-1 and Flow-2  Use ”Set Event to pass the input that is needed, and keep the test cases for Flow-1 and Flow-2 independent ExplanationTo 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-flowNO.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?  Chain together the test suites and test cases for Flow-1 and Flow-2  Use ”Set Event to pass the input that is needed, and keep the test cases for Flow-1 and Flow-2 independent  Use ”Before Test Case” To collect data from Flow-1 test cases before running Flow-2 test cases  Use ‘After Test Case’ to produce the data needed from Flow-1 test cases to pass to Flow-2 test cases ExplanationTo 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-flowNO.32 A Mule application need to invoice an API hosted by an external system to initiate a process. The external API takes anywhere between one minute and 24 hours to compute its process.Which implementation should be used to get response data from the external API after it completes processing?  Use an HTTP Connector to invoke the API and wait for a response  Use a Scheduler to check for a response every minute  Use an HTTP Connector inside Async scope to invoice the API and wait for a response  Expose an HTTP callback API in Mule and register it with the external system ExplanationTo get response data from the external API after it completes processing, the developer should expose an HTTP callback API in Mule and register it with the external system. This way, the external API can invoke the callback API with the response data when it is ready, instead of making the Mule application wait for a long time or poll for a response repeatedly. References:https://docs.mulesoft.com/mule-runtime/4.3/http-listener-ref#callbackNO.33 An order processing system is composed of multiple Mule application responsible for warehouse, sales and shipping. Each application communication using Anypoint MQ. Each message must be correlated against the original order ID for observability and tracing.How should a developer propagate the order ID as the correlation ID across each message?  Use the underlying HTTP request of Anypoint MQ to set the ‘X-CORRELATION_ID’ header to the order ID  Set a custom Anypoint MQ user property to propagate the order ID and set the correlation ID in the receiving applications.  Use the default correlation ID, Anypoint MQ will sutomatically propagate it.  Wrap all Anypoint MQ Publish operations within a With CorrelationID scope from the Tracing module, setting the correlation ID to the order ID ExplanationTo propagate the order ID as the correlation ID across each message using Anypoint MQ, the developer should wrap all Anypoint MQ Publish operations within a With CorrelationID scope from the Tracing module, setting the correlation ID to the order ID. The With CorrelationID scope allows setting a custom correlation ID for any event that occurs within it. The Tracing module also enables distributed tracing across different Mule applications and services using Anypoint Monitoring. References:https://docs.mulesoft.com/tracing-module/1.0/tracing-module-reference#with-correlation-id-scopehttps://docs.mulesoft.com/tracing-module/1.0/tracing-module-conceptsNO.34 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?  Deployable ZIP file, YAML configuration file  JSON properties file, YAML configuration file  JSON properties file, XML template file  XML template file, YAML configuration file ExplanationTo 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-policyNO.35 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?  Enable the auto-generate CorrelationID option when scaffolding the flow  Enable the CorrelationID checkbox in the HTTP Listener configuration  Configure a custom correlation policy  NO action is needed as the correlation ID is returned to the caller in the response header by default ExplanationWhen 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 Loading … Use Real MuleSoft Achieve the MCD-Level-2 Dumps - 100% Exam Passing Guarantee: https://www.braindumpsit.com/MCD-Level-2_real-exam.html --------------------------------------------------- Images: https://blog.braindumpsit.com/wp-content/plugins/watu/loading.gif https://blog.braindumpsit.com/wp-content/plugins/watu/loading.gif --------------------------------------------------- --------------------------------------------------- Post date: 2023-10-13 11:08:00 Post date GMT: 2023-10-13 11:08:00 Post modified date: 2023-10-13 11:08:00 Post modified date GMT: 2023-10-13 11:08:00