Use Free MCD-Level-2 Exam Questions that Stimulates Actual EXAM [Q16-Q37]

Share

Use Free MCD-Level-2 Exam Questions that Stimulates Actual EXAM

Get 100% Real MCD-Level-2 Free Online Practice Test

NEW QUESTION # 16
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. NO action is needed as the correlation ID is returned to the caller in the response header by default
  • B. Enable the CorrelationID checkbox in the HTTP Listener configuration
  • C. Enable the auto-generate CorrelationID option when scaffolding the flow
  • D. Configure a custom correlation policy

Answer: A

Explanation:
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 # 17
A new Mule project has been created in Anypoint Studio with the default settings.
Which file inside the Mule project must be modified before using Maven to successfully deploy the application?

  • A. Settings.xml
  • B. Mule.artificact.json
  • C. Pom.xml
  • D. Config.yaml

Answer: C

Explanation:
Explanation
To use Maven to successfully deploy the application, the developer needs to modify the pom.xml file inside the Mule project. The pom.xml file contains the configuration and dependencies of the Mule application, as well as the deployment information such as the CloudHub region, environment, and worker size. The developer needs to specify these properties in the pom.xml file before using Maven to deploy the application.
References: https://docs.mulesoft.com/mule-runtime/4.3/mmp-concept#application-deployment-descriptor


NEW QUESTION # 18
Which plugin or dependency is required to unit test modules created with XML SDK?

  • A. MUnit Extensions Maven plugin
  • B. Junit
  • C. XMLUnit
  • D. MUnit Maven plugin

Answer: A

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 # 19
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. Validate, initialize, compile, test package, verify, install, deploy
  • B. Validation, initialize, compile, test, package, install verify, deploy
  • C. Initialize, validate, compute, test, package, verify, install, deploy
  • D. Validate, initialize, compile, package, test, install, verify, verify, deploy

Answer: A

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 # 20
Which configurations are required for HTTP Listener to enable mTLS authentication?

  • A. Set an appropriate keystore and truststore configuration for the listener
  • B. Set an appropriate keystore configuration and use persistent connections for the listener
  • C. Set an appropriate truststore configuration and reconnection strategy for the listener
  • D. Set an appropriate reconnection strategy and use persistent connections for the listener

Answer: A

Explanation:
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 # 21
Which statement is true when working with correlation IDS?

  • A. The HTTP Listener generates correlation IDS unless a correlation ID is received in the HTTP request
  • B. The HTTP Listener regenerates correlation IDs regardless of the HTTP request
  • C. The Anypoint MQ Connector automatically propagates correlation IDS
  • D. The VM Connector does not automatically propagate correction IDs

Answer: A

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 # 22
A Mule application defines as SSL/TLS keystore properly 'tis,keystore.keyPassword'' as secure.
How can this property be referenced to access its value within the application?

  • A. #{secure::tiskeystore,keyPassowrd}
  • B. ${secure::tiskeystore,keyPassowrd}
  • C. ${secure::tiskeystore,keyPassowrd}
  • D. p{secure::tiskeystore,keyPassowrd}

Answer: B

Explanation:
Explanation
secure::tiskeystore,keyPassowrdShortExplanationofCorrectAnswerOnly:Toreferenceasecurepropertyvaluewithin In this case, the property name is tiskeystore,keyPassword, so the correct syntax is
${secure::tiskeystore,keyPassowrd}. References:
https://docs.mulesoft.com/mule-runtime/4.3/secure-configuration-properties#referencing-secure-properties


NEW QUESTION # 23
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 Plugin project
    Create a common-global-error-handler flow inside the plugin project.
    Use this plugin as a dependency in all Mule applications
  • B. Create a common-global-error-handler flow in all Mule Applications Refer to it flow-ref wherever needed.
  • C. 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.
  • D. Create a Mule daman project.
    Create a common-global-error-handler flow inside the domain project.
    Use this domain project as a dependency.

Answer: A

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 # 24
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?

  • A. Wrap all Anypoint MQ Publish operations within a With CorrelationID scope from the Tracing module, setting the correlation ID to the order ID
  • B. Use the underlying HTTP request of Anypoint MQ to set the 'X-CORRELATION_ID' header to the order ID
  • C. Set a custom Anypoint MQ user property to propagate the order ID and set the correlation ID in the receiving applications.
  • D. Use the default correlation ID, Anypoint MQ will sutomatically propagate it.

Answer: A

Explanation:
Explanation
To 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-scope
https://docs.mulesoft.com/tracing-module/1.0/tracing-module-concepts


NEW QUESTION # 25
A Flight Management System publishes gate change notification events whenever a flight's arrival gate changes. Other systems, including Baggage Handler System. Inflight Catering System and Passenger Notifications System, must each asynchronously receive the same gate change notification to process the event according.
Which configuration is required in Anypoint MQ to achieve this publish/subscribe model?

  • A. Publish each client subscribe directly to the exchange.
    Have each client subscribe directly to the queue.
  • B. Publish the gate change notification to an Anypoint MQ queue.
    Create different anypoint MQ exchange meant for each of the other subscribing systems Bind the queue with each of the exchanges
  • C. Publish the gate change notification to an Anypoint MQ exchanhe.
    Create different Anypoint MQ queues meant for each of the other subscribing systems.
    Bind the exchange with each of the queues.
  • D. Publish the gate change notification to an Anypoint MC queue
    Have each client subscribe directly to the queue

Answer: C

