publish method
void
publish(
- String subject,
- Uint8List data, {
- Map<
String, String> ? arguments, - String? originId,
- String? replyTo,
override
Publishes a message. Throws TransportServerUnavailableException when the
connection is not established. replyTo names the subject a response must
be published to; it is a wire subject, not a local topic.
Implementation
@override
void publish(
String subject,
Uint8List data, {
Map<String, String>? arguments,
String? originId,
String? replyTo,
}) {
if (!isConnected) {
throw TransportServerUnavailableException(subject);
}
publishes.add(
FakeTransportPublish(subject, data, arguments, originId, replyTo),
);
}