Get MuleSoft MCD-Level-2 Dumps Questions Study Exam Guide Nov 20, 2023 [Q29-Q50]

Share

Get MuleSoft MCD-Level-2 Dumps Questions Study Exam Guide Nov 20, 2023

MCD-Level-2 Premium Exam Engine - Download Free PDF Questions

NEW QUESTION # 29
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 # 30
A scatter-gather router is configured with four routes:Route A, B, C and D.
Route C false.

  • A. Payload failures['2']
  • B. Error,errorMessage,payload.failures['2']
  • C. Payload ['2']
  • D. Error,errorMesage.payload.results ['2']

Answer: B

Explanation:
Explanation
The result of accessing route C failure is Error,errorMessage,payload.failures['2']. This is because a scatter-gather router returns an aggregated message that contains an array of results from each route and an array of failures from each route. The failures array contains error objects with information about each failed route execution. To access route C failure, which is the third route (index 2), the developer needs to use Error.errorMessage.payload.failures['2'] expression. References:
https://docs.mulesoft.com/mule-runtime/4.3/scatter-gather-reference#scatter-gather-output


NEW QUESTION # 31
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?

  • A. Import a published API
  • B. Generate a local RAML from anypoint Studio
  • C. Import RAML from local file
  • D. Download RAML from Design Center'

Answer: A

Explanation:
Explanation
To 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-task


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. Run the test as-s, with no changes because the Studio runtime will not attempt to connect to API Manager
  • B. Pass in the runtime parameter ''-Danpow.platform.gatekeeper=disabled''
  • C. Create a properties file specifically for local development and set the API instance ID to a value that is not used in API Manager
  • D. Deactivate the API in API Manager so the Autodiscovery element will not find the application when it runs in Studio

Answer: C

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
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 throws an error and does not start
  • B. The test case fails with an assertion error
  • C. The test case passes
  • D. The test case fails with an unexpected error type

Answer: B

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 # 34
An API has been built to enable scheduling email provider. The front-end system does very little data entry validation, and problems have started to appear in the email that go to patients. A validate-customer'' flow is added validate the data.
What is he expected behavior of the 'validate-customer'' flow?

  • A. If the email address is invalid, processing continues to see if the appointment data and customer name are also invalid
  • B. If all of the values are invalid the last validation error is
    raised:SCHEDULE:INVALID_CUSTOMER_NAME
  • C. If the appointment date and customer name are invalid, a
    SCHEDULE:INVALID_APPOINTMENT_DATE error is raised
  • D. If only the email address Is invalid a VALIDATION.INVALID_EMAIL error is raised

Answer: D

Explanation:
Explanation
The validate-customer flow uses an until-successful scope to validate each field of the customer data. The until-successful scope executes its processors until they succeed or exhausts the maximum number of retries.
If any processor fails, it raises an error and stops executing the remaining processors. Therefore, if only the email address is invalid, a VALIDATION.INVALID_EMAIL error is raised and the validation of appointment date and customer name is skipped. References:
https://docs.mulesoft.com/mule-runtime/4.3/until-successful-scope


NEW QUESTION # 35
Which pattern can a web API use to notify its client of state changes as soon as they occur?

  • A. HTTP Webhock
  • B. Shared database trigger
  • C. ETL data load
  • D. Schedule Event Publisher

Answer: A

Explanation:
Explanation
A web API can use HTTP Webhook to notify its client of state changes as soon as they occur. A webhook is an HTTP callback that allows an API to send real-time notifications to another system or application when an event happens. The client registers a URL with the API where it wants to receive notifications, and then the API sends an HTTP request to that URL with information about the event. References:
https://docs.mulesoft.com/connectors/webhook/webhook-connector


NEW QUESTION # 36
What is the MuleSoft recommended method to encrypt sensitive property data?

  • A. The encryption key should be different for each environment and the sensitive data should be the same for all environments
  • B. The encryption key should be identical for all environments
  • C. The encryption key and sensitive data should be different for each environment
  • D. The encryption key should be identical for all environments and the sensitive data should be different for each environment

Answer: C

Explanation:
Explanation
The MuleSoft recommended method to encrypt sensitive property data is to use the Secure Properties Tool that comes with Anypoint Studio. This tool allows encrypting properties files with a secret key and then decrypting them at runtime using the same key. The encryption key and sensitive data should be different for each environment to ensure security and avoid accidental exposure of sensitive data. References:
https://docs.mulesoft.com/mule-runtime/4.3/secure-configuration-properties


