Skip to content

Automatically create checkpoint file #40

@huesla

Description

@huesla

First of all, thank you for this great tool.
I was able to do a successful replication in my test environment. There were some hick-ups though regarding checkpoints.

A simplified docker-compose.yml

version: '3.7'
services:
  eventstore-replicator:
    container_name: eventstore-replicator
    image: eu.gcr.io/esc-platform-advocacy/eventstore/replicator:latest
    ports:
      - "5000:5000"
    volumes:
      - ./replicator.yml:/app/config/appsettings.yaml
      - ./checkpoint:/app/checkpoint

"checkpoint" is mounted into the container, to make it survive a container restart.

replicator.yml

...
checkpoint:
    path: "/app/checkpoint"

At first I faced a "permission denied". It turned out that the application expected "checkpoint" to be a file, not a directory. This is mentioned in the docs under "Concepts". What is not mentioned, is that the application expects a StreamPosition, e.g. "0,0". I found that out after getting FormatExceptions because appearantly the constructor of EventStore.Replicator.FileCheckpointStore checks if the file exists, and if not, creates it with content "test" --> conversion to int fails.
The fix was to manually create a checkpoint file and put "0,0" into it.

I'm wondering how it works, if one doesn't manually create the file with proper content before starting the application, and I'm unsure whether this is a bug/feature request.

One thing to improve for sure though is to add replicator.checkpoint.path to the configuration section in the docs.

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