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

19 lines
409 B
Dart

import 'dart:developer';
import 'package:angel3_mq/mq.dart';
class ServiceOne with ProducerMixin {
Future<void> requestFoo() async {
final res = await sendRPCMessage<String>(
exchangeName: 'ServiceRPC',
routingKey: 'rpcBinding',
processId: 'foo',
args: {},
);
_handleFuture(res);
}
void _handleFuture(String data) {
log('Service One received: $data\n');
}
}