Skip to content

EventId (UUID) serialization to byte array different from one used in EventStore server. #32

@jezovuk

Description

@jezovuk

In com.github.msemys.esjc.util.UUIDConverter.toBytes() UUID is converter to byte array directly, while .NET Guid does some inversion.
See:

As a consequence, if eventId is hard-coded to some UUID (read from string) and such event is saved to event store, EventStore will report a different EventId (string) value (consistent with different byte ordering).

As an example, Java UUID 92651dfa-0d83-53e2-a6f7-e6afad26121e will be shown as fa1d6592-830d-e253-a6f7-e6afad26121e in EventStore (when EventId is checked via EventStore HTTP API).

This is mostly problematic in testing/debugging while real-life use is ok as long as UUIDConverter methods for converting UUID to/from byte array are simmetric.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions