Skip to content

Commit

Permalink
fix: keda now include the messages that should be retried in the coun…
Browse files Browse the repository at this point in the history
…t of pending messages used for scaling

Signed-off-by: Antoine Laffargue <[email protected]>
  • Loading branch information
toniopelo committed Nov 2, 2022
1 parent 92efd86 commit 1d259f3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pkg/scalers/nats_jetstream_scaler.go
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,7 @@ func (s *natsJetStreamScaler) getMaxMsgLag() int64 {

for _, consumer := range s.stream.Consumers {
if consumer.Name == consumerName {
return int64(consumer.NumPending)
return int64(consumer.NumPending + consumer.NumAckPending)
}
}
return s.stream.State.LastSequence
Expand Down

0 comments on commit 1d259f3

Please sign in to comment.