Code Monkey home page Code Monkey logo

Comments (5)

paddybyers avatar paddybyers commented on June 2, 2024

Client reconnects, but is unable to resume, so detaches all channels

Why unable to resume?

This is the current behaviour:

Either:
a) the connection fails - no issue then
b) the resume on the given channel fails with an error the system deems to be fatal: so the channel enters the failed state, none of the locally queued messages are published and no new messages are received;
c) the resume on the given channel fails with a non-fatal error, meaning that the channel is reattached but with some discontinuity in the messages; this means that the resume returns as many historical messages on the channel as are available, which might or might not include the other client's 3 messages, and an error is returned indicating the problem. The 5 new queued messages are sent once attached.

When we in future support implicit attach on publish and multiple attach modes (publish, publish+subscribe etc) I don't really see that changing, except that there is a variation of case (b) where the fatal problem might apply to publish only, or to subscribe only, in which case the attach mode could be downgraded without failing the channel.

from docs.

mattheworiordan avatar mattheworiordan commented on June 2, 2024

@paddybyers to be clear, I raised this issue not because I don't agree with your suggested approach above, but because we have not been specific enough in our spec, see http://docs.ably.io/client-lib-development-guide/features/#RTN15c3. There is NO mention whatsoever of queued messages and how to handle them, so every client library developer will likely implement this differently because we have been unspecific. I am happy with a and b, still unhappy with c but will go ahead and leave that in until we resolve this issue in 0.9.

When we in future support implicit attach on publish and multiple attach modes (publish, publish+subscribe etc) I don't really see that changing, except that there is a variation of case (b) where the fatal problem might apply to publish only, or to subscribe only, in which case the attach mode could be downgraded without failing the channel.

I would disagree in fact, I think if a channel that was open becomes detached, then it's just easier to simply fail those messages so that the developer can decide what recovery activity they would like to take.

Given describing this in the spec is a very minor change, and not a change of functionality, but clarifying expected functionality, I will ago ahead and do a PR later.

from docs.

paddybyers avatar paddybyers commented on June 2, 2024

I would disagree in fact, I think if a channel that was open becomes detached, then it's just easier to simply fail those messages so that the developer can decide what recovery activity they would like to take.

I do agree that varying the mode of the channel attachment will be an unnecessary complexity, and if we can no longer honour the requested mode then it detaches completely.

from docs.

paddybyers avatar paddybyers commented on June 2, 2024

Given describing this in the spec is a very minor change, and not a change of functionality, but clarifying expected functionality, I will ago ahead and do a PR later.

Sure

from docs.

mattheworiordan avatar mattheworiordan commented on June 2, 2024

This is resolved

from docs.

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.