listen abstract method
StreamSubscription<AmqpMessage>
listen(
- void onData(
- AmqpMessage event
- Function onError,
- void onDone(),
- bool cancelOnError,
Bind onData
listener to the stream of AmqpMessage
that is emitted by the consumer.
You can also define an optional onError
method that will handle stream errors and an
onDone
method to be invoked when the stream closes.
Implementation
StreamSubscription<AmqpMessage> listen(
void Function(AmqpMessage event) onData,
{Function onError,
void Function() onDone,
bool cancelOnError});