diff --git a/src/PostalRegistry.Producer.Snapshot.Oslo/ProducerProjections.cs b/src/PostalRegistry.Producer.Snapshot.Oslo/ProducerProjections.cs index bb709474..3129f1bc 100644 --- a/src/PostalRegistry.Producer.Snapshot.Oslo/ProducerProjections.cs +++ b/src/PostalRegistry.Producer.Snapshot.Oslo/ProducerProjections.cs @@ -117,20 +117,21 @@ private async Task FindAndProduce( if (result != null) { - await Produce(result.Identificator.Id, result.JsonContent, storePosition, ct); + await Produce(result.Identificator.Id, result.Identificator.ObjectId, result.JsonContent, storePosition, ct); } } private async Task Produce( + string puri, string objectId, string jsonContent, long storePosition, CancellationToken cancellationToken = default) { var result = await _producer.Produce( - new MessageKey(objectId), + new MessageKey(puri), jsonContent, - new List { new MessageHeader(MessageHeader.IdempotenceKey, storePosition.ToString()) }, + new List { new MessageHeader(MessageHeader.IdempotenceKey, $"{objectId}-{storePosition.ToString()}") }, cancellationToken); if (!result.IsSuccess)