Communication method based on MQTT topic subscription mechanism and access gateway
An access gateway and topic subscription technology, applied in the field of communication, can solve the problems of complex message routing in distributed instant messaging applications, and achieve the effect of simplifying instant messaging solutions
- Summary
- Abstract
- Description
- Claims
- Application Information
AI Technical Summary
Problems solved by technology
Method used
Image
Examples
Embodiment 1
[0044] This embodiment provides an access gateway, figure 1 is a structural block diagram of an access gateway according to an embodiment of the present invention, such as figure 1 As shown, the access gateway includes: IMService (business processing module), MQTTClientI (internal client), MQTTClientR (external client) and MQTTServer (server), wherein,
[0045] IMService is the business processing module of the IM access gateway, responsible for the core business scheduling of the IM access gateway, including functions: user relationship management, access gateway and MQTTClientR mapping management, MQTTClientI and MQTTClientR calls, etc.
[0046] Its function is: used to register event notification with MQTTClientI, so that when the MQTTClientI receives the message from the MQTTServer, it will notify the IMService; it is also used to make the MQTTClientI subscribe to the topic of the MQTTServer; it is also used to create an MQTTClientR , so that the MQTTClientR is connected ...
Embodiment 2
[0054] This embodiment provides a communication method based on the MQTT topic subscription mechanism, figure 2 It is a flowchart of a communication method based on an MQTT topic subscription mechanism according to an embodiment of the present invention, such as figure 2 As shown, the method includes:
[0055] Step S202, start the IMService, MQTTClientI, MQTTClientR, and MQTTServer in the access gateway A and the corresponding access gateway B; wherein, MQTTClientI subscribes to the topic with the MQTTServer of the same access gateway, MQTTClientR connects with the MQTTServer of the corresponding access gateway, and subscribe topic;
[0056] Step S204, the first user goes online at access gateway A, and the second user goes online at access gateway B;
[0057] Step S206, based on the access gateway A and the access gateway B, the first user exchanges messages with the second user.
[0058] Through the above method, the complicated message routing function can be omitted, ...
Embodiment 3
[0076] image 3 is a schematic diagram of an access gateway startup process according to an embodiment of the present invention, as shown in image 3 As shown, the following steps need to be performed to start the access gateway (take the start of access gateway A as an example):
[0077] 1. The IMService that accesses gateway A registers event notifications with MQTTClientI, that is, when MQTTClientI receives a message from MQTTServer, it will notify IMService in the form of an event callback function.
[0078] 2. The IMService of access gateway A invokes the function interface of MQTTClientI to make MQTTClientI subscribe to the MQTTServer topic. The topic message includes: the message (Topic : IM / Push / AG / *, IM / Rpt / User / {UserID} / *).
[0079] 3. The IMService of access gateway A is based on the preset access gateway list (assuming that the scale of the access gateway is fixed, each access gateway will be configured with a list of all access gateways, and the list of access g...
PUM
Abstract
Description
Claims
Application Information
- R&D Engineer
- R&D Manager
- IP Professional
- Industry Leading Data Capabilities
- Powerful AI technology
- Patent DNA Extraction
Browse by: Latest US Patents, China's latest patents, Technical Efficacy Thesaurus, Application Domain, Technology Topic, Popular Technical Reports.
© 2024 PatSnap. All rights reserved.Legal|Privacy policy|Modern Slavery Act Transparency Statement|Sitemap|About US| Contact US: help@patsnap.com