[FEATURE REQUEST] Add message_id to prevent duplicate processing
Similar systems often include a message_id field in event and identify requests. This allows the system to detect and ignore duplicate messages.
Use Case
My backend sends the event "PAYMENT_RECEIVED" to Parcelvoy. If there’s a network issue and my backend does not receive the 200 OK response, it retries sending the event. This can lead to the end user receiving duplicate emails because Parcelvoy processes both attempts as separate events.
Proposal
Introduce an optional message_id field on event and identify requests. • If a request with the same message_id is received more than once, Parcelvoy should treat it as a duplicate and avoid re-processing. • The first request with a new message_id is processed normally. • Subsequent requests with the same message_id should return a success response (idempotent behavior), but skip duplicate processing. • Optionally, store recent message_ids with an expiration period (e.g., 24h or configurable) to prevent unbounded growth.
This would make integrations more resilient to network issues and align Parcelvoy with best practices for idempotent APIs.