Giter Site home page Giter Site logo

nats-jetstream-transport's People

Contributors

vinceveve avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar

nats-jetstream-transport's Issues

Feature Request: Add option to ServerConsumerOptions to automatically ack messages

Hello ๐Ÿ‘‹

Thanks for creating this library (or forking and improving). I'm just getting started with Jetstream and decided to give this library a try instead of re-writing my own Nats Streaming strategy for Jetstream. I have a feature request if you are taking them? Please see below.

Request

Add an option to the ServerConsumerOptions automatically ack messages if the subscriber function executes successfully (e.g. automaticAck: true | false (Default: false)).

Benefit of Automatic Ack's

If ServerConsumerOptions. manualAck = true there is no need to invoke the context.message.ack() within each subscriber method which becomes repetitive. Developers will have the option to enable this and not have to add the ack code to each method they wish to manually ack.

This could be taken a step further by adding an additional setting that supports the nak(millis?)option to tell nats to wait (or not) and resend the message but I'm getting ahead of myself.

Suggestion

Add the NatsJetStreamServer (line 103) when the message is sent to the eventHandler by subscribing to the Observable and checking if manualAck is true then automatically ack'ing the message.

Please let me know if you have questions. I'm happy to contribute and submit a PR if you are accepting them.

Thanks,

Derek

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.