Skip to content
pubscout

dart_amqp

0.3.1, released 2 years ago by an unverified publisher

A native Dart AMQP 0.9.1 client library supporting TLS and asynchronous API.

$ flutter pub add dart_amqp
Source repository

What it does

Provides a native Dart client for AMQP 0.9.1 brokers like RabbitMQ. It features an asynchronous API with support for streams, pluggable authentication providers, TLS connections, publish confirmations, and heartbeats.

AI-written summary of version 0.3.1, based on the package's README and metadata. Report an inaccuracy

Use it when

  • You need to connect a Dart application to an AMQP 0.9.1 broker like RabbitMQ.
  • Your application requires consuming from queues or publishing messages via exchanges using an asynchronous API.

Skip it when

  • You need automated recovery of client topologies when re-establishing dropped connections.
  • You require support for AMQP protocol versions other than 0.9.1.

Strengths

  • Implements almost the entire AMQP 0.9.1 specification natively in Dart.
  • Supports TLS, pluggable authentication, heartbeats, and publish confirmations.

Weaknesses

  • Does not currently support automatic recovery of client topologies upon reconnection.
  • Missing support for basic get and recover-async protocol features.

Setup

Kind
Pure Dart
Effort
Low
Code generation
No
Direct dependencies
2

not documented

import "package:dart_amqp/dart_amqp.dart";

void main() async {
  Client client = Client();
  Channel channel = await client.channel();
  Queue queue = await channel.queue("hello");
  Consumer consumer = await queue.consume();
  consumer.listen((AmqpMessage message) {
    print("Received: ${message.payloadAsString}");
    message.ack();
  });
}

Alternatives

Packages that do the same job and could replace dart_amqp.

Works with

Packages commonly used together with dart_amqp: ones it builds on, ones built on it, and its own family.