Code Monkey home page Code Monkey logo

Comments (7)

kaancfidan avatar kaancfidan commented on August 19, 2024 2

We have experienced this issue as well. Since we needed to also use a starting position in some cases we had to use the parameterless overload when a starting point is not specified and subtract 1 and use the bugged overload otherwise.

Needless to say, we would appreciate if this bug is fixed soon as it's a fundamental problem in gRPC client.

from eventstore-client-dotnet.

alexeyzimarev avatar alexeyzimarev commented on August 19, 2024

Following @thefringeninja advice, the workaround for reading from the start is to use the overload without the position. It indeed starts from the beginning of the stream.

from eventstore-client-dotnet.

alexeyzimarev avatar alexeyzimarev commented on August 19, 2024

Updated the description.

from eventstore-client-dotnet.

thefringeninja avatar thefringeninja commented on August 19, 2024

This is by design - subscribing is an exclusive operation. If you have no checkpoint, please user the overload that does not take a StreamPosition.

https://developers.eventstore.com/clients/dotnet/generated/v20.6.1/subscribing-to-streams/#subscribing-to-a-stream

from eventstore-client-dotnet.

kaancfidan avatar kaancfidan commented on August 19, 2024

This is by design - subscribing is an exclusive operation. If you have no checkpoint, please user the overload that does not take a StreamPosition.

https://developers.eventstore.com/clients/dotnet/generated/v20.6.1/subscribing-to-streams/#subscribing-to-a-stream

I don't think off-by-one errors are by design and the behavior is different than the old TCP client.

from eventstore-client-dotnet.

dariogriffo avatar dariogriffo commented on August 19, 2024

This is extremely confusing and should be properly documented. Wuth the concept of start as a position is natural to think the start of the stream is the event number 0, not whatever the underlying limitation of the implementation of the event store.
Also this adds overhead on every client that consumes the library:

If(we-dont-have-processed-events)
    Subscribe()
else
    Subscribe(position)

Is way more natural just do

var lastPosition = GetLastPosition()
Subscribe (lastPosition)

from eventstore-client-dotnet.

ylorph avatar ylorph commented on August 19, 2024

this has been fixed in version 22.0.0 of the client,
you can use FromAll.Start, FromStream.Start to achieve the desired behaviour.
More details in this PR #188

from eventstore-client-dotnet.

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.