exam questions

Exam MCIA - Level 1 All Questions

View all questions & answers for the MCIA - Level 1 exam

Exam MCIA - Level 1 topic 1 question 5 discussion

Actual exam question from Mulesoft's MCIA - Level 1
Question #: 5
Topic #: 1
[All MCIA - Level 1 Questions]

A Mule application is being designed to do the following:
Step 1: Read a SalesOrder message from a JMS queue, where each SalesOrder consists of a header and a list of SalesOrderLineltems.
Step 2: Insert the SalesOrder header and each SalesOrderLineItem into different tables in an RDBMS.
Step 3: Insert the SalesOrder header and the sum of the prices of all its SalesOrderLineltems into a table in a different RDBMS.
No SalesOrder message can be lost and the consistency of all SalesOrder-related information in both RDBMSs must be ensured at all times.
What design choice (including choice of transactions) and order of steps addresses these requirements?

  • A. 1. Read the JMS message (NOT in an XA transaction) 2. Perform EACH DB insert in a SEPARATE DB transaction 3. Acknowledge the JMS message
  • B. 1. Read and acknowledge the JMS message (NOT in an XA transaction) 2. In a NEW XA transaction, perform BOTH DB inserts
  • C. 1. Read the JMS message in an XA transaction 2. In the SAME XA transaction, perform BOTH DB inserts but do NOT acknowledge the JMS message
  • D. 1. Read the JMS message (NOT in an XA transaction) 2. Perform BOTH DB inserts in ONE DB transaction 3. Acknowledge the JMS message
Show Suggested Answer Hide Answer
Suggested Answer: C 🗳️

Comments

Chosen Answer:
This is a voting comment (?). It is better to Upvote an existing comment if you don't have anything to add.
Switch to a voting comment New
gilofernandes
1 month, 3 weeks ago
Selected Answer: C
All operations must be performed in the same XA transaction to guarantee consistency across the DB's. No ack otherwise in case of failure message is deleted from the JMS queue.
upvoted 1 times
...
abidfrq
3 months, 2 weeks ago
As main thing is we should not lose any data, so will apply transaction, as here JMS and DB involved we will use XA transaction and XA would include JMS and both DB and the we will acklowndege message after XA transaction, this ensure successful operation. So C would be the right answer.
upvoted 1 times
...
Mj290511
6 months, 3 weeks ago
C, as both the transactions need to be updated
upvoted 1 times
...
ThomasTheTank
8 months, 3 weeks ago
Selected Answer: C
I think it's C. Definitely, C works with 2-way commit with XA transaction. If D works, D would be the most efficient answer, but it says "2. Perform BOTH DB inserts in ONE DB transaction"... it can't be local transaction if you want to insert records into different RDBSs with one transaction... it has to be "XA transaction", so D is wrong. Thus, C is the answer.
upvoted 1 times
...
Viv2005
1 year, 1 month ago
Selected Answer: C
You cannot keep the read JMS message out of the transaction because if one of the DB inserts fails, the message will NOT roll back to the queue and will be lost. Correct answer is C, because the default ack mode is AUTO which will acknowledge only when the flow is successful else not. XA transaction initiated/begins from JMS message read and 2 DB inserts will participate in the transaction. Remember to set XA in the configuration of both DB connectors.
upvoted 1 times
...
1MK
1 year, 11 months ago
Selected Answer: C
C coz 2 way commit
upvoted 1 times
...
sanni27
1 year, 11 months ago
Should be C
upvoted 1 times
...
Grump
2 years ago
C I think.. XA Transaction is a two phase commit. As long as the DB Driver and JMS drivers support two phase commit, it will provide enough gurantee of consistency. If either DB Transaction fails, whole transaction will fail causing JMS message to go back in the queue. If XA transaction for a particular JMS message fails X number of times, it will end up in DLQ.
upvoted 3 times
...
Pavan_Nagineni
2 years, 4 months ago
D. 1. Read the JMS message (NOT in an XA transaction) 2. Perform BOTH DB inserts in ONE DB transaction 3. Acknowledge the JMS message This feels to be okay ; Anyway I feel they are intended to be XA only when they mean in ONE transaction Others are not because ; You can leave JMS not to acknoledge the message; You can not maintain consistency in 2 individual transactions ; Reading/acknowledging and doing XA is also okay But you do not want to aknowledge before you are done is the point for not selecting this.
upvoted 2 times
...
siva_int
2 years, 4 months ago
Is it C or D. I feel it is D
upvoted 2 times
...
Community vote distribution
A (35%)
C (25%)
B (20%)
Other
Most Voted
A voting comment increases the vote count for the chosen answer by one.

Upvoting a comment with a selected answer will also increase the vote count towards that answer by one. So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.

SaveCancel
Loading ...
exam
Someone Bought Contributor Access for:
SY0-701
London, 1 minute ago