Updated Nov-2024 Test Engine or PDF for the MuleSoft MCD-Level-2 test to help you quickly prepare for the MuleSoft exam!
Full MCD-Level-2 Practice Test and 62 unique questions with explanations waiting just for you, get it now!
NEW QUESTION # 22
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. Use flow variables within every logger processor to log the order ID
- C. Set a flow variable and edit the log4/2.xml file to output the variable as part of the message pattern
- D. Create a custom XML SDK component to wrap the logger processor and automatically add the order ID within the connector
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 # 23
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?
- A. Create a dedicated endpoint that responds with the API status and reachability of the underlying systems
- B. Create a dedicated endpoint that responds with the API status only
- C. Create a dedicated endpoint that responds with the API status and health of the server
- D. Use an existing resource endpoint of the API
Answer: A
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
NEW QUESTION # 24
A Mule application includes a subflow containing a Scatter.Gather scope. Within each log of the Scatter.Gatter. an HTTP connector calls a PUT endpoint to modify records in different upstream system. The subflow is called inside an Unit successful scope to retry if a transitory exception is raised.
A technical spike is being performed to increase reliability of the Mule application.
Which steps should be performed within the Mule flow above the ensure idempontent behavior?
- A. None, the flow already exhibits idempotent behavior
- B. Change the PUT requests inside the Scatter-Gather to POST requests
- C. Ensure an error-handling flow performs corrective actions to roll back all changes if any leg of the Scatter-Gather fails
- D. Remove the Put requests from the Scatter-Getter and perform them sequentially
Answer: C
Explanation:
Explanation
To ensure idempotent behavior within a Mule flow that contains a subflow with a Scatter-Gather scope, the developer should ensure an error-handling flow performs corrective actions to roll back all changes if any leg of the Scatter-Gather fails. Idempotency means that multiple identical requests have the same effect as a single request. Therefore, if one of the HTTP requests inside the Scatter-Gather fails, the error-handling flow should undo any changes made by other successful requests to ensure consistency and avoid partial updates.
References: https://docs.mulesoft.com/mule-runtime/4.3/scatter-gather-concept
https://docs.mulesoft.com/mule-runtime/4.3/error-handling
NEW QUESTION # 25
A Mule application contain two policies Policy A and Policy A has order1, and Policy B has order 2. Policy A Policy B, and a flow are defined by he configuration below.
When a HTTP request arrives at the Mule application's endpoint, what will be the execution order?
- A. A1, B1, F1, B2, A2
- B. F1, A1, B1, B2, A2
- C. F1, B1, A1, A2, B2
- D. B1, A1, F1, A2, B2
Answer: A
Explanation:
Explanation
Based on the configuration below, when a HTTP request arrives at the Mule application's endpoint, the execution order will be A1, B1, F1, B2, A2. This is because policies are executed before and after the API implementation flow according to their order attribute. Policy A has order 1, which means it is executed first before Policy B, which has order 2. The flow is executed after both policies are executed before the flow.
Then, Policy B is executed after the flow before Policy A is executed after the flow. References:
https://docs.mulesoft.com/api-manager/2.x/policies-policy-order
NEW QUESTION # 26
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
- B. Set a custom Anypoint MQ user property to propagate the order ID and set the correlation ID in the receiving applications.
- C. Use the default correlation ID, Anypoint MQ will sutomatically propagate it.
- D. Wrap all Anypoint MQ Publish operations within a With CorrelationID scope from the Tracing module, setting the correlation ID to the order ID
Answer: D
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
NEW QUESTION # 27
The HTTP Request operation raises an HTTP CONNECTIVITY error.
Which HTTP status code and body are returned to the web client?
- A. HTTP Status Code:500.
Body 'The HTTP CONNECTIVITY Error description - B. HTTP Status Code:500.
Body 'Error in processing your request - C. HTTP Status Code:200.
Body 'Error in processing your request - D. HTTP Status Code:500.
Body 'Error in processing your request
Answer: B
Explanation:
When the HTTP Request operation raises an HTTP CONNECTIVITY error, it triggers an on-error-continue handler that sets a payload with 'Error in processing your request'. Since no status code is explicitly set in this handler, it defaults to 500 (INTERNAL SERVER ERROR). Therefore, the web client receives an HTTP response with status code 500 and body 'Error in processing your request'.
References:https://docs.mulesoft.com/mule-runtime/4.3/error-handling#on-error-continue
NEW QUESTION # 28
When a client and server are exchanging messages during the mTLS handshake, what is being agreed on during the cipher suite exchange?
- A. The Public key format
- B. The TLS version
- C. An encryption algorithm
- D. A protocol
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
NEW QUESTION # 29
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 ''Before Test Case'' To collect data from Flow-1 test cases before running Flow-2 test cases
- D. Use ''Set Event to pass the input that is needed, and keep the test cases for Flow-1 and Flow-2 independent
Answer: D
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 # 30
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. Use flow variables within every logger processor to log the order ID
- C. Set a flow variable and edit the log4/2.xml file to output the variable as part of the message pattern
- D. Create a custom XML SDK component to wrap the logger processor and automatically add the order ID within the connector
Answer: A
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 # 31
Which statement is true when working with correlation IDS?
- A. The HTTP Listener regenerates correlation IDs regardless of the HTTP request
- B. The Anypoint MQ Connector automatically propagates correlation IDS
- C. The HTTP Listener generates correlation IDS unless a correlation ID is received in the HTTP request
- D. The VM Connector does not automatically propagate correction IDs
Answer: C
Explanation:
Explanation
When working with correlation IDs, the HTTP Listener generates correlation IDs unless a correlation ID is received in the HTTP request. In that case, it propagates the received correlation ID throughout the flow execution. Correlation IDs are used to track events across different flows or applications. References:
https://docs.mulesoft.com/mule-runtime/4.3/about-mule-message#message-attributes
NEW QUESTION # 32
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:500
- B. HTTP status code:400
- C. HTTP status code:200
- D. HTTP status code:403
Answer: D
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 # 33
The flow is invoicing a target API. The API's protocol is HTTPS. The TLS configuration in the HTTP Request Configuration global element is set to None. A web client submits a request to
http:localhost:8081/vehicles.
If the certificate of the target API is signed by a certificate authority (CA), what is true about the HTTP Request operation when the flow executes?
- A. The HTTP Request operation will succeed if the CA'S certificate is present in the JRE's default keystore
- B. The HTTP Request operation will always fail regardless of the CA
- C. The HTTP Request operation will succeed if the CA's certificate is present in the JRE's default truststore.
- D. The HTTP Request operation will always succeed regardless of the CA
Answer: C
Explanation:
Explanation
The HTTP Request operation will use the default truststore of the JRE to validate the certificate of the target API. If the CA's certificate is present in the truststore, the operation will succeed. Otherwise, it will fail with a handshake exception. References: https://docs.mulesoft.com/mule-runtime/4.3/tls-configuration#tls-default
NEW QUESTION # 34
A developer deploys an API to CloudHub and applies an OAuth policy on API Manager. During testing, the API response is slow, so the developer reconfigures the API so that the out-of-the-box HTTP Caching policy is applied first, and the OAuth API policy is applied second.
What will happen when an HTTP request is received?
- A. In case of a cache hit, both the OAuth and HTTP Caching policies are evaluated; then the cached response is returned to the caller
- B. In case of a cache miss, only the HTTP Caching policy is evaluated; then the API retrieves the data from the API implementation, and the policy stores the data to be cached in Object Store
- C. In case of a cache it, only the HTTP Caching policy is evaluating; then the cached response is returned to the caller
- D. In case of a cache miss, both the OAuth and HTTP Caching policies are evaluated; then the API retrieves the data from the API implementation, and the policy does not store the data in Object Store
Answer: C
Explanation:
Explanation
When an HTTP request is received and the HTTP Caching policy is applied first, it checks if there is a cached response for that request in Object Store. If there is a cache hit, meaning that a valid cached response exists, then only the HTTP Caching policy is evaluated and the cached response is returned to the caller without invoking the OAuth policy or the API implementation. If there is a cache miss, meaning that no valid cached response exists, then both the HTTP Caching policy and the OAuth policy are evaluated before invoking the API implementation. References:
https://docs.mulesoft.com/api-manager/2.x/http-caching-policy#policy-ordering
NEW QUESTION # 35
What is the MuleSoft recommended method to encrypt sensitive property data?
- A. The encryption key should be identical for all environments
- B. The encryption key and sensitive data should be different for each environment
- C. The encryption key should be identical for all environments and the sensitive data should be different for each environment
- D. The encryption key should be different for each environment and the sensitive data should be the same for all environments
Answer: B
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 # 36
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?
- A. The Mule flow will throw the exception 'JSON:SCHEMA_NOT_HONOURED
- B. The Mule flow will execute successfully with status code 200, and the response will be the JSON sent in request
- C. The Mule flow will execute successfully with status code 200m and a response will display the message
'' Age in years which must equal to or greater than zero.'' - D. The Mule flow will execute successfully with status code 204
Answer: A
Explanation:
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
NEW QUESTION # 37
The HTTP Request operation raises an HTTP CONNECTIVITY error.
Which HTTP status code and body are returned to the web client?
- A. HTTP Status Code:500.
Body 'The HTTP CONNECTIVITY Error description - B. HTTP Status Code:500.
Body 'Error in processing your request - C. HTTP Status Code:200.
Body 'Error in processing your request - D. HTTP Status Code:500.
Body 'Error in processing your request
Answer: B
Explanation:
Explanation
When the HTTP Request operation raises an HTTP CONNECTIVITY error, it triggers an on-error-continue handler that sets a payload with 'Error in processing your request'. Since no status code is explicitly set in this handler, it defaults to 500 (INTERNAL SERVER ERROR). Therefore, the web client receives an HTTP response with status code 500 and body 'Error in processing your request'. References:
https://docs.mulesoft.com/mule-runtime/4.3/error-handling#on-error-continue
NEW QUESTION # 38
When registering a client application with an existing API instance or API Group instance, what is required to manually approve or reject request access?
- A. To only have Exchange Administrator permission
- B. To configure the SLA tier for the application and have the role of Organization Administrator, API Manager Environment Administrator, or the Manage Contacts permission
- C. To configure the SLA tier for the application and have the Exchange Administrator permission
- D. To configure the SLA tier for the application
Answer: B
Explanation:
Explanation
To manually approve or reject request access when registering a client application with an existing API instance or API Group instance, it is required to configure the SLA tier for the application and have one of the following roles or permissions: Organization Administrator, API Manager Environment Administrator, or Manage Contracts permission. These roles or permissions allow managing client applications and contracts in API Manager. References:
https://docs.mulesoft.com/api-manager/2.x/client-applications#managing-client-applications-and-contracts
NEW QUESTION # 39
......
Full MCD-Level-2 Practice Test and 62 unique questions with explanations waiting just for you, get it now: https://www.prepawaypdf.com/MuleSoft/MCD-Level-2-practice-exam-dumps.html