Publishing client confirmation that some subscriber received the message

I have a scenario in which it is critical that the publishing client receives confirmation that it’s published message was received by a subscriber. I know that the publishing client will get a PUBACK when the broker receives and begins forwarding the message, but it is not guaranteed that the message was successfully received by some subscriber at time of PUBACK as I understand it.

The MQTT5 spec states:

The receiver does not need to complete delivery of the Application Message before sending the PUBACK. When its original sender receives the PUBACK packet, ownership of the Application Message is transferred to the receiver.

I know that the broker basically guarantees delivery with QoS 1 which we plan on using, but I need confirmation of delivery to a subscriber, otherwise the publishing client needs to fallback to an alternative form of communication (and assume that the primary form of communication is down).

Currently we are planning on achieving this by having the receiving clients (the subscribers) publishing their own “received” messages back to the publisher, but I feel like this couples the pub client and sub client in some way and is scope-creep for what the broker is supposed to handle. All I can find is that the broker guarantees delivery, but in this case if the message is not received in a reasonable amount of time our application needs to fallback to other forms of communication. Is there a better way to handle?

Any advice is welcome.

Edit: it seems the pattern we are following is the request/response as seen in the MQTT5 spec

Hi dlowrey,

Thanks for your interest in MQTT! What you are describing looks like classicl request-response use-case. You can easy test it with HiveMQ Swarm tool and “ping-pong” scenario: HiveMQ Swarm Example Scenarios :: HiveMQ Documentation

If you are into java coding, you could also consider implementing your own HiveMQ broker extension of a PubRec Interceptor: Interceptors :: HiveMQ Documentation

Let me know which option you like more and if you have more questions
Thanks
Dasha from HiveMQ Team