Microservices - Event-Driven Architecture
Identify the bug in this idempotent event consumer pseudocode:
processed = set()
def consume(event):
processed.add(event.id)
if event.id in processed:
return
process_event(event)