Implementing c # and android message push by apollo (2 ),

Source: Internet
Author: User

Implementing c # and android message push by apollo (2 ),

After apache apollo is installed, org. eclipse. paho is a convenient software for testing. The following describes how to install and use paho.

2. Set up paho:

A. Download org.eclipse.paho.ui.app-1.0.0-win32.win32.x86_64, decompress and open paho.exe To Go To The paho page.

B paho is divided into three parts: Set the server on the left, configure the server in the middle, and display the message list on the right. Click the server mqttTest on the left to display the configuration list in the middle, enter the tcp address tcp: // 0.0.0.0: 61613 or tcp: // 127.0.0.1: 61613 of the server address configured in the previous section. The client ID is the identifier recognized by the apache apollo proxy server. Click Connect to display the connected information.

Note: subscription and publishing are the basic mode of message pushing. In paho, select a topic. In this example, the topic is test, all clients that have subscribed to this topic can accept the published information. Likewise, the subscription in paho is vice versa. About Service Quality

Up to once:

This setting pushes messages to the Client, which has the lowest reliability. Then the broker will not return the result code, telling you that he has received the message, and will not try to resend the message after the failure. This is a bit like unreliable messages, such as JMS.
At least once

This setting ensures that messages are pushed to the Client at least once. If push is set to push at least once, Apollo returns a callback function to ensure that the proxy has received the message and that the message is pushed. If no response is received within the specified time period, the Client wants to re-publish the message. Therefore, this situation may occur: the proxy receives a message to be pushed, and then receives a message pushed to the same Client. Therefore, if PUBACK is lost during transmission, the Client resends the message and does not check whether it is resending. Then, the broker sends the message to the subscription topic.
Exactly once
This setting has the highest level of reliability. He will ensure that the publisher will not only push, but will not be received twice, as at least once. Of course, this setting will increase the network load.

C. Check the connection status on the web page of apache apollo.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.