First, the concept
Ad-Hoc mode, consumers should take the initiative to their own mq messages;
Publish and subscribe model, mq automatically pushed to consumers;
Second, code implementation
Sent successfully:
redelivered is not consumption;