petabridge / Akka.Persistence.Azure

Azure-powered Akka.Persistence for Akka.NET actors
Apache License 2.0
13 stars 11 forks source link

CurrentEventsByTag returns a maximum of 1,000 events #385

Closed talismax closed 4 months ago

talismax commented 5 months ago

I know that there are 19,000 events in the log for the given tag. The query is only giving me the first 1,000.

Configuration:

.WithAzurePersistence(
    azureStorageConnectionString,
    true,
    containerName,
    tableName,
    builder =>
    {
        builder.AddWriteEventAdapter<TaggingEventAdapter>(
            "projection-tagger",
            new[] { typeof(IHasEntraTenantId) }
        );
    }
)

Query:

private void QueryEvents()
{
    var materializer = Context.System.Materializer();
    var projectionActorRef = Self;

    currentEventsByTagQuery
        .CurrentEventsByTag(tag, Offset.NoOffset())
        .Select(env => env.Event)
        .RunWith(
            Sink.ActorRef<object>(
                projectionActorRef,
                new ProjectionRebuildNoMoreEvents { EntraTenantId = entraTenantId },
                (ex) =>
                    new FailedEndOfStream { EntraTenantId = entraTenantId, Reason = ex.Message }
            ),
            materializer
        );
}

When I swap to the Akka.Persistence.Sql plugin I get all 19,000 events.

Thanks,

Kyle Reed

Arkatufus commented 4 months ago

@talismax which version are you using?

talismax commented 4 months ago

Hey Gregorius, I was using the latest nuget pkg as of the post. I’ve seen some dependency bumps since then. Tomorrow I can retest with the latest if that helps.

On Tue, Apr 23, 2024 at 3:56 PM Gregorius Soedharmo < @.***> wrote:

@talismax https://github.com/talismax which version are you using?

— Reply to this email directly, view it on GitHub https://github.com/petabridge/Akka.Persistence.Azure/issues/385#issuecomment-2073430191, or unsubscribe https://github.com/notifications/unsubscribe-auth/AARIFMIUNWORRRG37EAKJPTY63DJFAVCNFSM6AAAAABGA52S56VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDANZTGQZTAMJZGE . You are receiving this because you were mentioned.Message ID: @.***>

Arkatufus commented 4 months ago

@talismax I've found the bug that's causing the issue, working on a fix right now