...
- Scan the Message Table, with an optional start Message ID or timestamp, which can either be inclusive or exclusive
- Depending on whether the row has the payload column (the
p
column), the handling is different- With the payload column (the
p
column)- The row represents a message and the payload is the value in the
p
column - Message ID is generated from the row key as
concat(publish_time, seq_id, 0L, 0)
- The row represents a message and the payload is the value in the
- Without the payload column, then the transaction column (the
t
column) must exist- Scan the Payload Table with prefix
concat(topic, transaction_write_pointer)
, where thetransaction_write_pointer
is the value of thet
column in the Message Table - Each row encountered during the scanning is a message and the payload is the value in the
p
column - Message ID is generated from the row key in the Message Table and the row key in the Payload Table as
concat(publish_time, seq_id, transaction_ write_pointertimestamp, p_seq_id)
- Scan the Payload Table with prefix
- With the payload column (the
Transactional
Transactional consumption basically follow the same procedures as the non-transactional one, with the addition that it will stop at the first uncommitted message when scanning the Message Table. The transaction information comes from the client and it is the client responsibility to open a new transaction in order to get a new snapshot of committed messages in the messaging system. The will increase the latency of message consumption, but the technique described above for message publishing, this latency should be minimal in the range of less than a second.
...