pub trait CommandPublisher: Send + Sync {
// Required method
fn publish(&self, cmd_type: u8, data: &[u8]);
}Expand description
Publisher for command replication to standby instances.
After processing each command, the runtime publishes the raw command bytes
so that standby engines can replay the same command stream and maintain
identical state. Standby instances compare their state hash
(ApplyOutput::hash) against the primary’s
published hash to detect divergence.
In production, this is typically backed by NATS JetStream for ordered, persistent delivery.