Coder Social home page Coder Social logo

Comments (1)

George-Payne avatar George-Payne commented on June 15, 2024 1

Hi Matthew,

Thanks for the issue and reproduction. Looks like filters are currently a big hole in test cases / doc comments.

In your example:

    const sub = client.subscribeToAll({
      filter: { filterOn: STREAM_NAME, regex: `^${stream}$` },
      fromPosition: START,
    })

When this is sent over GRPC you get:

streamIdentifier: { regex: '^my_stream$', prefixList: [] },
eventType: undefined,
max: 0,
count: undefined,
checkpointintervalmultiplier: 0

but max and checkpointintervalmultiplier both have to be non-zero. (GRPC defaults numbers to 0 when not specified).

So for the time being you can work around it by changing to:

    const sub = client.subscribeToAll({
      filter: { filterOn: STREAM_NAME, regex: `^${stream}$`, max: 32, checkpointintervalmul: 1 },
      fromPosition: START,
    })

In #127 I've reworked the code around this. The helper functions streamNameFilter and eventTypeFilter now provide sensible defaults and if you pass 0, it will throw an error before its sent to the server.

I've also opened an issue EventStore/EventStore#2790 to improve the error message from the server.

from eventstore-client-nodejs.

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.