Skip to content
This repository was archived by the owner on Jun 18, 2025. It is now read-only.
This repository was archived by the owner on Jun 18, 2025. It is now read-only.

bug: AppendEvents does not persist Metadata if more than one event is provided. #174

@seanppayne

Description

@seanppayne

I make the following function call in my codebase

_, err = e.client.AppendToStream(
    ctx,
    streamID,
    appendOptions,
    esdbEvents...,
)

When esdbEvents contains more than one event, anything I put in the metadata field of the EventData is not persisted to the DB (not visible in UI, not accessible when reading stream).

When esdbEvents contains only one event, the metadata is persisted as expected.

My metadata

metadata := UserMetadata{
	CausedBy:  event.UUID().String(),
	ReceiptNo: event.ReceiptNumber(),
	ReqId:     event.RequestId(),
	TermId:    event.TerminalId(),
	DealNo:    event.DealNumber(),
}

I am wondering is this a bug or is this intended behavior?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions