how to call a asynchronous function inside a consumer.listen()
lkrjangid1 opened this issue · comments
IIUC the recommended way to invoke async functions within a sync block is to use await.
Wouldn't something like this work for you?
consumer.listen((message) {
await doSomethingWith(message);
message.ack();
});