PagedOutstandingCommand query in MySQL Outbox subtracts seconds instead of milliseconds, causing OutboxSweeper to function incorrectly. This should be an easy fix.
To Reproduce
Set up the OutboxSweeper with MinimumMessageAge set to 5000 milliseconds (5 seconds)
The OutboxSweeper will dispatch messages that are older than 5000 seconds (instead of 5 seconds) due to an incorrect query:
public string PagedOutstandingCommand { get; } = "SELECT * FROM {0} WHERE DISPATCHED IS NULL AND Timestamp < DATE_ADD(UTC_TIMESTAMP(), INTERVAL -?OutStandingSince SECOND) ORDER BY Timestamp DESC LIMIT ?PageSize OFFSET ?OffsetValue";
Describe the bug
PagedOutstandingCommand query in MySQL Outbox subtracts seconds instead of milliseconds, causing OutboxSweeper to function incorrectly. This should be an easy fix.
To Reproduce
Set up the OutboxSweeper with MinimumMessageAge set to 5000 milliseconds (5 seconds)
The OutboxSweeper will dispatch messages that are older than 5000 seconds (instead of 5 seconds) due to an incorrect query:
public string PagedOutstandingCommand { get; } = "SELECT * FROM {0} WHERE DISPATCHED IS NULL AND Timestamp < DATE_ADD(UTC_TIMESTAMP(), INTERVAL -?OutStandingSince SECOND) ORDER BY Timestamp DESC LIMIT ?PageSize OFFSET ?OffsetValue";
Further technical details