Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/flutterings/simple_stomp
This is a pure dart Stomp v1.2 client implementation for connecting to a Message Broker.
https://github.com/flutterings/simple_stomp
Last synced: 14 days ago
JSON representation
This is a pure dart Stomp v1.2 client implementation for connecting to a Message Broker.
- Host: GitHub
- URL: https://github.com/flutterings/simple_stomp
- Owner: flutterings
- License: mit
- Created: 2024-12-06T16:32:35.000Z (23 days ago)
- Default Branch: main
- Last Pushed: 2024-12-08T22:54:37.000Z (20 days ago)
- Last Synced: 2024-12-08T23:18:45.681Z (20 days ago)
- Language: Dart
- Homepage:
- Size: 8.79 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 10
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# simple_stomp
A Dart client library for [STOMP](http://stomp.github.io/) messaging protocol.
## Usage
A simple usage example:
```dart
import 'package:simple_stomp/simple_stomp.dart';Future main() async {
final stompClient = StompClient(
config: StompClientOptions(
host: 'localhost',
port: 61613,
login: 'guest',
passcode: 'guest',
heartbeat: const Duration(seconds: 5),
timeout: const Duration(seconds: 5),
),
);await stompClient.connect();
}
```Subscribe to a destination:
```dart
stompClient.subscribe(
destination: '/topic/foo',
callback: (frame) {
print('Received: ${frame.body}');
},
);
```Unsubscribe from a destination:
```dart
stompClient.unsubscribe('/topic/foo');
```Send a message to a destination:
```dart
stompClient.send(
'/topic/foo',
'Hello, World!',
);
```Disconnect from the server:
```dart
stompClient.disconnect();
```## Roadmap
Take a look at the tracking project for Stomp v1.2 implementation: [Stomp v1.2 feature complete](https://github.com/orgs/flutterings/projects/1/views/2)
## Features and bugs
Please file feature requests and bugs at the [issue tracker](https://github.com/flutterings/stomp.dart/issues).
## License
This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.