Hello Denis,
Have you subscribed to that topic before sending that message?
You need to have a device subscribed to my/custom/topic or my/custom/+ or my/+/+ or just # so it can received your message.
Otherwise, it will not be forwarded to any subscriber.
Remember that subscribed devices using QoS1 or QoS2, and using cleanSession=false, even though they are disconnected at the time the message is received, it will do receive them on next connection.
That is, keep in mind that:
a) You need to have devices subscribed with topic filters that matches your message topics
b) Those subscriptions can be received online (no matter what kind of session cleanSession=true or false), or quality of service.
c) To receive messages while disconnected you must have devices that are subscribed with at least QoS1 or QoS2 and cleanSession=false
Let us know your progress,
Best Regards,