Blocking send operation

Yeah, I’m not a C# dev, but in Java the code to implement this behaviour is not that hard. Essentially make your own send() method that does the actual API send, and then block on an object / thread coordinator (e.g. a CountDownLatch of size 1). The latch (or whatever) should probably be keyed on the MessageID that the API assigns to the message after the send() call returns… or make sure the CorrelationKey is set to the message or something unique; this is in case you have multiple threads publishing in parallel. Then in the callback where publish ACKs are received from the broker, you can check the CorrelationKey assigned to the ACK, find the Latch (or whatever) that is for that specific message and unblock it. This will release your other thread to continue. Obviously, if you receive a NACK (negative acknowledgement instead) you’d want to throw an exception to the latch so that your publishing thread knows it has a problem.
Note that in C# the API has only one thread (Context thread) for doing everything, so you CANNOT publish from this thread and block as it would block up other processes the API needs to run. So make sure you’re publishing from an application-owned thread.