NEW QUESTION # 37
Which properties are mandatory on the HTTP Connector configuration in order to use the OAuth 2.0 Authorization Code grant type for authentication?

  • A. External callback URL, access token URL, local authorization URL, authorization URL, client ID, client secret
  • B. External callback URL, access token URL, client ID, response refresh token
  • C. External callback URL, access token URL, client ID response access token
  • D. Token URL, authorization URL, client ID, client secret local callback URL

Answer: D

Explanation:
Explanation
To use the OAuth 2.0 Authorization Code grant type for authentication, the HTTP Connector configuration requires the following properties: token URL, authorization URL, client ID, client secret, and local callback URL. The token URL is the endpoint of the authorization server that provides access tokens. The authorization URL is the endpoint of the authorization server that initiates the user consent flow. The client ID and client secret are the credentials of the Mule application registered with the authorization server. The local callback URL is the endpoint of the Mule application that receives the authorization code from the authorization server.
References: https://docs.mulesoft.com/http-connector/1.6/http-authentication#oauth-2-0


NEW QUESTION # 38
A Mule application deployed to multiple Cloudhub 2.0 replicas needs to temporarily persist large files over
10MB between flow executions, and routinely needs to query whether the file data exists on separate executions.
How can this be achieved?

  • A. Store the contents of the file on separate storage, and store the key and location of the file Object using Object Store v2
  • B. Store the key and full contents of the file, caching the filename and location between requests
  • C. Use an in-memory Object Store
  • D. Store the key and full contents of the file in an Object Store

Answer: A

Explanation:
Explanation
To temporarily persist large files over 10MB between flow executions, and routinely query whether the file data exists on separate executions, the developer should store the contents of the file on separate storage, and store the key and location of the file object using Object Store v2. This way, the developer can avoid storing large files in memory or exceeding the size limit of Object Store v2 (10MB per object). The developer can also use Object Store v2 operations to query, retrieve, or delete the file object by its key. References:
https://docs.mulesoft.com/object-store/osv2-faq#can-i-store-files-in-object-store-v2


NEW QUESTION # 39
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. Chain together the test suites and test cases for Flow-1 and Flow-2
  • 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 ''Before Test Case'' To collect data from Flow-1 test cases before running 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 # 40
Which pattern should be used to invoke multiple HTTP APIs in parallel and roll back failed requests in sequence?

  • A. Scatter-Gather as central Saga orchestrator for all API request with compensating actions for failing routes
  • B. A Parallel for Each scope with each HTTP request wrapped in a Try scope
  • C. A database as a transactional outbox and an Until Successful router to retry any requests
  • D. VM queues as a reliability pattern with error handlers to roll back any requests

Answer: A

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

Answer: B

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 # 42
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. Use the Tracing module to set logging variables with a Mapped Diagnostic Context
  • B. Create a custom XML SDK component to wrap the logger processor and automatically add the order ID within the connector
  • C. Use flow variables within every logger processor to log the order ID
  • D. Set a flow variable and edit the log4/2.xml file to output the variable as part of the message pattern

Answer: A

Explanation:
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 # 43
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. Configure a custom correlation policy
  • C. Enable the auto-generate CorrelationID option when scaffolding the flow
  • D. Enable the CorrelationID checkbox in the HTTP Listener configuration

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 # 44
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. Create the Java code in your project and invoice the data from the code
  • C. Install libraries in a local repository and refer to it in the pm.xml file
  • D. Refer to JAR files in 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 # 45
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. The Mule server encrypts the value
  • B. Anypoint Studio secures the value
  • C. Runtime Manager masks the value
  • D. CloudHub 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 # 46
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. A parent pom.xml
  • C. Settings, xml
  • D. A Bill of Materials (BOM) parent pm

Answer: B

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

Answer: B

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

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 # 49
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 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
  • B. Publish the gate change notification to an Anypoint MC queue
    Have each client subscribe directly to the queue
  • C. Publish each client subscribe directly to the exchange.
    Have each client subscribe directly to the queue.
  • D. 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.

Answer: D

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 # 50
......

Free MCD-Level-2 Exam Braindumps MuleSoft  Pratice Exam: https://www.free4dump.com/MCD-Level-2-braindumps-torrent.html