Version Information
Version of Akka.NET? 1.5.13
Which Akka.NET Modules? 1.5.13
Describe the bug
CurrentEventsByTagSpec.ReadJournal_query_CurrentEventsByTag_should_complete_when_no_events unit test is failing with following error
[ERROR][03/26/2024 19:37:40.842Z][Thread 0050][akka://MongoDbCurrentEventsByTagSpec/user/StreamSupervisor-0/Flow-0-0-actorPublisherSource-CurrentEventsByTag-pink-actorPublisherSource] To offset must be a positive number (Parameter 'toOffset')
Cause: System.ArgumentException: To offset must be a positive number (Parameter 'toOffset')
at Akka.Persistence.MongoDb.Query.ReplayTaggedMessages..ctor(Int64 fromOffset, Int64 toOffset, Int64 max, String tag, IActorRef replyTo) in D:\GitHub\Akka.Persistence.MongoDB\src\Akka.Persistence.MongoDb\Query\QueryApi.cs:line 371
at Akka.Persistence.MongoDb.Query.AbstractEventsByTagPublisher.Replay() in D:\GitHub\Akka.Persistence.MongoDB\src\Akka.Persistence.MongoDb\Query\EventsByTagPublisher.cs:line 112
at Akka.Persistence.MongoDb.Query.AbstractEventsByTagPublisher.Idle(Object message) in D:\GitHub\Akka.Persistence.MongoDB\src\Akka.Persistence.MongoDb\Query\EventsByTagPublisher.cs:line 93
at Akka.Actor.ActorBase.AroundReceive(Receive receive, Object message)
at Akka.Streams.Actors.ActorPublisher`1.AroundReceive(Receive receive, Object message)
at Akka.Actor.ActorCell.ReceiveMessage(Object message)
at Akka.Actor.ActorCell.Invoke(Envelope envelope)
To Reproduce
Steps to reproduce the behavior:
Just run the unit test CurrentEventsByTagSpec.ReadJournal_query_CurrentEventsByTag_should_complete_when_no_events
Links to working reproductions on Github / Gitlab are very much appreciated
Expected behavior
The CurrentEventsByTag query should not fail if there are no events in the database.
Actual behavior
The ReplayTaggedMessages class throws ArgumentException because toOffset is 0.
Version Information Version of Akka.NET? 1.5.13 Which Akka.NET Modules? 1.5.13
Describe the bug CurrentEventsByTagSpec.ReadJournal_query_CurrentEventsByTag_should_complete_when_no_events unit test is failing with following error
To Reproduce Steps to reproduce the behavior:
CurrentEventsByTagSpec.ReadJournal_query_CurrentEventsByTag_should_complete_when_no_events
Links to working reproductions on Github / Gitlab are very much appreciated
Expected behavior The
CurrentEventsByTag
query should not fail if there are no events in the database.Actual behavior The
ReplayTaggedMessages
class throwsArgumentException
becausetoOffset
is 0.Screenshot
Environment Windows 11