dart_nats 0.1.3+4 dart_nats: ^0.1.3+4 copied to clipboard
A Dart client for the NATS messaging system. It's simple. Design to use with flutter easy to write no need to deal with complex asynchronous.
import 'package:dart_nats/dart_nats.dart';
void main() async {
var client = Client();
client.connect('localhost');
var sub = client.sub('subject1');
client.pubString('subject1', 'message1');
var msg = await sub.stream.first;
print(msg.payloadString);
client.unSub(sub);
client.close();
}