Coder Social home page Coder Social logo

Comments (8)

ripienaar avatar ripienaar commented on June 11, 2024

Boolean CLI options take —no-ack unfortunately the library they generate the CLI doesn’t show this clearly

from jetstream.

matthiashanel avatar matthiashanel commented on June 11, 2024

Boolean CLI options take —no-ack unfortunately the library they generate the CLI doesn’t show this clearly

Yep, just tried that. it takes it. but it does not make it into help.

from jetstream.

ripienaar avatar ripienaar commented on June 11, 2024

Yeah it’s also a pain to prompt for because you get basically a 3 state Boolean.

Will see if I can turn it into a nil pointer Boolean which is really annoying in go

from jetstream.

matthiashanel avatar matthiashanel commented on June 11, 2024

No Rush, I basically filed this so it's not forgotten.
The option is a result of jetstream acking whenever there's a response subject, I believe the fix should be in not doing that.

from jetstream.

ripienaar avatar ripienaar commented on June 11, 2024

@matthiashanel If I follow what you're saying you want JS not to ack receiving messages via the reply subject? How else would it ack receiving messages?

from jetstream.

matthiashanel avatar matthiashanel commented on June 11, 2024

@ripienaar , I assume things can still change while in technical preview.
For starters I'd not use nc.Request(q.Topic, out, timeout) to receive an ack.
It forces the entire connection to use old style inboxes.
I would add a call that does basically does what request does (create an inbox, subscribe, auto unsubscribe 1, publish request, s.next) but instead uses an inbox with a new prefix $JS._INBOX.
This would still be be compatible with the protocol.
Adding a helper say nc.RequestJSAck(...) would keep usage simple.
Jetstream would only respond if such an inbox was used.

To support publishrequest getting multiple answers, from nats clients as well as jetstream, I'd make the inbox name format known and add a call NewInboxWithAckResponse(), So that the client can create it's own subscriber etc...

from jetstream.

ripienaar avatar ripienaar commented on June 11, 2024

While those would be interesting improvements one of the main driving forces for the JS design is to be “just nats” it has to fit in naturally with what people already know.

We don’t want to create ways to do JS specific requests and that’s a feature imo.

Re the inboxes - we have to use old style inboxes so JS know when interest is gone

from jetstream.

matthiashanel avatar matthiashanel commented on June 11, 2024

This is at the cost of requiring configuration that at best has to be set, at worst allows you to shoot yourself in the foot.
Either way smth. new has to be learned, semantic overload of existing calls and thus new responses, or a new inbox soliciting a certain response (an inbox we could, by name design, make subject to permissions).
I just want to have brought it up.

from jetstream.

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.