Closed Gsantomaggio closed 1 week ago
Yes, you can. Just make sure you do not make a blocking call in the callback. For example, calling _senderLink.Close() in the callback will cause a deadlock.
Thank you @xinchen10 , Maybe I am missing something but there is no the API:
_senderLink.SendAsync(message, (sender, message1, outcome, state) =>
{
Console.WriteLine($"Message sent {state} {outcome} ");
message1.Dispose();
}, this);
It is the Send(Message message, OutcomeCallback callback, object state)
method. The [Operation]Async
naming convention is only for methods with Task return type.
https://github.com/Azure/amqpnetlite/blob/1dcc457828a8b368ffa2a9ebfa4c5468db2004f8/src/SenderLink.cs#L140C20-L140C82
Thank you
Hi, Sorry if I opened an issue, but there is no discussion section.
I am looking for a way to use the
OutcomeCallback
with the AsyncSend, like:Can the following pattern be implemented with the
AsyncSend()
?