Supercharge Your Innovation With Domain-Expert AI Agents!

ActiveMQ-based client online state updating method, program and system

A status update and client-side technology, applied in the field of communication, can solve problems such as device online status update errors, incorrect status, etc., and achieve the effect of avoiding false offline

Inactive Publication Date: 2020-12-04
广州鲁邦通物联网科技股份有限公司
View PDF5 Cites 3 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

[0007] Device A is connected to activemq online. When the network of device A is suddenly disconnected, device A has no time to send an offline message to activemq. At this moment, device A is still online in activemq. After a short time (in seconds or milliseconds, Almost no perceptible delay will be caused to the user's command processing), device A will reconnect to activemq when the network is restored, and send an online request, activemq processes the online request of device A and sends the topic of device online, and finds that device A still has an old connection In the online state, that is, activemq will find that there are two connections, a new connection just established and an old connection, and it will disconnect the old connection (the same client can only have one connection at the same time), and send the device down The offline message is sent to the offline program, but the real status of device A should be online at this time. For device A, the last message of activemq is that the device is offline. Simply process the online status of the device for the topic of offline and offline, then It will cause an incorrect status, that is, device A is online at this time, but the online and offline handler will update the status to offline
[0008] Therefore, the technical problem to be solved in this case is: how to avoid device online status update errors

Method used

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
View more

Image

Smart Image Click on the blue labels to locate them in the text.
Viewing Examples
Smart Image
  • ActiveMQ-based client online state updating method, program and system
  • ActiveMQ-based client online state updating method, program and system

Examples

Experimental program
Comparison scheme
Effect test

Embodiment 1

[0030] refer to figure 1 , a method for avoiding false online clients based on ActiveMQ, the method is:

[0031] When the client online message sent by the ActiveMQ middleware is received, the mapping relationship between the session ID and the client ID in the database is updated, and the status of the client is online;

[0032] When receiving the client offline message sent by the ActiveMQ middleware, query whether there is a mapping containing the session ID in the database. If it exists, clear the mapping relationship between the session ID and the client ID and update the status of the client to offline Status, if it does not exist, keep the status of the client as online;

[0033] The client online message includes a client ID and a session ID generated when a connection is established between the client and the ActiveMQ middleware, and the client offline message includes a session ID.

[0034] When the client goes online, it will establish a connection with the Active...

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to View More

PUM

No PUM Login to View More

Abstract

The invention belongs to the field of communication, and provides an ActiveMQ-based client online state updating method. The method comprises the following steps of: when a client online message sentby ActiveMQ middleware is received, updating a mapping relationship between a session ID (Identity) and a client ID in a database, and enabling the state of a client to be in an online state; when a client offline message sent by the ActiveMQ middleware is received, inquiring whether mapping containing the session ID exists in a database or not, if yes, clearing the mapping relation between the session ID and the client ID and updating the state of the client to be an offline state, and if not, keeping the state of the client to be an online state; wherein the client online message comprises aclient ID and a session ID generated when a connection is established between the client and the ActiveMQ middleware, and the client offline message comprises the session ID. On the basis of the method, online state updating errors of the client can be avoided. The invention further discloses a program and a system based on the method.

Description

technical field [0001] The invention relates to the communication field, in particular to a method, a program and a system for updating the online state of a client based on ActiveMQ. Background technique [0002] In the prior art, when a device (that is, a client) and a middleware establish and disconnect a connection, the online and offline program of the business system handles the online and offline logic by listening to the ActiveMQ topic "ActiveMQ.Advisory.Connection". [0003] Its logical process is: [0004] Device A connects to activemq, and the middleware generates a client online message, which contains the session ID and client ID. The session ID will be generated every time a connection is established and each connection is a new session ID. The online and offline programs obtain it by listening to the topic Online message, update the status of the device to online; [0005] When device A disconnects from activemq, it will go through the middleware, which will...

Claims

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to View More

Application Information

Patent Timeline
no application Login to View More
IPC IPC(8): H04L29/08
CPCH04L67/14H04L67/54
Inventor 余燕威何奎陶洋
Owner 广州鲁邦通物联网科技股份有限公司
Features
  • R&D
  • Intellectual Property
  • Life Sciences
  • Materials
  • Tech Scout
Why Patsnap Eureka
  • Unparalleled Data Quality
  • Higher Quality Content
  • 60% Fewer Hallucinations
Social media
Patsnap Eureka Blog
Learn More