WebSocket-based message pushing method and device, server and storage medium

The invention discloses a WebSocket-based message pushing method and device, a server and a storage medium, wherein the method comprises the steps that: when a subscription request sent by a first user terminal is received, a first WebSocket server associatively stores a first session ID, first inte...

Ausführliche Beschreibung

Gespeichert in:
Bibliographische Detailangaben
Hauptverfasser: CHENG BAOPING, XU XUE, ZHOU HE, XU BANGZHEN, ZHUANG ZAIXIONG
Format: Patent
Sprache:chi ; eng
Schlagworte:
Online-Zugang:Volltext bestellen
Tags: Tag hinzufügen
Keine Tags, Fügen Sie den ersten Tag hinzu!
Beschreibung
Zusammenfassung:The invention discloses a WebSocket-based message pushing method and device, a server and a storage medium, wherein the method comprises the steps that: when a subscription request sent by a first user terminal is received, a first WebSocket server associatively stores a first session ID, first interface information and a first server IP address to a Redis cache; when an event to be consumed in the Kafka message queue is obtained, a second WebSocket server obtains target interface information corresponding to the event to be consumed; the second WebSocket server determines a target WebSocket server, which is matched with the interface information, in the WebSocket servers; and the second WebSocket server sends a push request corresponding to the event to be consumed to the target WebSocket server, and the target WebSocket server pushes the event to be consumed to a target user terminal corresponding to the target WebSocket server. According to the method, the Kafka stored in the disk is used as the message mi