Skip to content

Conversation

@Aaronontheweb
Copy link
Member

@Aaronontheweb Aaronontheweb commented Mar 20, 2025

Changes

close #7528

Checklist

For significant changes, please ensure that the following have been completed (delete if not relevant):

Copy link
Member Author

@Aaronontheweb Aaronontheweb left a 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)
Copy link
Member Author

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);
Copy link
Member Author

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.

@Aaronontheweb Aaronontheweb enabled auto-merge (squash) March 20, 2025 15:33
@Aaronontheweb Aaronontheweb disabled auto-merge March 20, 2025 16:07
@Aaronontheweb Aaronontheweb merged commit 224a3fa into akkadotnet:dev Mar 20, 2025
10 of 12 checks passed
@Aaronontheweb Aaronontheweb deleted the fix-InMemoryJournal-tagged branch March 20, 2025 16:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Akka.Persistence.Query.InMemory does not remove Tagged class like other persistence providers

1 participant