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...
Gespeichert in:
Hauptverfasser: | , , , , |
---|---|
Format: | Patent |
Sprache: | chi ; eng |
Schlagworte: | |
Online-Zugang: | Volltext bestellen |
Tags: |
Tag hinzufügen
Keine Tags, Fügen Sie den ersten Tag hinzu!
|
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 |
---|