PackageTrack
Sign in Get early access

dart_nats

A Dart client for the NATS messaging system. Design to use with Dart and flutter.

1.4.1 3.9K downloads/mo #4224 most downloaded on pub.dev dart-nats/dart-nats

What this package is like to depend on

Last release today

24 Aug 2026

Ships unpredictably

gaps range from 8 days to 1.6 years

Most releases are documented

notes for 51 of 58 stable releases

Nothing withdrawn

no release was ever pulled

7 years old

58 releases · first in 2019

13 releases in the last 12 months

see the full history below

Release timeline

58 releases · Dec 2019 to Aug 2026
2020 2021 2022 2023 2024 2025 2026
Release Pre-release

Releases

latest 58
  1. 1.4.1 24 Aug 2026
    Release notes
    • Fix heartbeat pings raising an unhandled zone error on every disconnect. The PONG-tracking callback added in 1.3.0 used an expression body, so type inference picked then<int> and the null-returning onError handler could not satisfy FutureOr<int> -- visible on the Dart VM and dart2wasm (dart2js elides the cast).
    Open source →
    Release notes
    • Fix heartbeat pings raising an unhandled zone error on every disconnect. The PONG-tracking callback added in 1.3.0 used an expression body, so type inference picked then<int> and the null-returning onError handler could not satisfy FutureOr<int> -- visible on the Dart VM and dart2wasm (dart2js elides the cast).
    Open source →
  2. 1.4.0 23 Jul 2026
    Release notes
    • Add filtered/keep/seq-bounded stream purge: JsStream.purge()/JetStream.purgeStream() now accept optional filter, keep, and seq parameters ($JS.API.STREAM.PURGE's own options), instead of only supporting an all-or-nothing purge.
    • Add ObjectStore.putStream()/getStream() for uploading/downloading objects as a Stream<List<int>>/Stream<Uint8List> without buffering the whole payload in memory, computing the SHA-256 digest incrementally as chunks arrive.
    • Fix ObjectStore.put()/putStream() leaving a previous object's chunks orphaned in the backing stream when overwriting an existing name -- the old version's chunks are now purged once the new version is safely written.
    • Bump actions/checkout/actions/cache in CI to versions that don't trigger GitHub's Node 20 deprecation warning.
    Open source →
    Release notes
    • Add filtered/keep/seq-bounded stream purge: JsStream.purge()/JetStream.purgeStream() now accept optional filter, keep, and seq parameters ($JS.API.STREAM.PURGE's own options), instead of only supporting an all-or-nothing purge.
    • Add ObjectStore.putStream()/getStream() for uploading/downloading objects as a Stream<List<int>>/Stream<Uint8List> without buffering the whole payload in memory, computing the SHA-256 digest incrementally as chunks arrive.
    • Fix ObjectStore.put()/putStream() leaving a previous object's chunks orphaned in the backing stream when overwriting an existing name -- the old version's chunks are now purged once the new version is safely written.
    • Bump actions/checkout/actions/cache in CI to versions that don't trigger GitHub's Node 20 deprecation warning.
    Open source →
  3. 1.3.0 23 Jul 2026
    Release notes
    • Add consumer pause/resume support (NATS 2.11+): JetStream.pauseConsumer(stream, consumer, pauseUntil) and JetStream.resumeConsumer(stream, consumer), calling $JS.API.CONSUMER.PAUSE. ConsumerInfo also gains paused/pauseUntil fields reflecting the consumer's current pause state.
    • Add GitHub Actions CI (test suite against local NATS containers, analyze/format checks, cross-platform analyze jobs, publish dry-run) and automated pub.dev publishing on tagged releases.
    • Fix heartbeat pings (pingInterval/maxPingsOut) never confirming a PONG reply actually arrived before counting toward the missed-ping limit, so a connection that was responding perfectly fine still got force-disconnected after maxPingsOut heartbeat ticks. The periodic heartbeat now tracks its PONG the same way Client.ping() does and resets the missed-ping counter on receipt.
    Open source →
    Release notes
    • Add consumer pause/resume support (NATS 2.11+): JetStream.pauseConsumer(stream, consumer, pauseUntil) and JetStream.resumeConsumer(stream, consumer), calling $JS.API.CONSUMER.PAUSE. ConsumerInfo also gains paused/pauseUntil fields reflecting the consumer's current pause state.
    • Add GitHub Actions CI (test suite against local NATS containers, analyze/format checks, cross-platform analyze jobs, publish dry-run) and automated pub.dev publishing on tagged releases.
    • Fix heartbeat pings (pingInterval/maxPingsOut) never confirming a PONG reply actually arrived before counting toward the missed-ping limit, so a connection that was responding perfectly fine still got force-disconnected after maxPingsOut heartbeat ticks. The periodic heartbeat now tracks its PONG the same way Client.ping() does and resets the missed-ping counter on receipt.
    Open source →
  4. 1.2.4 20 Jul 2026
    Release notes
    • Update package homepage and repository URLs to point to the new dart-nats GitHub organization.
    Open source →
  5. 1.2.3 19 Jul 2026
    Release notes
    • Fix background reconnection loop getting stuck or stopping prematurely after network loss by evaluating connection and closed states more robustly.
    • Fix socket cleanups hanging on zombie connections during abrupt network loss by introducing a soft cleanup with a 2-second timeout window.
    • Correct connection callback trigger logic, ensuring onReconnect correctly fires during a reconnection cycle instead of onConnect.
    • Many thanks to contributor @JuanCordovaLazo for these crucial reconnect fixes.
    Open source →
  6. 1.2.2 17 Jul 2026
    Release notes
    • Fix JetStream.listStreams()/listConsumers() silently truncating at the server's page size (256 items) instead of paginating via offset/total — accounts with more streams/consumers than that lost visibility into everything past the first page, with no error or truncation flag.
    • Fix Consumer.messages()'s pull loop and OrderedConsumer swallowing every delivery failure into a silent retry loop instead of surfacing it through the stream's addError. For pull consumers specifically, a deleted server-side consumer never actually threw from fetch() — it silently timed out with an empty batch, indistinguishable from a merely idle consumer — so the loop now also confirms the consumer still exists whenever a batch comes back empty.
    • Fix KeyValue.watch()/history()/keys() leaking their ephemeral push consumer on every call — the Consumer returned by createConsumer() was discarded and never deleted once the caller cancelled or the call finished. ConsumerConfig also gains an inactiveThreshold field (serialized as inactive_threshold, same convention as idleHeartbeat) so ephemeral consumers can be given a server-side reap window as a safety net.
    • Add Message.nakSync()/termSync()/inProgressSync(), awaitable twins of the existing ackSync() for nak()/term()/inProgress(). The originals call pub() without awaiting its own Future<bool>, so a disconnected client still reports success even though the ack/nak/term never reached the server — prefer the *Sync variants when that needs to be known.
    Open source →
  7. 1.2.1 16 Jul 2026
    Release notes
    • Update README.md with Microservices Framework (ADR-32) and Client Discovery documentation.
    Open source →
  8. 1.2.0 16 Jul 2026
    Release notes
    • Add heartbeats, clustering, robust reconnection, buffer limits, pull flow control, and NATS Microservices Framework (ADR-32).
    • Add client-side service discovery for the ADR-32 Microservices framework, complementing the addService/MicroService hosting side:
      • Client.discoverServices(), getServicesInfo(), and getServicesStats() fan a request out to $SRV.* (optionally scoped to service name and ID) and collect all replies within a bounded timeout window.
      • Adds PingResponse, InfoResponse, EndpointInfo, StatsResponse, and EndpointStatsInfo to parse standard response payloads.
      • Thanks nverbeek for the contribution.
    Open source →
  9. 1.1.2 12 Jul 2026
    Release notes

    1.1.2

    • Fix JetStream.accountInfo() returning all-zero Tier for single-tier accounts by parsing usage fields from the top-level response instead of a nonexistent nested tier key. Also fix Tier.fromJson crash on uint64 sentinel values by reading fields as num. Thanks @nverbeek for the contribution.
    Open source →
    Release notes
    • Fix JetStream.accountInfo() returning all-zero Tier for single-tier accounts by parsing usage fields from the top-level response instead of a nonexistent nested tier key. Also fix Tier.fromJson crash on uint64 sentinel values by reading fields as num. Thanks nverbeek for the contribution.
    Open source →
  10. 1.1.1 25 Jun 2026
    Release notes
    • Fix defect #42: Ensure newInbox always appends a dot suffix (.) to inboxPrefix to conform to hierarchical NATS subject structures (_INBOX.> gateway callout authorization policy).
    • Retain backward compatibility: Do not append double dots (..) if the prefix argument already ends with a dot.
    Open source →
  11. 1.1.0 24 Jun 2026
    Release notes
    • Add JetStream, Key-Value, and Object Store API enhancements and handle-based classes:
      • Introduce JsStream class wrapping JetStream stream operations (info, purge, consumer, createConsumer).
      • Introduce generic Consumer<T> class with fetch (for pull batching) and messages() (stream for push deliver or continuous pull polling in the background).
      • Introduce AccountInfo API mapping JetStream tier resource usage and account details.
      • Add support for numReplicas and maxAge properties in StreamConfig.
      • Support flexible payload publishing using publishPayload<T> on the JetStream class.
    • Key-Value Store API updates:
      • Add create and update methods supporting optimistic concurrency control (via PubOpts).
      • Add getRevision to retrieve historical values.
      • Support tracking and emitting key-value entry operations (KeyValueOp like put, delete, and purge).
      • Filter out deleted and purged keys automatically in KeyValue.get().
    • Object Store API updates:
      • Introduce ObjectStoreConfig supporting replicas, maxBytes, and ttl.
      • Add addLink and addBucketLink methods to align with standard NATS conventions (aliasing/replacing old putLink and putBucketLink).
      • Update list() to correctly track tombstones and filter deleted object metadata.
      • Add helper methods putBytes and getBytes.
    • Performance and refactoring improvements:
      • Optimize NATS protocol parser by replacing dynamic List growth/sublisting with direct byte processing on a manual buffer manager.
      • Clean up and document API definitions, including configuration options, exception models, and platform stubs.
    Open source →
  12. 1.0.0 09 Jun 2026
    Release notes
    • Add NATS JetStream Support (Stream/Consumer management, Publish/Subscribe, Pull mode with Ack/Nak/Term)
    • Add NATS Key-Value (KV) Store (Put, Get, Delete, Purge, Watch)
    • Add NATS Object Store (128 KiB chunking, automatic SHA-256 validation)
    Open source →
  13. 0.7.0 09 Jun 2026

    Nothing published for this version

  14. 0.6.5 17 Nov 2024
    Release notes
    • Issue resolved when app is in background. Thanks nileshsoni97 for contribution.
    Open source →
  15. 0.6.4 08 Nov 2024
    Release notes
    • Fix Uint8List and List<int> inconsistency. Thank myxzlpltk for contribution.
    Open source →
  16. 0.6.3 09 Oct 2024
    Release notes
    • fix Exposing Security Context#31.
    • Fix missing headers in request response.
    Open source →
  17. 0.6.2 02 Jul 2023
    Release notes
    • fix a bug that does not correctly parse headers containing the ':' character. Thank https://github.com/CoryHagerman for contribution.
    Open source →
  18. 0.6.1 16 Nov 2022
    Release notes
    • fix nkeys decode issue
    Open source →
  19. 0.6.0 16 Nov 2022
    Release notes
    • Support verbos acknowledge
    • Chang pub, pubString to async
    • Header support (hpub and hmsg)
    Open source →
  20. 0.5.0 09 Oct 2022
    Release notes
    • Add nkeys publicKey privateKey functions
    • Revamp rqeust
    • Custom inbox prefix
    • Inbound structure data
    Open source →
  21. 0.4.9 07 Oct 2022
    Release notes
    • fix #22 error when connect to nats://demo.nats.io
    Open source →
  22. 0.4.8 06 Oct 2022
    Release notes
    • fix #23 Unsupported operation: Platform._version with WebSocket
    Open source →
  23. 0.4.7 06 Oct 2022
    Release notes
    • add generic type to client.request()
    • fix reconnect issue
    • fix retry issue
    Open source →
  24. 0.4.6 04 Oct 2022
    Release notes
    • fix bug #16 Connect to invalid ws connection does not give error
    Open source →
  25. 0.4.5 03 Oct 2022
    Release notes
    • fix bug wss: connecting bug
    Open source →
  26. 0.4.4 02 Oct 2022
    Release notes
    • fix bug #20 larger MSG payloads not always working, check if full payload present in buffer
    Open source →
  27. 0.4.3 02 Oct 2022

    Nothing published for this version

  28. 0.4.2 02 Oct 2022
    Release notes
    • TLS support
    Open source →
  29. 0.4.1 02 Oct 2022
    Release notes
    • fix wss://host:port
    Open source →
  30. 0.4.0 02 Oct 2022
    Release notes
    • client.connect() support with url schema example ws://host:port or nats://nost:port
    • tls:// not support yet
    • discontinue client.tcpConnect()
    • add nkey authentication
    • add jwt authentication
    Open source →
  31. 0.3.5 25 Aug 2021
    Release notes
    • Update readme
    Open source →
  32. 0.3.4 24 Aug 2021
    Release notes
    • Support TCP socket as 0.2.x by client.tcpConnect()
    Open source →
  33. 0.3.3 23 Aug 2021
    Release notes
    • Update package dependencies
    Open source →
  34. 0.3.2 01 Aug 2021
    Release notes
    • Fix flutter web Nuid() error
    Open source →
  35. 0.3.0 28 May 2021
    Release notes
    • Change transport from socket to WebSock
    • Support Flutter Web
    Open source →
  36. 0.2.0 07 Mar 2021
    Release notes
    • Add user passwor authentication
    • Add token authentication
    • Convert to Null safety
    • Dart SDK version 2.12.0 - 3.0.0
    • fix inbox security
    Open source →
  37. 0.1.8 31 May 2020
    Release notes
    • fix request error on second request
    Open source →
  38. 0.1.7 26 Jan 2020
    Release notes
    • add async support for ping()
    • add message.respondString
    Open source →
  39. 0.1.6 18 Jan 2020
    Release notes
    • async connect
    • fix defect message delay when sub receive continuous message
    Open source →
  40. 0.1.6+1 19 Jan 2020
    Release notes
    • Improve receive buffer handling
    Open source →
  41. 0.1.5 05 Jan 2020
    Release notes
    • request/respond function
    • change some wording from payload to data
    Open source →
  42. 0.1.5+1 05 Jan 2020
    Release notes
    • fix defect
    Open source →
  43. 0.1.4 01 Jan 2020

    Nothing published for this version

  44. 0.1.4+1 01 Jan 2020
    Release notes
    • add inbox to generate unique inbox subject
    • add nuid to generate unique id
    Open source →
  45. 0.1.3 30 Dec 2019

    Nothing published for this version

  46. 0.1.3+1 30 Dec 2019
    Release notes
    • add string api client.pubString and message.string
    • fix defect: pub sub non ascii
    • fix defect: message include \r or \n
    • revamp message decoding
    Open source →
  47. 0.1.3+2 01 Jan 2020

    Nothing published for this version

  48. 0.1.3+3 01 Jan 2020

    Nothing published for this version

  49. 0.1.3+4 01 Jan 2020
    Release notes
    • refactor code
    • add commend
    Open source →
  50. 0.1.1 27 Dec 2019
    Release notes
    • publish can be buffered.
    Open source →
  51. 0.1.0 22 Dec 2019

    Nothing published for this version

  52. 0.1.0+1 22 Dec 2019
    Release notes
    • Add readme
    Open source →
  53. 0.1.0+2 22 Dec 2019
    Release notes
    • Update readme
    Open source →
  54. 0.1.0+3 22 Dec 2019
    Release notes
    • Update sample code
    Open source →
  55. 0.1.0+4 22 Dec 2019
    Release notes
    • Update sample code
    Open source →
  56. 0.0.2 22 Dec 2019
    Release notes
    • Refactor code
    Open source →
  57. 0.0.2+1 22 Dec 2019
    Release notes
    • Add change log
    Open source →
  58. 0.0.1 22 Dec 2019
    Release notes
    • Initial experimental version
    Open source →

Every package, every release, already written down.

The archive is open and free. Watching your own project is what we are building next.

Browse the archive