[kvevents] fix missing topics in replayed kv events (#43386)

Signed-off-by: Sage Ahrac <sagiahrak@gmail.com>
This commit is contained in:
Sage
2026-10-11 17:25:43 +08:00
committed by GitHub
parent 0a21a3b798
commit 53295c6972
3 changed files with 24 additions and 15 deletions
@@ -600,15 +600,12 @@ class ZmqEventPublisher(EventPublisher):
for seq, buf in self._buffer:
if seq >= start_seq:
# [identity, empty_delim, seq_bytes, payload]
# (identity, empty_delim) are stripped off by the router
# receiving payload is (seq_bytes, payload)
# Subscribers receive the same topic, sequence, and payload as live events.
self._replay.send_multipart(
(client_id, b"", seq.to_bytes(8, "big"), buf)
(client_id, b"", self._topic_bytes, seq.to_bytes(8, "big"), buf)
)
# Send end of sequence marker
# receiving payload is (-1, b""")
self._replay.send_multipart((client_id, b"", self.END_SEQ, b""))
self._replay.send_multipart((client_id, b"", b"", self.END_SEQ, b""))
@staticmethod
def offset_endpoint_port(