Skip to content

Commit bcd2f4a

Browse files
authored
Merge pull request #320 from EventStore/hayley-jean/fix-message-count
Fix off by one error in behind message count in persistent subscriptions
2 parents bb5eab4 + 4f44fea commit bcd2f4a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/js/modules/competing/services/SubscriptionsMapper.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ define(['./_module'], function (app) {
108108
current.behindByTime = undefined;
109109
current.behindStatus = '';
110110
} else {
111-
current.behindByMessages = (current.lastKnownEventPosition - current.lastCheckpointedEventPosition);
111+
current.behindByMessages = (current.lastKnownEventPosition - current.lastCheckpointedEventPosition) + 1;
112112
current.behindByTime = Math.round((current.behindByMessages / current.averageItemsPerSecond) * 100)/100;
113113
current.behindByTime = isFinite(current.behindByTime) ? current.behindByTime : 0;
114114
current.behindStatus = current.behindByMessages + ' / ' + current.behindByTime;

0 commit comments

Comments
 (0)