Explanation:
Explanation
To achieve a publish/subscribe model using Anypoint MQ, where each system receives the same gate change notification event, the developer should publish the gate change notification to an Anypoint MQ exchange, create different Anypoint MQ queues meant for each of the other subscribing systems, and bind the exchange with each of the queues. An exchange is a message routing agent that can send messages to different queues based on predefined criteria. By binding an exchange with multiple queues, each queue receives a copy of every message sent to that exchange. Therefore, each system can subscribe to its own queue and receive every gate change notification event. References:
https://docs.mulesoft.com/anypoint-mq/3.x/anypoint-mq-exchanges


NEW QUESTION # 26
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 Propagate 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 Continue to catch permanent errors like HTTP UNAUTHORIZED.
  • C. Configure retrying until a MULERETRY_EXHAUSTED error is raised or the API responds back with a successful response.
  • D. In Until Successful configuration, set the retry count to 1 for error type HTTP: UNAUTHORIZED.

Answer: B

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 # 27
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. Include the libraries writes deploying the code into the runtime
  • B. Refer to JAR files in the code
  • C. Install libraries in a local repository and refer to it in the pm.xml file
  • D. Create the Java code in your project and invoice the data from the code

Answer: C

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 # 28
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 ''Before Test Case'' To collect data from Flow-1 test cases before running Flow-2 test cases
  • B. Chain together the test suites and test cases for Flow-1 and Flow-2
  • C. Use 'After Test Case' to produce the data needed from Flow-1 test cases to pass to Flow-2 test cases
  • D. Use ''Set Event to pass the input that is needed, and keep the test cases for Flow-1 and Flow-2 independent

Answer: D

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 # 29
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 public key from the backend service to encrypt the data
  • B. The application needs to configure HTTPS TLS context information to encrypt the data
  • C. The application needs to both the private and public keys to encrypt the data
  • D. The application needs the private key from the backend service to encrypt the data

Answer: A

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 # 30
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. CloudHub REST API
  • C. Object Store v2 REST API
  • D. CloudHub Connector

Answer: C

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 # 31
Two APIs are deployed to a two-node on-prem cluster. Due to a requirements change, the two APIs must communicate to exchange data asynchronously.

  • A. The VM Connector is used to inter-application communication, so it is not possible to use the VM Connector
  • B. Instead of using the VM Connector use <flow-ref>directly
  • C. It is not possible to use the VM Connector since the APIs are running in a cluster mode and each mode has it own set of VM Queues
  • D. If the two APIs use the same domain, the VM Connector can be leveraged

Answer: D

Explanation:
Explanation
To communicate asynchronously between two APIs deployed to a two-node on-prem cluster, the developer can use the VM Connector if the two APIs use the same domain. The VM Connector allows passing messages between different Mule applications within a single Mule runtime instance or across different instances using shared memory or persistent storage. If two APIs are deployed under the same domain, they can share resources such as VM queues and communicate asynchronously using VM Connector operations. References:
https://docs.mulesoft.com/mule-runtime/4.3/vm-connector
https://docs.mulesoft.com/mule-runtime/4.3/shared-resources


NEW QUESTION # 32
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. XML template file, YAML configuration file
  • B. JSON properties file, YAML configuration file
  • C. JSON properties file, XML template file
  • D. Deployable ZIP file, YAML configuration file

Answer: A

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 # 33
A Mule API receives a JSON payload and updates the target system with the payload. The developer uses JSON schemas to ensure the data is valid.
How can the data be validation before posting to the target system?

  • A. Apply the JSON Schema policy in API Manager and reference the correct schema in the policy configuration
  • B. Add the JSON module dependency and add the validate-schema operation in the flow, configured to reference the schema
  • C. Using the DataWeave if Else condition test the values of the payload against the examples included in the schema
  • D. Use a DataWeave 2.09 transform operation, and at the log of the DataWeave script, add:
    %dw 2.0
    Import.json-moduls

Answer: B

Explanation:
Explanation
To validate the data before posting to the target system, the developer should add the JSON module dependency and add the validate-schema operation in the flow, configured to reference the schema. The JSON module provides a validate-schema operation that validates a JSON payload against a JSON schema and throws an error if the payload is invalid. References:
https://docs.mulesoft.com/json-module/1.1/json-validate-schema


NEW QUESTION # 34
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:500
  • B. HTTP status code:400
  • C. HTTP status code:200
  • D. HTTP status code:403

Answer: D

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 # 35
Refer to the exhibit.
What is the result of the Mule Maven Plugin configuration of the value of property its,keystorePassoword in CloudHub 2.0?

  • A. CloudHub encrypts the value
  • B. Anypoint Studio secures the value
  • C. Runtime Manager masks the value
  • D. The Mule server encrypts the value

Answer: C

Explanation:
Explanation
The result of the Mule Maven Plugin configuration of the value of property its,keystorePassword in CloudHub
2.0 is that Runtime Manager masks the value. This means that Runtime Manager hides or obscures the value from anyone who views it in Runtime Manager or Anypoint Platform. References:
https://docs.mulesoft.com/runtime-manager/runtime-manager-agent-for-mule4#properties-tab


NEW QUESTION # 36
Which pattern should be used to invoke multiple HTTP APIs in parallel and roll back failed requests in sequence?

  • A. A Parallel for Each scope with each HTTP request wrapped in a Try scope
  • B. VM queues as a reliability pattern with error handlers to roll back any requests
  • C. A database as a transactional outbox and an Until Successful router to retry any requests
  • 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 # 37
......

BEST Verified MuleSoft MCD-Level-2 Exam Questions (2023) : https://examcollection.dumpsvalid.com/MCD-Level-2-brain-dumps.html