Closed franTarkenton closed 1 year ago
This was completed in other ticket! this line: https://github.com/bcgov/nr-rfc-grib-copy/blob/6f740667149fc5d97ba7ca2d0534c2779581c2b2/backend/messaging/cmc_grib_callbacks.py#L57 shows where the idem_key is retrieved from the message. There is more to this, however that line demonstrates that the key is comming from the message
Purpose of the idempotency key is to enable the logic to continue working correctly if it happens to receive multiple messages that describe the same event.
Currently we are using datestamps that get calculated by the code as the idempotency keys. This should be modified to come from the actual messages emitted by the message queue.
the body of messages emitted has the following format:
The first element in the message is a datetime stamp that should be parsed to extract the Ymd and used as the idempotency key for the cmc data.
This ticket will implement the following: