stomp 0.7.0

#STOMP Dart Client

STOMP Dart client for communicating with STOMP complaint messaging brokers and servers.

Stomp Dart Client is distributed under an Apache 2.0 License.

Build Status

See also Ripple - Lightweight Dart Messaging Server.


Add this to your pubspec.yaml (or create it):


Then run the Pub Package Manager (comes with the Dart SDK):

pub install


###Running on Dart VM

import "package:stomp/stomp.dart";
import "package:stomp/vm.dart" show connect;

void main() {
  connect("").then((StompClient client) {
      (Map<String, String> headers, String message) {
        print("Recieve $message");

    client.sendString("/foo", "Hi, Stomp");

There are basically a few alternative ways to communicate:

  • JSON objects: sendJson() and subscribeJson()
  • Strings: sendString() and subscribeString()
  • Bytes: sendBytes() and subscribeBytes()
  • BLOB (huge data): sendBlob() and subscribeBlob()

Please refer to StompClient for more information.

###Running on Browser

The same as the above, except import websocket.dart instead of vm.dart:

import "package:stomp/stomp.dart";
import "package:stomp/websocket.dart" show connect;

//the rest is the same as running on Dart VM


  • Support STOMP 1.2 or above
  • Support UTF-8 encoding


  • Heart beat not supported.

Use this package as a library

1. Depend on it

Add this to your package's pubspec.yaml file:

  stomp: ^0.7.0

2. Install it

You can install packages from the command line:

with pub:

$ pub get

Alternatively, your editor might support pub get. Check the docs for your editor to learn more.

3. Import it

Now in your Dart code, you can use:

import 'package:stomp/stomp.dart';
Awaiting analysis to complete.