Implement a service that accepts a message only when at least ten seconds have elapsed since the last accepted occurrence of that same message. Different messages have independent histories.
Store the last accepted timestamp for each message. Rejected requests must not move the timestamp forward, or repeated attempts can postpone acceptance forever. State the behavior at exactly the ten-second boundary.
For a production service, add questions the coding exercise leaves open: do requests arrive out of order, is state shared across replicas, how is old state expired, and what happens during a restart? The linked challenge covers the in-memory core, not a distributed rate-limit contract.