platform/sandbox/mqueue/example/sender.dart
2024-11-12 01:00:05 -07:00

12 lines
285 B
Dart

import 'package:angel3_mq/mq.dart';
final class Sender with ProducerMixin {
Sender() {
MQClient.instance.declareQueue('hello');
}
Future<void> sendGreeting({required String greeting}) async => sendMessage(
routingKey: 'hello',
payload: greeting,
);
}