![]() ![]() Import .RMQConnectionFactory import .AmqpConnectionFactoryPostProcessor import javax.jms. */ public class AliyunCredentialsProvider implements CredentialsProvider Import. import .CredentialsProvider import 3.StringUtils import import /** * The AliyunCredentialsProvider class that is used to generate a dynamic username and its password. There are two primary categories of messaging models: message queuing and publish-subscribe (often referred to as pub-sub) messaging. Then, click the icon on the right side of the endpoint to copy the endpoint. On the Endpoint Information tab of the Instance Details page, move the pointer over the type of endpoint that you want to use.In the instance list, click the name of the instance that you want to manage. In the top navigation bar of the Instances page, select a region.In the left-side navigation pane, select Instances. Log on to the ApsaraMQ for RabbitMQ console.Then, the producer and consumer can access the ApsaraMQ for RabbitMQ instance by using the endpoint. Before you send and receive messages, you must specify the endpoint in the code of the producer and consumer. You must obtain an endpoint of your instance in the ApsaraMQ for RabbitMQ console. Frequent creation of connections consumes a large number of network and broker resources and may even trigger protection against SYN flood attacks on the broker. This way, the client does not need to establish connections every time you use the client to send or receive messages. ![]() Important If you use an SDK to send or receive messages on your client, we recommend that you use persistent connections. For more information about the sample code, see Durable subscriptions. If a message is sent when the subscriber is inactive, the subscriber can consume the message after it becomes active. ![]() However, the subscriber does not need to remain active to consume all the messages sent to the topic. If a subscriber creates a durable subscription, the subscriber must subscribe to a topic before a producer sends a message to the topic.For more information about the sample code, see Nondurable subscriptions. If a message is sent when the subscriber is inactive, the subscriber cannot consume the message after it becomes active. In addition, the subscriber must remain active to consume all the messages sent to the topic. If a subscriber creates a nondurable subscription, the subscriber must subscribe to a topic before a producer sends a message to the topic.Producers and subscribers have timing dependencies.After a producer sends a message to a topic, all subscribers of the topic can consume the message. Each message can have multiple consumers.The JMS Pub/Sub messaging model has the following features: ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |