ExamGecko
Home Home / MuleSoft / MCD - Level 2

MuleSoft MCD - Level 2 Practice Test - Questions Answers, Page 5

Question list
Search
Search

List of questions

Search

Related questions











A Mule application deployed to a standardalone Mule runtime uses VM queues to publish messages to be consumed asynchronously by another flow.

In the case of a system failure, what will happen to in-flight messages in the VM queues that have been consumed?

A.
For nay type of queue, the message will be processed after the system comes online
A.
For nay type of queue, the message will be processed after the system comes online
Answers
B.
For persistent queues, the message will be processed after the system comes online
B.
For persistent queues, the message will be processed after the system comes online
Answers
C.
For transient queues, the message will be processed after the system comes online
C.
For transient queues, the message will be processed after the system comes online
Answers
D.
For any type of queue, the message will be lost
D.
For any type of queue, the message will be lost
Answers
Suggested answer: B

Explanation:

In case of a system failure, in-flight messages in persistent VM queues that have been consumed will be processed after the system comes online. This is because persistent VM queues store messages on disk and guarantee delivery even if there is a system crash or restart. Therefore, any in-flight messages that have been consumed but not processed will be recovered from disk and processed when the system is back online.

Reference: https://docs.mulesoft.com/mule-runtime/4.3/vm-connector#persistent-queues

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
A.
HTTP status code:200
Answers
B.
HTTP status code:403
B.
HTTP status code:403
Answers
C.
HTTP status code:400
C.
HTTP status code:400
Answers
D.
HTTP status code:500
D.
HTTP status code:500
Answers
Suggested answer: B

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.

Reference: https://docs.mulesoft.com/apikit/4.x/apikit-4-headers

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.
Initialize, validate, compute, test, package, verify, install, deploy
A.
Initialize, validate, compute, test, package, verify, install, deploy
Answers
B.
Validate, initialize, compile, package, test, install, verify, verify, deploy
B.
Validate, initialize, compile, package, test, install, verify, verify, deploy
Answers
C.
Validate, initialize, compile, test package, verify, install, deploy
C.
Validate, initialize, compile, test package, verify, install, deploy
Answers
D.
Validation, initialize, compile, test, package, install verify, deploy
D.
Validation, initialize, compile, test, package, install verify, deploy
Answers
Suggested answer: C

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.

Reference: https://maven.apache.org/guides/introduction/introduction-to-the-lifecycle.html

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
A.
Store the contents of the file on separate storage, and store the key and location of the file Object using Object Store v2
Answers
B.
Use an in-memory Object Store
B.
Use an in-memory Object Store
Answers
C.
Store the key and full contents of the file in an Object Store
C.
Store the key and full contents of the file in an Object Store
Answers
D.
Store the key and full contents of the file, caching the filename and location between requests
D.
Store the key and full contents of the file, caching the filename and location between requests
Answers
Suggested answer: A

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.

Reference: https://docs.mulesoft.com/object-store/osv2-faq#can-i-store-files-in-object-store-v2

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

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.

Reference: https://docs.mulesoft.com/mule-runtime/4.3/cryptography-pgp

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

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.

Reference: 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

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

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.

Reference: 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

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.
Download the common application from Naxus and copy it to the src/main/resources folder in the API
A.
Download the common application from Naxus and copy it to the src/main/resources folder in the API
Answers
B.
Copy the common application's source XML file and out it in a new flow file in the src/main/mule folder
B.
Copy the common application's source XML file and out it in a new flow file in the src/main/mule folder
Answers
C.
Add a Maven dependency in the PCM file with multiple-plugin as <classifier>
C.
Add a Maven dependency in the PCM file with multiple-plugin as <classifier>
Answers
D.
Add a Maven dependency in the POM file with jar as <classifier>
D.
Add a Maven dependency in the POM file with jar as <classifier>
Answers
Suggested answer: D

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.

Reference: https://docs.mulesoft.com/mule-runtime/4.3/mmp-concept#add-a-maven-dependency-to-the-pom-file

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

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.

Reference: https://docs.mulesoft.com/munit/2.3/assert-equals-processor

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

A.
HTTP Webhock
A.
HTTP Webhock
Answers
B.
Shared database trigger
B.
Shared database trigger
Answers
C.
Schedule Event Publisher
C.
Schedule Event Publisher
Answers
D.
ETL data load
D.
ETL data load
Answers
Suggested answer: A

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.

Reference: https://docs.mulesoft.com/connectors/webhook/webhook-connector

Total 60 questions
Go to page: of 6