Alibaba Cloud Message Service is a high performance, reliable, safe, extensible distributed message and notification service that supports massive messages, concurrent operations. It help facilitate message transfer between applications and system decoupling.
Message Service provides 2 models:
Designed to send or receive messages in Point-to-Point way. The consumer receives a message by pulling it down.
Designed to send or receive the message in Pub/Sub way. The message is pushed from message broker to consumers. The consumers can be HTTP, queue, SMS, e-mail, or mobile phone.
Queue is designed to provide consuming message in a point-to-point way for highly concurrent scenarios. Each message can be consumed only once.
The queue model supports a variety of customizable attributes to meet the requirements of different scenarios, such as normal queue, delayed queue, priority queue.
One queue can be accessed by many producers or consumers at the same time while one message can not be fetched by other consumers within a certain period of time after being fetched by one consumer.
The message which is sent to the queue successfully is guaranteed to be fetched at least once and prevent the illegal access from others.
It provides function to rollback the message sent to the queue， which helps applications to perform transaction rollback.
It provides log function to query the operations of sending, receiving and deleting on messages. It’s helpful while debugging.
You can get queue information from CloudMonitor and customize alerts.
Topic model is designed to provide message publishing, subscription, and notification from one publisher to multiple subscribers. It supports several ways for message notification:
- Push the message to HTTP server specified by user.
- Push the message to an MNS queue.
- Push the message to an e-mail address or e-mail address group.
- Push the message to browsers via WebSocket(in planning).
- Push the message to mobile devices.
- Support notification messages.
- Support one-to-multiple messages.
- Support tag filtering for messages.
- Support different ways to push messages.
- Ensurance for message delivery.
- Support for event messages from Alibaba Cloud services.
- Support log management.
- Support Alibaba Cloud Watch.
Message Service server pushes messages to the HTTP URL which is specified by the users. In this way, the applications of users do not need to handle the message broker server any more, which helps users save resource such as CPU, and reduce dependency on the Message Service SDK.
Message service server pushes messages from topic to queue when users are inconvenient to provide the HTTP URL due to the network problem, which enables applications consume messages from queue in time.
A message sent to topic can be subscribed by multiple consumers and pushed to mutiple endpoints in the way designated by consumers.
Tag(at most of time , it’s a string) can be specified while doing subscription of topics for endpoints. Tag can also be defined as an attribute of the message while publishing. Topic only sends the message to the endpoint with the same tag(string). If the endpoint does not specify which tag to subscribe, it will receive all of the messages published to the topic. Messages without tags will be sent to all the endpoints.
Support the following ways:
- Push messages to the HTTP server specified by users. Details：HttpEndpoint，HttpEndpoint Process ，HttpEndpoint in Java，HttpEndpoint Local Debug Tool.
- Push messages to an MNS queue.
- push messages to an e-mail address or e-mail address group.
- Push messages to phone numbers via SMS.
- Push messages to browsers via WebSocket(in planning).
- Push messages to mobile devices.
Messages are pushed in the strategy and format specified by users.
Push strategies include the following:
- BACKOFF_RETRY: Retry 3 times in total (with the interval of 10 to 20 seconds) for each message.
- EXPONENTIAL_DECAY_RETRY: Retry 176 times in total for each message. The intervals between adjecent retries are sequential as following order: 1, 2, 4, 8 , 16, 32, 64, 128, 256, 512, 512, 512… The maximum time interval is 512 seconds.
Message formats include the following：
- XML：Message body is in XML format with message attributes;
- JSON：Message body is in JSON format with message attributes;
- SIMPLIFIED：message body is raw text.
Message service provides event/notification function, so that other Alibaba Cloud Services such as OSS(Object Storage Service), DM(DirectMail) Service, SLS(Simple Log Service) etc. can subscribe event from the cloud resources. This function enables users to set rules for the event operations on OSS object including: CreateObject, DeleteObject, UpdateObject etc.
Every operation on message is logged down to the SLS or OSS. Users can query the message log with message id in SLS.
Users can get topic information from CloudWatch and customize alerts.