Skip to content
pubscout

stomp_dart_client

3.0.1, released a year ago by blackhorse-one.com

Dart STOMP client for messaging interoperability in Flutter and Dart applications.

WASM-ready
$ flutter pub add stomp_dart_client
Source repository

What it does

Provides a full STOMP client implementation that connects to remote servers via WebSockets or SockJS. It allows applications to send messages, subscribe to destinations, and handle acks/nacks.

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

Use it when

  • You need to connect a Flutter or Dart application to a STOMP-compatible messaging broker.
  • You require SockJS support over standard WebSockets.

Skip it when

  • You are communicating with standard REST or GraphQL APIs rather than a STOMP message broker.

Strengths

  • Supports both pure Dart and Flutter across multiple platforms.
  • Includes configuration options for heartbeats, reconnection delays, and SockJS compatibility.

Weaknesses

  • Browser-based clients cannot provide custom WebSocket headers due to platform constraints.

Setup

Kind
Pure Dart
Effort
Low
Code generation
No
Direct dependencies
1
StompClient client = StompClient(
    config: StompConfig(
        url: 'wss://yourserver',
        onConnect: (StompFrame connectFrame) {
            client.subscribe(destination: '/foo/bar', headers: {}, callback: (frame) {
                print(frame.body);
            });
        }
    )
);
client.activate();

Alternatives

Packages that do the same job and could replace stomp_dart_client.

Works with

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