Skip to main content

MCD-LEVEL2 Real Exam Questions

MuleSoft Certified Developer - Level 2 (Mule 4)

60 questions available · Page 1 of 6

Updated Exam DumpsVerified AnswersPass Guarantee

Get Complete Exam Dumps
Question 1 Single choice

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?

  1. A

    For nay type of queue, the message will be processed after the system comes online

  2. B

    For persistent queues, the message will be processed after the system comes online

  3. C

    For transient queues, the message will be processed after the system comes online

  4. D

    For any type of queue, the message will be lost

Show answer and explanation

Correct 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.
References:
https://docs.mulesoft.com/mule-runtime/4.3/vm-connector#persistent-queues

Question 2 Single choice

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.

  1. A

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

  2. B

    The VM Connector is used to inter-application communication, so it is not possible to use the VM
    Connector

  3. C

    Instead of using the VM Connector use <flow-ref>directly

  4. D

    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

Show answer and explanation

Correct answer: A

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 3 Single choice

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

  1. A

    A protocol

  2. B

    The TLS version

  3. C

    Anencryption algorithm

  4. D

    The Public key format

Show answer and explanation

Correct answer: C

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 4 Single choice

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 executesuccessfully?

  1. A

    Chain together the test suites and test cases for Flow-1 and Flow-2

  2. B

    Use `'Set Event to pass the input that is needed, and keep the test cases for Flow-1 and Flow-2
    independent

  3. C

    Use `'Before Test Case'' To collect data from Flow-1 test cases before running Flow-2 test cases

  4. D

    Use `After Test Case' to produce the data needed from Flow-1 test cases to pass to Flow-2 test cases

Show answer and explanation

Correct answer: B

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

Question 5 Single choice

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?

  1. 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

  2. B

    Pass in the runtime parameter `'-Danpow.platform.gatekeeper=disabled''

  3. C

    Deactivate the API in API Manager so the Autodiscovery element will not find the application when it runs in Studio

  4. D

    Run the test as-s, with no changes because the Studio runtime will not attempt to connect to API Manager

Show answer and explanation

Correct answer: A

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 6 Single choice

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?

  1. A

    The Mule flow will execute successfully with status code 200, and the response will be the JSON sent in request

  2. B

    The Mule flow will execute successfully with status code 204

  3. C

    The Mule flow will throw the exception `JSON:SCHEMA_NOT_HONOURED

  4. D

    The Mule flow will execute successfully with status code 200m andaresponse will display the message
    `' Age in years which must equal to or greater than zero.''

Show answer and explanation

Correct answer: C

Explanation

Based 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-schema

Question 7 Single choice

A custom policy needs to be developed to intercept all cutbound HTTP requests made by Mule applications.

Which XML element must be used to intercept outbound HTTP requests?

  1. A

    It is not possible to intercept outgoing HTTP requests, only inbound requests

  2. B

    http-policy:source

  3. C

    htt-policy:operation

  4. D

    http-policy:processor

Show answer and explanation

Correct answer: D

Explanation

The http-policy:processor element is used to intercept outbound HTTP requests made by Mule applications. It allows customizing the request before it is sent to the target API and modifying the response after it is received from the target API.
References:
https://docs.mulesoft.com/api-manager/2.x/policy-mule4-custom-policy#policy-xml-file

Question 8 Single choice

A Mule application uses API autodiscovery to access and enforce policies for a RESTful implementation.

  1. A

    Northing because flowRef is an optional attribute which can be passed runtime

  2. B

    The name of the flow that has APlkit Console to receive all incoming RESTful operation requests.

  3. C

    Anyof the APIkit generate implement flows

  4. D

    The name of the flow that has HTTP listener to receive all incoming RESTful operation requests

Show answer and explanation

Correct answer: D

Explanation

To use API autodiscovery to access and enforce policies for a RESTful implementation, flowRef must be set to the name of the flow that has HTTP listener to receive all incoming RESTful operation requests. This way, API autodiscovery can identify the API implementation and associate it with the corresponding API specification and policies in API Manager. The flow that has HTTP listener is usually the main flow that contains the APIKit Router.
References:
https://docs.mulesoft.com/api-manager/2.x/api-auto-discovery-new-concept#flowref

Question 9 Single choice

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?

  1. A

    Download the common application from Naxus and copy it to the src/main/resources folder in the API

  2. B

    Copy the common application's source XML file and out it in a new flow file in the src/main/mule folder

  3. C

    Add a Maven dependency in the PCM file with multiple-plugin as <classifier>

  4. D

    Add a Maven dependency in the POM file with jar as <classifier>

Show answer and explanation

Correct 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.
References:
https://docs.mulesoft.com/mule-runtime/4.3/mmp-concept#add-a-maven-dependency-to-the-pom-file

Question 10 Single choice

A developer has created the first version of an API designed for business partners to work commodity prices.

What should developer do to allow more than one major version of the same API to be exposed by the implementation?

  1. A

    In Design Center, open the RAML and modify each operation to includethe major version number

  2. B

    In Anypoint Studio, generate scaffolding from the RAML, and the modify the <http:listerner> in the
    generated flows to include a parameter to replace the version number

  3. C

    In Design Center, open the RAML and modify baseUn to include a variable that indicates the version number

  4. D

    In Anypoint Studio, generate scaffolding from the RAML, and then modify the flow names generated by APIKit to include a variable with the major version number

Show answer and explanation

Correct answer: C

Explanation

To allow more than one major version of the same API to be exposed by the implementation, the developer should modify the baseUri property in the RAML file to include a variable that indicates the version number. The baseUri property defines the base URL of the API and can include variables that are replaced with actual values when mocking or deploying the API. By using a variable for the version number, the developer can expose different versions of the API using different base URLs and avoid conflicts or confusion.
References:
https://docs.mulesoft.com/api-designer/design-modify-raml-specs#baseuri
https://docs.mulesoft.com/api-manager/2.x/api-versioning