-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Akka.Peristence.Query.InMemory: properly unwrap Tagged messages in all queries
#7548
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Akka.Peristence.Query.InMemory: properly unwrap Tagged messages in all queries
#7548
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Detailed my changes
| /// </summary> | ||
| internal static class MemoryQueryJournalHelpers | ||
| { | ||
| public static EventEnvelope PrepareEnventEnvelope(IPersistentRepresentation message, Offset? offsetHint = null) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added a unified handler for inspecting IPersistentRepresentations and then doing "the right thing" on the other end
| { | ||
| var payload = (Tagged)persistence.Payload; | ||
| replay.ReplyTo.Tell(new ReplayedTaggedMessage(persistence.WithPayload(payload.Payload), replay.Tag, replay.FromOffset + index), ActorRefs.NoSender); | ||
| replay.ReplyTo.Tell(new ReplayedTaggedMessage(persistence, replay.Tag, replay.FromOffset + index), ActorRefs.NoSender); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The reason why tagged message queries worked is we unpacked Tagged messages for those specifically here - we've moved that logic instead to all of the abstract persistence query implementations for the InMemory journal.
We preserve the Tagged bits in the messages here because this design also caused us to lose data about all of the tags applicable to this event, not just the ones we asked for.
Changes
close #7528
Checklist
For significant changes, please ensure that the following have been completed (delete if not relevant):
Taggedclass like other persistence providers #7528