Skip to content

Commit

Permalink
fix: conditions reset honors the latest timestamp of all unacked msgs (
Browse files Browse the repository at this point in the history
…#1523)

Signed-off-by: Derek Wang <[email protected]>
  • Loading branch information
whynowy authored Jan 13, 2022
1 parent 4153c38 commit fb5c257
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion eventbus/driver/nats.go
Original file line number Diff line number Diff line change
Expand Up @@ -294,7 +294,9 @@ func (n *natsStreaming) processEventSourceMsg(m *stan.Msg, msgHolder *eventSourc
// New message, set and check
msgHolder.msgs[depName] = &eventSourceMessage{seq: m.Sequence, timestamp: m.Timestamp, event: event, lastDeliveredTime: now}
msgHolder.parameters[depName] = true
msgHolder.latestGoodMsgTimestamp = m.Timestamp
if msgHolder.latestGoodMsgTimestamp < m.Timestamp {
msgHolder.latestGoodMsgTimestamp = m.Timestamp
}

// Check if there's any stale message being held.
// Stale message could be message age has been longer than NATS streaming max message age,
Expand Down

0 comments on commit fb5c257

Please sign in to comment.