@@ -301,9 +301,10 @@ func (em *eventManager) persistBatchContent(ctx context.Context, batch *core.Bat
301301 if err != nil {
302302 log .L (ctx ).Debugf ("Batch message insert optimization failed for batch '%s': %s" , batch .ID , err )
303303
304- // Messages are immutable in their contents, and it's entirely possible we're being sent duplicate message data
305- // that is for messages we've subsequently modified the state of (they've been confirmed).
306- // So we find a list of those that aren't in the DB and so an insert of just those\
304+ // Messages are immutable in their contents, and it's entirely possible we're being sent
305+ // messages we've already been sent in a previous batch, and subsequently modified th
306+ // state of (they've been confirmed etc.).
307+ // So we find a list of those that aren't in the DB and so and insert just those.
307308 var foundIDs []* core.IDAndSequence
308309 foundIDs , err = em .database .GetMessageIDs (ctx , batch .Namespace , messageIDFilter (ctx , batch .Payload .Messages ))
309310 if err == nil {
@@ -313,7 +314,7 @@ func (em *eventManager) persistBatchContent(ctx context.Context, batch *core.Bat
313314 for _ , foundID := range foundIDs {
314315 if foundID .ID .Equals (m .Header .ID ) {
315316 isFound = true
316- log .L (ctx ).Errorf ("Message %s in batch '%s' is a duplicated " , m .Header .ID , batch .ID )
317+ log .L (ctx ).Warnf ("Message %s in batch '%s' is a duplicate " , m .Header .ID , batch .ID )
317318 break
318319 }
319320 }
0 commit comments