nerdexam
Confluent

CCDAK · Question #187

You create a producer that writes messages about bank account transactions from tens of thousands of different customers into a topic. - Your consumers must process these messages with low latency…

The correct answer is B. Use the bank account number found in the message as the message key. Using the bank account number as the message key ensures all transactions for a given account are sent to the same partition, preserving order per account while allowing parallel processing and scalability across partitions.

Application Design

Question

You create a producer that writes messages about bank account transactions from tens of thousands of different customers into a topic.

  • Your consumers must process these messages with low latency and

minimize consumer lag

  • Processing these messages takes around six times longer than

producing them

  • Transactions for each bank account must be processed in order

You need to develop a strategy that minimizes consumer latency while maintaining scalability if the number of transactions increases. Which strategy should you use?

Options

  • AUse the timestamp of the message's arrival as its key.
  • BUse the bank account number found in the message as the message key.
  • CUse a combination of the bank account number and the transaction timestamp as the message
  • DUse a unique identifier such as a universally unique identifier (UUID) as the message key.

How the community answered

(66 responses)
  • A
    24% (16)
  • B
    56% (37)
  • C
    6% (4)
  • D
    14% (9)

Explanation

Using the bank account number as the message key ensures all transactions for a given account are sent to the same partition, preserving order per account while allowing parallel processing and scalability across partitions.

Topics

#message key strategy#partition ordering#consumer lag#scalability

Community Discussion

No community discussion yet for this question.

Full CCDAK Practice