MuleSoft certification · Exam MCD-Level-2

MCD-Level-2 Mock Exam

MuleSoft Certified Developer - Level 2 (Mule 4)

Find out if you're ready for MCD-Level-2. Take the free timed mock exam and get your score in minutes, or study the free MCD-Level-2 questions below with answers and explanations.

14 questions · 23 minutes · free, no sign-up

Free MCD-Level-2 questions

1–10 of 14 free
Question 1 Choose 1

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.

Show answerHide answer

Correct answer: A

If the two APIs use the same domain, the VM Connector can be leveraged

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

Question 2 Choose 1

Which configurations are required for HTTP Listener to enable mTLS authentication?

Show answerHide answer

Correct answer: C

Set an appropriate keystore and truststore configuration for the listener

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

Question 3 Choose 1

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?

Show answerHide answer

Correct answer: C

Pom.xml

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

Question 4 Choose 1

When a client and server are exchanging messages during the mTLS handshake, what is being agreed on during the cipher suite exchange?

Show answerHide answer

Correct answer: C

An encryption algorithm

Explanation

Explanation
A cipher suite is a set of cryptographic algorithms that are used to secure the communication between a client and a server. A cipher suite consists of four components: a key exchange algorithm, an authentication algorithm, an encryption algorithm, and a message authentication code (MAC) algorithm. During the cipher suite exchange, the client and the server agree on which encryption algorithm to use for encrypting and decrypting the data.

References: https://docs.mulesoft.com/mule-runtime/4.3/tls-configuration#cipher-suites

Question 5 Choose 1

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?

 

Show answerHide answer

Correct answer: A

Create a health check endpoint that listens on a separate port and uses a separate HTTP Listener configuration from the API

Explanation

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

Question 6 Choose 1

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?

Show answerHide answer

Correct answer: C

The application needs the public key from the backend service to encrypt the data

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

Question 7 Choose 1

What is the MuleSoft recommended method to encrypt sensitive property data?

Show answerHide answer

Correct answer: A

The encryption key and sensitive data should be different for each environment

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

Question 8 Choose 1

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?

Show answerHide answer

Correct answer: D

Wrap all Anypoint MQ Publish operations within a With CorrelationID scope from the Tracing module, setting the correlation ID to the order ID

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

Question 9 Choose 1

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?

Show answerHide answer

Correct answer: 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

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

Question 10 Choose 1

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?

Show answerHide answer

Correct answer: A

Create a dedicated endpoint that responds with the API status and reachability of the underlying systems

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

Full mock exam

Sit the MCD-Level-2 exam before exam day

Full-length mocks with the same number of questions and the same time limit as the real MCD-Level-2 exam. Every attempt draws a new set of questions from the full bank, so you can keep going until you pass comfortably.

Get full MCD-Level-2 mock exam
  • 65questions per mock
  • 105 mintime limit
  • 47questions in the bank
  • Newmock on every attempt