Run SimpleMQProducer class to send a message.
Log on to the MQ console, in the left-side navigation pane select Message Query > By Topic, and select the topic name to be queried. You can see that the message has been sent to the topic.
Run SimpleMQConsumer class to receive a message. You can see the log that shows the message is received and printed. The initialization will take seconds, which doesn’t often occur in the production environment.
In the MQ console, go to Consumers > Consumer Status, and you can see the started consumer is online and the subscription relationship is consistent in the Consumer Status Information section.
- Run MQProducer4Spring class to send a message.
- Run MQConsumer4Spring class to receive a message.
The process for viewing the result is similar to that shown above.
Run SimpleTransactionProducer class to send a message.
Note: LocalTransactionCheckerImpl class is the check interface class for local transactions. It is used for verifying transactions. For detailed information, see Send and Receive Transactional Message.
Run SimpleOrderConsumer class to receive a message.
Run SimpleOrderProducer class to send a message.
Note: Message delivery and consumption is processed in order. For detailed information, see Send and Receive Ordered Message.
Run MQTimerProducer class to send a message. The message will be delivered in 3 seconds.
Note: You can specify an exact delivery time, which is up to 40 days. For detailed information, see Send and Receive Scheduled Message.