All Projects → c16a → nats-dart

c16a / nats-dart

Licence: MIT license
NATS client for Dart lang

Programming Languages

dart
5743 projects

Projects that are alternatives of or similar to nats-dart

flutter easyloading
✨A clean and lightweight loading/toast widget for Flutter, easy to use without context, support iOS、Android and Web
Stars: ✭ 1,021 (+3193.55%)
Mutual labels:  flutter-plugin
expanding bottom bar
BottomNavigationBar for Flutter with expanding titles
Stars: ✭ 39 (+25.81%)
Mutual labels:  flutter-plugin
flutter nfc kit
Flutter plugin to provide NFC functionality on Android and iOS, including reading metadata, read & write NDEF records, and transceive layer 3 & 4 data with NFC tags / cards
Stars: ✭ 119 (+283.87%)
Mutual labels:  flutter-plugin
barcode.flutter
barcode generate library for Flutter
Stars: ✭ 58 (+87.1%)
Mutual labels:  flutter-plugin
getwidget-docs
Get Widgets UI library docs.
Stars: ✭ 17 (-45.16%)
Mutual labels:  flutter-plugin
Vertical Card Pager
Use dynamic and beautiful card view pagers to help you create great apps.
Stars: ✭ 84 (+170.97%)
Mutual labels:  flutter-plugin
material-about
An about screen to use in your Mobile apps.
Stars: ✭ 37 (+19.35%)
Mutual labels:  flutter-plugin
flutter-maplibre-gl
A flutter package for showing customizable vector/raster maps with Maplibre GL (forked from tobrun/flutter-mapbox-gl)
Stars: ✭ 69 (+122.58%)
Mutual labels:  flutter-plugin
Some-Calendar
Custom calendar dialog widget for flutter with (multi select, single select, date range) mode
Stars: ✭ 69 (+122.58%)
Mutual labels:  flutter-plugin
umeng analytics plugin
Flutter 版友盟统计插件
Stars: ✭ 20 (-35.48%)
Mutual labels:  flutter-plugin
stop watch timer
This is Stop Watch Timer for flutter plugin.🏃‍♂️
Stars: ✭ 76 (+145.16%)
Mutual labels:  flutter-plugin
gbk2utf8
A flutter package to convert gbk to utf-8
Stars: ✭ 40 (+29.03%)
Mutual labels:  flutter-plugin
flutter-app
Full Feature Todos Flutter Mobile app with fireStore integration.
Stars: ✭ 138 (+345.16%)
Mutual labels:  flutter-plugin
nearby connections
Flutter plugin (android) for sharing bytes and files Offline, (Based on the android Nearby Connections API)
Stars: ✭ 64 (+106.45%)
Mutual labels:  flutter-plugin
Free-RASP-Flutter
Flutter library for improving app security and threat monitoring on Android and iOS mobile devices.
Stars: ✭ 62 (+100%)
Mutual labels:  flutter-plugin
flutter contest
Flutter project submitted on Flutter contest
Stars: ✭ 14 (-54.84%)
Mutual labels:  flutter-plugin
twilio flutter
A Flutter package for Twilio API.
Stars: ✭ 16 (-48.39%)
Mutual labels:  flutter-plugin
fancy bar
A fancy yet beautiful animated widget for your Flutter apps
Stars: ✭ 33 (+6.45%)
Mutual labels:  flutter-plugin
get version
Get Version - Get the Version Name, Version Code, Platform and OS Version, and App ID on iOS and Android. Maintainer: @rodydavis
Stars: ✭ 87 (+180.65%)
Mutual labels:  flutter-plugin
seo renderer
A Flutter Web Plugin to display Text Widget as Html for SEO purpose
Stars: ✭ 103 (+232.26%)
Mutual labels:  flutter-plugin

Build Status FOSSA Status

nats-dart

NATS client to usage in Dart CLI, Web and Flutter projects

Generating documentation

Documentation is generated using the dartdoc tool

dartdoc
pub global activate dhttpd
dhttpd --path doc/api

Navigate to http://localhost:8080 and voila!! 💥

Setting up a client

Setting up a client and firing up a connection

var client = NatsClient("localhost", 4222);
await client.connect();

Note: Never use a client without waiting for the connection to establish

Listening to cluster updates

var client = NatsClient("localhost", 4222);
await client.connect(onClusterupdate: (serverInfo) {
    // Something changed on the server.
    // May be a new server came up, 
    // Or something reeeeaallly bad happened
    // Hmmmm ...
});

Publishing a message

Publishing a message can be done with or without a reply-to topic

// No reply-to topic set
client.publish("Hello world", "foo");

// If server replies to this request, send it to `bar`
client.publish("Hello world", "foo", replyTo: "bar");

Subscribing to messages

To subscribe to a topic, specify the topic and optionally, a queue group

var messageStream = client.subscribe("sub-id", "foo");

// If more than one subscriber uses the same queue group,
// only one will receive the message
var messageStream = client.subscribe("sub-id", "foo", queueGroup: "group-1");

messageStream.listen((message) {
    // Do something awesome
});

Roadmap

  • Support clustered nats servers
  • Support multiple topic subscriptions

Contributions

  • No rules. Fork, change, PR.

FAQs

Can I use this in dart projects?

Not yet. The API is not yet finalised NATS protocol is not fully supported.

When will this be ready?

Soon I guess. Feel free to pitch in and it'll be ready sooner.

FOSSA Status

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].