English
English
简体中文
Contact Us
Register
Log In
Language
English
English
简体中文
Contact Us
Log In
Register
Go to main website
App Develop

App Development Platform

App development platform provides multiple development methods such as no-code or IoT App SDK development to maximize the monetization of IoT apps.
layoutIndex

Message Queue

Last Updated on : 2021-09-16 09:53:47download

Message Service is used to actively push the event data to external partners through Pulsar, which meets their demands for real-time and persistent messages.

Pulsar is a multi-tenant, high-performance solution for server-to-server messaging. Pulsar was originally developed by Yahoo and now is under the stewardship of the Apache Software Foundation. Tuya Smart Message Service is customized and modified based on Apache Pulsar. Message Service integration can be achieved with the Pulsar SDK provided by Tuya.
As a message broker, Pulsar is built on the Pub/Sub (publish and subscribe) pattern. In this pattern, producers publish messages to topics. Consumers subscribe to those topics, process incoming messages, and send an acknowledgment when processing is completed.
When a subscription is created, Pulsar retains all messages, even if the consumer is disconnected. Retained messages are discarded only when a consumer acknowledges that those messages are processed successfully.
Moreover, multiple consumers can subscribe to the same topic. After messages are processed, consumers need to send acknowledgments to brokers, so brokers can discard these messages. The Pulsar brokers provided by Tuya Smart allocate multiple partitions for each topic. Pulsar brokers send messages according to partitions and consumers.

Message development process

Message Queue

Message receiving process

Message Queue

Security

  • Authentication security:
    Tuya Smart Pulsar Message Service adopts a highly customized authentication algorithm and dynamic tokens to enhance security. You can ignore the implementation details and accomplish the authentication based on the provided SDK.

  • Data security:
    Transmission security: Tuya Smart Pulsar Message Service transmits data based on the SSL.
    Business security: Business data is encrypted with AES-128 and requests are signed.

This section contains the following topics to help you quickly understand related concepts and how-to guides: