Is there something like zeromq (or build on it) that has guaranteed delivery?
Alternatively, depending on your use case, you mark messages with sequence numbers, and fill the gaps upon receiver's request.
Of course what everyone wants is exactly-once, which is profoundly difficult even when you know the exact cast of characters in terms of problem domain and compute fabric.
Idempotent updates with retry and ack is a very popular compromise that’s usually pretty feasible.