Writes command with wait and the trace it is sent in, and waits for the broker; throws when it did not ack.