MCD - Level 1 Exam QuestionsBrowse all questions from this exam

MCD - Level 1 Exam - Question 75


Refer to the exhibits.

A web client sends a POST request to the HTTP Listener with the payload `Hello-`.

What response is returned to the web client?

Show Answer
Correct Answer: A

The flow provided starts with an HTTP POST request to the listener with the payload 'Hello-'. The flow then publishes this message to JMS with the destination 'one'. In the 'oneJmsQueueListener' flow, 'JMS1-' is appended to the payload, but since publishing is asynchronous, this change is not reflected in the main flow at this moment. Next, the main flow sends an HTTP POST request to '/data', appending 'HTTP-' to the payload, making it 'Hello-HTTP-'. The 'twoJmsQueueListener' flow is triggered by the publish-consume processor, appending 'JMS2-' to the payload. Since publish-consume is synchronous, this change impacts the payload in the main flow, making it 'Hello-HTTP-JMS2-'. Finally, 'Three' is appended to the payload, resulting in 'Hello-HTTP-JMS2-Three'.

Discussion

9 comments
Sign in to comment
almoraimaOption: A
Mar 28, 2021

A is correct

claudio82
Jun 3, 2021

yes, you are right

DineshsinghalOption: A
Jun 19, 2021

Please clarify why A is correct. Please provide explanation

kanasaikuat
Jul 3, 2021

The flow starts with the payload "Hello-" from the POST request. Since the VM-Publish processor is asynchronous, the Set Payload in the flow oneJmsQueueListener does not change the payload at this moment. Continuing to the Request processor, a "HTTP-" is being appended to the payload. Next is the VM-Publish consume processor which is synchronous and "JMS2-" is being appended to the payload. At the end of the flow, the Set Payload processor appends "Three" to the payload.

Alandt
Feb 5, 2024

Yes exactly. Publish = Asynchronous, because message is sent and does not wait for response. Publish consume = Synchronous, because flow is waiting for response, hence changing the payload (in this specific case).

awsuser1Option: A
Aug 30, 2021

A is correct

[Removed]Option: A
May 22, 2023

A is correct

EmpireOption: A
Apr 10, 2022

option 'A' is the correct answer. Hello-HTTP-JMS2-Three is correct one.

MaxroyoOption: A
Aug 26, 2022

A is correct

Vatsal10793Option: A
Oct 11, 2022

A is correct

HonestSeeker
Jan 25, 2023

@Moderator - Please update the correct answer for this question as well.

ExamDevOption: A
Jan 25, 2024

A is correct. Tested on Anypoint Studio