Skip to content
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

Distributed event outbox fails to transmit the CorrelationId #20298

Closed
1 task done
zhangzw218 opened this issue Jul 28, 2024 · 0 comments
Closed
1 task done

Distributed event outbox fails to transmit the CorrelationId #20298

zhangzw218 opened this issue Jul 28, 2024 · 0 comments
Assignees
Labels
Milestone

Comments

@zhangzw218
Copy link

Is there an existing issue for this?

  • I have searched the existing issues

Description

I observed the process of CorrelationId writing to the database and found that it lost the extension data in the step

DbContextEventOutbox<TDbContext>
{
    [UnitOfWork]
    public virtual async Task EnqueueAsync(OutgoingEventInfo outgoingEvent)
    {
        var dbContext = (IHasEventOutbox)await DbContextProvider.GetDbContextAsync();
        dbContext.OutgoingEvents.Add(new OutgoingEventRecord(outgoingEvent));
    }
}

new OutgoingEventRecord

Reproduction Steps

        var eventBus = LazyServiceProvider.LazyGetRequiredService<IDistributedEventBus>();
        await eventBus.PublishAsync(eto, onUnitOfWorkComplete:true, useOutbox: true);

useOutbox=true, then we can observe.

Expected behavior

You want to load extended data, such as:

    public OutgoingEventRecord(
        OutgoingEventInfo eventInfo)
        : base(eventInfo.Id)
    {
        EventName = eventInfo.EventName;
        EventData = eventInfo.EventData;
        CreationTime = eventInfo.CreationTime;

        ExtraProperties = new ExtraPropertyDictionary();
        this.SetDefaultsForExtraProperties();
        foreach (var property in eventInfo.ExtraProperties)
        {
            this.SetProperty(property.Key, property.Value);
        }
    }

Actual behavior

No response

Regression?

No response

Known Workarounds

No response

Version

8.0.6

User Interface

Common (Default)

Database Provider

EF Core (Default)

Tiered or separate authentication server

None (Default)

Operation System

Windows (Default)

Other information

No response

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants