When using FlowableWithSingle<Mqtt5Publish,Mqtt5SubAck> subscribePublishes, it can result is a few different states depending on the result of the subscription. It with either :
Emit the SubAck message as the single and first element if at least one subscription of the Subscribe message was successful, and then emit the Publish messages matching the successful subscriptions of the Subscribe message,
Emits an Mqtt5SubAckException if the received SubAck message if it only contains Error Codes
Or, errors with a different exception if an error occurred before the Subscribe message was sent.
As for the implementation here, could you please explain your intention with this configuration a little more fully so that we can better provide implementation suggestions? It sounds like you are using this flowable in place of confirming subscription success via the returned SubAck, where we would typically recommend utilizing SubAck as definition confirmation of a successful subscription.
Let us know your thoughts, or feel free to reach out on the HiveMQ Community Forum for some more specific help with the HiveMQ Client!
Best,
Aaron from the HiveMQ Team