The question remains: we don't have a time‑based key. Person T1 receives a transaction; Person T2 should immediately know about T1's transaction.
💡 Model Answer
When real‑time visibility is required without a time‑based key, an event‑driven architecture is ideal. As soon as Person T1 processes a transaction, an event is published to a message bus (Kafka, RabbitMQ, or a cloud pub/sub service). Person T2 subscribes to the relevant topic or queue and receives the event instantly. To guarantee immediate delivery, use a durable queue with at‑least‑once semantics and idempotent processing on the consumer side. If strict ordering is needed, partition the topic by a deterministic key (e.g., user ID) so that all events for a user are processed in order. For low latency, consider using a lightweight stream like Redis Streams or a WebSocket push from the event bus. Consistency can be achieved by storing the event in a shared state store (e.g., a distributed cache) that both T1 and T2 can query. This pattern decouples producers and consumers, scales horizontally, and ensures that Person T2 is notified immediately after T1’s transaction is committed.
This answer was generated by AI for study purposes. Use it as a starting point — personalize it with your own experience.
🎤 Get questions like this answered in real-time
Assisting AI listens to your interview, captures questions live, and gives you instant AI-powered answers — invisible to screen sharing.
Get Assisting AI — Starts at ₹500