Mulesoft MCD-Level 2 MuleSoft Certified Developer – Level 2 (Mule 4) Online Training
Mulesoft MCD-Level 2 Online Training
The questions for MCD-Level 2 were last updated at Dec 23,2024.
- Exam Code: MCD-Level 2
- Exam Name: MuleSoft Certified Developer - Level 2 (Mule 4)
- Certification Provider: Mulesoft
- Latest update: Dec 23,2024
Refer to the exhibit.
What action must be performed to log all the errors raised by the VM Connector?
- A . Add <AsyncLOgger name=’orgroute.extensions vm’ level=ERROR’I> inside the Logger tag
- B . Add <AsyncLOgger name=’orgroute.extensions vm’ level=ERROR’/> inside the Appenders tag
- C . Configure <Logger level-‘ERROR’/> inside the VM Connector configuration
- D . Nothing, as error-level events are automatically logged
B
Explanation:
To log all the errors raised by the VM Connector, the developer needs to add an async logger with the name ‘org.mule.extension.vm’ and the level ‘ERROR’ inside the appenders tag of the log4j2.xml file. This will enable logging all error-level events generated by the VM Connector to the console appender.
References: https://docs.mulesoft.com/mule-runtime/4.3/logging-in-mule#configuring-custom-logging-settings
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 . Deployable ZIP file, YAML configuration file
- B . JSON properties file, YAML configuration file
- C . JSON properties file, XML template file
- D . XML template file, YAML configuration file
D
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
Refer to the exhibit.
What is the result if ‘’Insecure’’ selected as part of the HTTP Listener configuration?
- A . The HTTP Listener will trust any certificate presented by the HTTP client
- B . The HTTP Lister will accept any unauthenticated request
- C . The HTTP listener will only accept HTTP requests
- D . Mutual TLS authentication will be enabled between this HTTP Listener and an HTTP client
C
Explanation:
Based on the exhibit below, if ‘Insecure’ is selected as part of the HTTP Listener configuration, the HTTP
listener will only accept HTTP requests. This means that no TLS context will be configured for this listener
and no encryption or authentication will be applied to incoming requests. The protocol attribute of this listener will be set to HTTP instead of HTTPS.
References: https://docs.mulesoft.com/http-connector/1.6/http-listener-ref#insecure
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?
- A . Create a health check endpoint that listens on a separate port and uses a separate HTTP Listener configuration from the API
- B . Configure the application to send health data to an external system
- C . Create a health check endpoint that reuses the same port number and HTTP Listener configuration as the API itself
- D . Monitor the Payment API directly sending real customer payment data
A
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
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 . Use a DataWeave 2.09 transform operation, and at the log of the DataWeave script, add: %dw 2.0
Import.json-moduls - B . Using the DataWeave if Else condition test the values of the payload against the examples included in the schema
- C . Apply the JSON Schema policy in API Manager and reference the correct schema in the policy
configuration - D . Add the JSON module dependency and add the validate-schema operation in the flow, configured to reference the schema
D
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
Which statement is true when using XML SDK for creating custom message processors?
- A . Properties are fields defined by an end user of the XML SDK component and serve as a global configuration for the entire Mule project in which they are used
- B . An XML SDK provides both inbound and outbound operations
- C . Operations can be reused in recursive calls
- D . All operations are public
C
Explanation:
When using XML SDK for creating custom message processors, all operations are public by default and can be used by any Mule application that imports them. There is no way to make an operation private or protected in XML SDK.
References: https://docs.mulesoft.com/mule-sdk/1.1/xml-sdk#operations
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 flow variables within every logger processor to log the order ID
- B . Set a flow variable and edit the log4/2.xml file to output the variable as part of the message pattern
- C . Create a custom XML SDK component to wrap the logger processor and automatically add the order ID within the connector
- D . Use the Tracing module to set logging variables with a Mapped Diagnostic Context
D
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
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 . Download RAML from Design Center’
- D . Import RAML from local file
A
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
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
- B . Validate, initialize, compile, package, test, install, verify, verify, deploy
- C . Validate, initialize, compile, test package, verify, install, deploy
- D . Validation, initialize, compile, test, package, install verify, deploy
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.
References: https://maven.apache.org/guides/introduction/introduction-to-the-lifecycle.html
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 . A parent pom.xml
- B . Settings, xml
- C . Pom, xml
- D . A Bill of Materials (BOM) parent pm
A
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