Git Product home page Git Product logo

Comments (8)

bartelink avatar bartelink commented on May 28, 2024

Thanks once again for taking the time to write a clear and complete issue; apologies that you're running into shortcomings...
@nordfjord what's the min and/or recommended version?
Docs: https://github.com/jet/equinox#use-messagedb
This might have the answer: #360 (it goes without saying that the best way to address all of this is of course to get the integration test rig more complete; in the short to medium term, a change to the docker config that establishes the prerequisites would be useful)
Obviously, ideally a minimum schema version would be mentioned somewhere in the docs and/or be wired into the integration tests config;)

from equinox.

nordfjord avatar nordfjord commented on May 28, 2024

The minimum schema version is 1.3.0 as we use the new feature of getting the last message of a particular type. This should definitely be documented! I’ll get a PR going for those docs

from equinox.

nordfjord avatar nordfjord commented on May 28, 2024

Are you calling the install script from your docker file? I recommend taking a look at https://gitlab.com/such-software/message-db-docker for prior art

from equinox.

keppelerj avatar keppelerj commented on May 28, 2024

Hey @nordfjord thanks for the advice! I briefly tried it with the Dockerfile you provided but I'm still getting the same error unfortunately. Also I didnt have much time today to check it in more detail but maybe I'm doing something entirely wrong?
To give more context: I am using ESDB on the Write-Side (which works fine by itself) and Message-db for the Checkpoint Store on the Read-Side

Basically this is the code I am using right now (Read-Side):

member this.Sink(log) =
        let stats = Stats(log, TimeSpan.FromMinutes 1, TimeSpan.FromMinutes 1)

        Propulsion.Streams.Default.Config.Start(
            log,
            maxReadAhead = 100,
            maxConcurrentStreams = 1,
            handle = handle,
            stats = stats,
            statsInterval = TimeSpan.FromMinutes 1
        )


override _.ExecuteAsync(ct) =
    let computation =
      async {
        use sink = service.Sink(log)
        let checkpoints =
            ReaderCheckpoint.CheckpointStore(
                "Host=localhost; Port=5432; Username=postgres; Password=changeme; Database=message_store",
                "message_store",
                "test-group",
                TimeSpan.FromSeconds 10
            )
        do! checkpoints.CreateSchemaIfNotExists() |> Async.AwaitTask
        
        use src =
          EventStoreSource(
            log,
            statsInterval = TimeSpan.FromMinutes 1,
            client = EventStoreDbProvider.client,
            batchSize = 1000,
            tailSleepInterval = TimeSpan.FromMilliseconds 100,
            checkpoints = checkpoints,
            sink = sink,
            categories = categories
          )
            .Start()
        do! src.AwaitWithStopOnCancellation()
      }

    Async.StartAsTask(computation, cancellationToken = ct)

which seems to run just fine (and also creates the Tables for the Checkpoint Store + first checkpoint position successfully):

[14:02:13 INF] Starting 1 tranche readers...
[14:02:13 INF] Reading 0 eventStoreDb/0 From 0 Checkpoint Event interval 0.2m

until I add an event to the EventStore:

     System.AggregateException: One or more errors occurred. (42883: function get_stream_messages(text, bigint, bigint) does not exist
      
      POSITION: 224)
       ---> Npgsql.PostgresException (0x80004005): 42883: function get_stream_messages(text, bigint, bigint) does not exist
      
      POSITION: 224
         at <StartupCode$Equinox-MessageDb>[email protected]() in /_//src/Equinox.MessageDb/MessageDbClient.fs:line 120
         at [email protected]() in /_//src/Equinox.MessageDb/MessageDb.fs:line 175

I hope this is somewhat helpful information.
Thanks again for your help!

from equinox.

nordfjord avatar nordfjord commented on May 28, 2024

Thanks for reporting, that’s really helpful. I’ll have some time to dig into this later this evening and will get back to you. This checkpoint store shouldn’t need message db in the schema at all, so that’s an interesting error indeed

from equinox.

nordfjord avatar nordfjord commented on May 28, 2024

Alright, I've set up a repro in this repository https://github.com/nordfjord/propulsion-repro-2023-03

I'm not able to reproduce the behaviour you're seeing. Could it be that you're trying to use a postgres role that doesn't have enough access?

from equinox.

keppelerj avatar keppelerj commented on May 28, 2024

Hi @nordfjord, thank you so much for your help.
It worked for me with your repo (though I had to change the docker image bc. it didn't match my host platform WARNING: The requested image's platform (linux/arm64/v8) does not match the detected host platform (linux/amd64) and no specific platform was requested)
Anyway I had some time to dig deeper into my code and found the error. I accidentally configured one of my services that uses the Equinox.Decider with a MessageDbCategory instead of a EventStoreCategory...🤦‍♂️.

Sorry again for the trouble.

from equinox.

bartelink avatar bartelink commented on May 28, 2024

Closing (what I presume to be from scanning ☝️) a stale issue

from equinox.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.