[go: up one dir, main page]

TWI617208B - Method and system for connection monitoring of message queue protocol - Google Patents

Method and system for connection monitoring of message queue protocol Download PDF

Info

Publication number
TWI617208B
TWI617208B TW106100705A TW106100705A TWI617208B TW I617208 B TWI617208 B TW I617208B TW 106100705 A TW106100705 A TW 106100705A TW 106100705 A TW106100705 A TW 106100705A TW I617208 B TWI617208 B TW I617208B
Authority
TW
Taiwan
Prior art keywords
online
message
online status
publishing
status
Prior art date
Application number
TW106100705A
Other languages
Chinese (zh)
Other versions
TW201826832A (en
Inventor
梁景智
張詠舜
陳逸霖
張書銘
王昱淇
Original Assignee
研華股份有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 研華股份有限公司 filed Critical 研華股份有限公司
Priority to TW106100705A priority Critical patent/TWI617208B/en
Application granted granted Critical
Publication of TWI617208B publication Critical patent/TWI617208B/en
Publication of TW201826832A publication Critical patent/TW201826832A/en

Links

Landscapes

  • Computer And Data Communications (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

本發明提供一種訊息佇列通訊協定之連線監控機制,適用於一對多或多對多的通訊模式。本發明揭露之訊息佇列通訊協定之連線監控系統包含:至少一發佈端裝置係至少配置於一指定時間為區間持續發送在線通知訊息;一訊息代理端裝置;以及至少一訂閱端裝置係至少配置以基於在線通知訊息紀錄並更新每一個發佈端裝置的在線通知紀錄,建立並定期檢查在線狀態紀錄表,發現在線狀態為下線,並持續接收到發佈端裝置在線通知訊息,則發送重新連線通知,要求發佈端重新傳送連線通知。 The invention provides a connection monitoring mechanism for a message queue protocol, which is suitable for a one-to-many or many-to-many communication mode. The communication monitoring system of the present invention discloses that at least one publishing device is configured to continuously send an online notification message at least for a specified time interval; a message proxy device; and at least one subscribing device is at least The configuration is to record and update the online notification record of each publishing device based on the online notification message, establish and periodically check the online status record table, find that the online status is offline, and continuously receive the online notification message of the publishing device, and then send the reconnection. Notification, requiring the publisher to resend the connection notification.

Description

訊息佇列通訊協定連線監控之方法與系統 Method and system for monitoring the connection of communication protocol

本發明是關於訊息佇列通訊協定之連線監控機制,特別是關於適用於物聯網之訊息佇列通訊協定連線監控之方法與系統。 The present invention relates to a connection monitoring mechanism for a message queue protocol, and more particularly to a method and system for monitoring the connection of a message protocol for the Internet of Things.

由於物聯網(Internet of Things,IoT)已成為未來科技發展趨勢,而靈活性高的發布/訂閱(Publish/Subscribe,pub/sub)亦逐漸成為物聯網主要之通訊模式,其中適用於此通訊模式下之物聯網中,裝置與裝置之間的訊息傳遞的通訊協定包含:MQTT、AMQP、RabbitMQ等。 Since the Internet of Things (IoT) has become a trend of future technology development, the highly flexible Publish/Subscribe (pub/sub) has gradually become the main communication mode of the Internet of Things, which is applicable to this communication mode. In the Internet of Things, the communication protocol for message transmission between devices and devices includes: MQTT, AMQP, RabbitMQ, and so on.

在pub/sub之通訊模式下,訂閱端(subscriber)向訊息代理端(broker)訂閱主題,並由訊息代理端將發布端(publisher)發送的訊息過濾分類,再透過訊息代理端將訂閱端訂閱之主題相關的訊息傳送給訂閱端,因此在pub/sub中可適用於一對一、多對一或一對多的訊息傳遞系統。 In the pub/sub communication mode, the subscriber subscribes to the topic of the message broker, and the message broker filters the message sent by the publisher, and then subscribes the subscriber through the message broker. The subject-related messages are sent to the subscriber, so it can be applied to one-to-one, many-to-one or one-to-many messaging systems in pub/sub.

但也因為訂閱端與發佈端的訊息必須透過訊息代理端,並且訂閱端與發佈端之間並無直接的資訊傳遞,而訊息代理端亦無對訂閱端和發佈端之在線狀態的規範,使得訂閱端在pub/sub通訊模式下無法及時且正確地更新發布端的在線狀態。此問題將會使的物聯網中的伺服器端(可為訂閱端)無法準確的對客戶端(可為發佈端)進行即時的提供服務,或是造成訊 息丟失的問題。 But also because the message between the subscriber and the publisher must pass through the message proxy, and there is no direct information transfer between the subscriber and the publisher, and the message broker has no specification of the online status of the subscriber and the publisher, so that the subscription In the pub/sub communication mode, the online status of the publishing terminal cannot be updated in time and correctly. This problem will make the server side (which can be the subscription end) in the Internet of Things cannot provide accurate services to the client (which can be the publishing end), or cause the message. The problem of loss of interest.

因此,市場上仍需要在不改變現有通訊模式的優勢下,且不增加訊息傳遞對系統本身造成過重的負擔,卻又能及時正確的連線監控機制,以提升物聯網系統的應用範圍。 Therefore, the market still needs to change the existing communication mode without increasing the burden of the message transmission on the system itself, but it can timely and correctly connect the monitoring mechanism to enhance the application scope of the Internet of Things system.

有鑑於習知技術之技術無法及時正確的掌握系統中裝置的在線狀態,本發明提供一種訊息佇列訊協定之連線監控機制,在不需更改現有通訊協定規範之下,提供設備管理者端一種輕量化的即時正確的系統設備在線狀態之監控機制。 In view of the fact that the technology of the prior art cannot correctly and correctly grasp the online state of the device in the system, the present invention provides a connection monitoring mechanism for the message protocol, and provides the device manager without changing the existing communication protocol specification. A lightweight and accurate monitoring mechanism for online status of system devices.

本發明提供一種訊息佇列通訊協定之連線監控系統,用以監控系統中設備的上線狀況,此訊息佇列通訊協定之連線監控系統包含:至少一發佈端裝置,係配置以與一訊息代理裝置建立連線及於一指定時間為區間持續向訊息代理端裝置發送包含在線狀態相關之一在線通知訊息;一訊息代理端裝置,係配置以接收至少一發佈端裝置的在線通知訊息及發送在線通知訊息至至少一訂閱端裝置;以及至少一訂閱端裝置,其包含一第一資料儲存裝置,至少一訂閱端裝置係配置以與訊息代理裝置建立連線,並基於在線通知訊息紀錄並更新每一個發佈端裝置的在線通知訊息,以建立一第一在線狀態紀錄表以記錄每一個發佈端裝置的一在線狀態及一更新時間紀錄,並且將第一在線狀態紀錄表儲存於第一資料儲存裝置,進一步定期檢查每一個發佈端裝置的在線狀態及更新時間紀錄,並向訊息代理端裝置發送在線狀態不為上線但持續更新的發佈端裝置之重新連線通知訊息。 The invention provides a connection monitoring system for a message queue protocol, which is used for monitoring the online status of devices in the system. The message monitoring system of the communication protocol includes: at least one publishing device, configured to communicate with a message The proxy device establishes a connection and continuously sends an online notification message including an online status to the message proxy device for a specified time interval; the message proxy device is configured to receive the online notification message and send the at least one publishing device The online notification message is to the at least one subscribing device; and the at least one subscribing device includes a first data storage device, and the at least one subscribing device is configured to establish a connection with the message proxy device, and record and update based on the online notification message An online notification message of each of the publishing devices to establish a first online status record table to record an online status and an update time record of each of the publishing devices, and store the first online status record in the first data storage Device, further check the online status of each publishing device and more regularly Time record, and send online messages proxy end device status notification message is not reconnect continuously updated on-line, but the publishing side of the device.

再者,本發明提供一種訊息佇列通訊協定之連線監控方法,用以監控系統中設備的上線狀況,此訊息佇列通訊協定之連線監控方法包含:至少一發佈端裝置與一訊息代理端專裝置連線;每一個發佈端裝置於一指定時間為區間持續向訊息代理端裝置發送包含在線狀態相關之一在線通知訊息;一訂閱端裝置與訊息代理端裝置連線;一訂閱端裝置向訊息代理端裝置訂閱至少一發佈端裝置的包含在線狀態相關之在線通知訊息;訊息代理端裝置發送在線通知訊息至訂閱端裝置;訂閱端裝置基於在線通知訊息更新至少一發佈端裝置的在線狀態;訂閱裝置端定期檢查每一個發佈端裝置的在線狀態;及訂閱端裝置向訊息代理端裝置發送在線狀態不為上線但持續更新的發佈端裝置之重新連線通知訊息。 Furthermore, the present invention provides a method for monitoring the connection of a message queue protocol for monitoring the status of a device in a system. The method for monitoring the connection of the message protocol includes: at least one publisher device and a message agent The end device is connected to each other; each of the publishing devices continuously sends an online notification message including an online status to the message proxy device for a specified time interval; a subscribing device is connected to the message proxy device; and a subscribing device Subscribing to at least one online device related online notification message of the publishing device to the message proxy device; the message proxy device sending the online notification message to the subscribing device; and the subscribing device updating the online state of the at least one publishing device based on the online notification message The subscribing device periodically checks the online status of each of the publishing devices; and the subscribing device sends a reconnection notification message to the messaging device to the publishing device whose online status is not online but is continuously updated.

此外,本發明亦提供一種訊息佇列通訊協定之連線監控方法,包含建立一在線狀態紀錄表紀錄,基於至少一發佈端裝置的一在線通知訊息,紀錄每一個發佈端裝置的一在線狀態及一更新時間紀錄,定義一傳送週期及一最大容忍遺失次數,並定期檢查在線狀態,其包含:判斷最後更新的時間到檢查的時間是否超過指定的一最大容忍時間,其中最大容忍時間為最大容忍遺失次數加一並乘以傳送時間,並執行以下步驟:當超過指定的最大容忍時間且發佈端裝置的在線狀態為上線,則修改在線狀態為下線且刪除發佈端裝置的在線狀態資料,並結束本次定期檢查;而當超過指定的最大容忍時間且發佈端裝置的在線狀態不為上線,則刪除發佈端裝置的在線狀態資料,並結束本次定期檢查;若當未超過制定的最大容忍時間且發佈端裝置的在線狀態為上線時,則結束本次定期檢查;或當未超過制定的最大容忍時間且發佈端裝置的在線狀態不為上線時,則向訊息代 理端裝置發送發佈端裝置之重新連線通知訊息,並結束本次定期檢查。 In addition, the present invention also provides a method for monitoring a connection of a message queue protocol, comprising: establishing an online status record record, recording an online status of each of the issue devices based on an online notification message of at least one of the issue devices; An update time record, defining a transmission period and a maximum tolerance loss number, and periodically checking the online status, comprising: determining whether the last update time to the inspection time exceeds a specified maximum tolerance time, wherein the maximum tolerance time is maximum tolerance The number of lost times is multiplied by the transfer time, and the following steps are performed: when the specified maximum tolerated time is exceeded and the online status of the publishing device is online, the online status is modified to be offline and the online status data of the publishing device is deleted, and the process ends. This periodic check; when the specified maximum tolerance time is exceeded and the online status of the publishing device is not online, the online status data of the publishing device is deleted, and the periodic inspection is ended; if the maximum tolerance time is not exceeded And when the online status of the publishing device is online, the node is The periodic inspection; online status or when the formulation does not exceed the maximum tolerable time and the release end of the device is not online, the message on behalf of the The remote device sends a reconnection notification message of the publishing device, and ends the periodic check.

參照以下詳述並結合如附圖式,即可以理解本發明但不為限制本發明,此技術領域之通常知識者所知的修改及潤飾當然包含於本發明之範疇。 The invention is to be understood as being limited to the details of the invention, and is not intended to limit the invention.

101-105‧‧‧發布端裝置、Pub 101-105‧‧‧Publishing device, Pub

110‧‧‧訊息代理端裝置、Broker 110‧‧‧Message Agent Device, Broker

121-124‧‧‧訂閱端裝置、Sub 121-124‧‧‧Subscribing device, Sub

121a‧‧‧資料儲存裝置 121a‧‧‧Data storage device

301、303-304‧‧‧訊息 301, 303-304‧‧‧ messages

302、401‧‧‧訂閱訊息 302, 401‧‧‧Subscription message

402-407、603-606‧‧‧在線通知訊息 402-407, 603-606‧‧‧Online notification message

601-602、608-609‧‧‧上線通知訊息 601-602, 608-609‧‧‧Online notification message

607‧‧‧重新連線通知訊息 607‧‧‧Reconnection notification message

611-612‧‧‧定期檢查 611-612‧‧‧Check regularly

701‧‧‧在線狀態紀錄表 701‧‧‧Online Status Record

501-506、801-809‧‧‧步驟 501-506, 801-809‧‧‧ steps

第一圖係一種例示本發明之物聯網多對多系統之架構圖。 The first figure is an architectural diagram illustrating an Internet of Things many-to-many system of the present invention.

第二圖係一種本發明之一對多系統之設備架構圖。 The second figure is a device architecture diagram of one of the multi-systems of the present invention.

第三圖係一種本發明一對多系統於MQTT通訊協定下訊息傳遞模式。 The third figure is a message transfer mode of the one-to-many system of the present invention under the MQTT communication protocol.

第四圖係一種本發明應用於MQTT通訊協定下之連線監控機制的訊息傳遞示意圖。 The fourth figure is a schematic diagram of message transmission of the connection monitoring mechanism of the present invention applied under the MQTT communication protocol.

第五圖係一種本發明應用於MQTT通訊協定下之連線監控流程圖。 The fifth figure is a flow chart of the connection monitoring of the present invention applied to the MQTT communication protocol.

第六圖係一種本發明應用於MQTT通訊協定下之連線監控之檢查機制的訊息傳遞示意圖。 The sixth figure is a schematic diagram of message transmission of the invention for applying the inspection mechanism of the connection monitoring under the MQTT communication protocol.

第七圖係一種本發明應用於MQTT通訊協定下之在線狀態紀錄表。 The seventh figure is an online status record table to which the present invention is applied under the MQTT communication protocol.

第八圖係一種本發明應用於MQTT通訊協定下之連線監控之檢查流程圖。 The eighth figure is a flow chart for checking the connection monitoring of the present invention under the MQTT communication protocol.

本發明提供的訊息佇列通訊協定之連線監控機制可以以系統、方法等方式實現。因此,此領域之通常知識者可理解連線監控機制完 成完全以軟體實現、結合軟體及硬體實現、或完全以硬體實現。 The connection monitoring mechanism of the message queue protocol provided by the present invention can be implemented by means of systems, methods, and the like. Therefore, the general knowledge in this field can understand that the connection monitoring mechanism is completed. It is implemented entirely in software, in combination with software and hardware, or entirely in hardware.

多對多及一對多系統架構Many-to-many and one-to-many system architecture

本發明適用於訊息佇列之通訊模型,可適用於一對多及多對多的系統架構中,請參閱第一圖。第一圖係一種例示本發明之物聯網多對多系統之架構圖,其中訊息代理端裝置110可同時服務多個訂閱端裝置121、122、123、124及多個發布端裝置101、102、103、104、105,其中訂閱端裝置121、122、123、124可為伺服器、個人電腦等電腦運算裝置,而發布端裝置101、102、103、104、105可為個人電腦、手機、感測器節點裝置等電腦運算裝置。 The present invention is applicable to a communication model of a message queue, and can be applied to a one-to-many and many-to-many system architecture, see the first figure. The first figure is an architectural diagram illustrating an Internet of Things many-to-many system of the present invention, wherein the message proxy device 110 can simultaneously serve a plurality of subscribing devices 121, 122, 123, 124 and a plurality of publishing devices 101, 102, 103, 104, 105, wherein the subscribing devices 121, 122, 123, 124 can be computer computing devices such as servers and personal computers, and the publishing devices 101, 102, 103, 104, 105 can be personal computers, mobile phones, and senses. A computer arithmetic device such as a detector node device.

特別是訂閱端裝置和發布端裝置皆與訊息代理端裝置保持連線,而彼此之間無實際連線關係,其中連線機制並不限制已無線或有有線方式建立連線。 In particular, both the subscribing device and the publishing device are connected to the message proxy device without actual connection relationship with each other, wherein the connection mechanism does not limit the connection between the wireless or wired mode.

由上述可知此種一對多、多對多系統架構適用於物聯網技術領域上,M2M(Machine to Machine)溝通之標準傳輸協定可適用於MQTT、AMQP、RabbitMQ等,以下是實施例將以MQTT通訊協定並以TCP/IP連線協議執行有線或無線的連線方式。 It can be seen from the above that such a one-to-many, many-to-many system architecture is applicable to the field of Internet of Things technology. The standard transmission protocol of M2M (Machine to Machine) communication can be applied to MQTT, AMQP, RabbitMQ, etc. The following is an example of MQTT. The protocol is wired and wirelessly wired using the TCP/IP connection protocol.

請參閱第二圖,第二圖係一種本發明之一對多系統之設備架構圖,其中訂閱端裝置121(可為伺服器)可包含一資料儲存裝置121a,並與訊息代理端裝置110建立連線,而發布端裝置101、102、103、104、105分別與訊息代理端裝置110建立連線,但不會直接與訂閱端裝置121建立連線。 Please refer to the second figure. The second figure is a device architecture diagram of a multi-system according to the present invention. The subscriber device 121 (which may be a server) may include a data storage device 121a and is established with the message proxy device 110. The connection, and the distribution devices 101, 102, 103, 104, 105 respectively establish a connection with the message proxy device 110, but does not directly establish a connection with the subscribing device 121.

與此架構中,訂閱端裝置121會向訊息代理端裝置110訂閱一主題,發布端裝置101、102、103、104、105則將訊息傳送至訊息代理端裝 置110而不會直接將訊息直接傳送至訂閱端裝置121,訊息代理端裝置110將所有接收的訊息分類,並將與主題相關的訊息傳送至訂閱端裝置121。此外,訂閱端裝置121可同時向訊息代理端裝置110訂閱多個主題,訊息代理端裝置110會將由發布端裝置101、102、103、104、105接收的不同主題的一個或多個訊息分類,並發送與訂閱的多個主題相關的訊息傳送給訂閱端裝置121。 In this architecture, the subscribing device 121 subscribes to the message proxy device 110 for a topic, and the publisher device 101, 102, 103, 104, 105 transmits the message to the message broker. The message 110 is not directly transmitted to the subscribing device 121. The message proxy device 110 classifies all received messages and transmits the message related to the topic to the subscribing device 121. In addition, the subscribing device 121 can simultaneously subscribe to the plurality of topics to the message broker device 110, and the message proxy device 110 classifies one or more messages of different topics received by the publisher devices 101, 102, 103, 104, 105. And transmitting a message related to the subscribed plurality of topics to the subscribing device 121.

連線監控機制Connection monitoring mechanism

請參閱第三圖,第三圖係一種本發明一對多系統於MQTT通訊協定下訊息傳遞模式,發布端裝置101(Pub)將訊息301傳送至訊息代理端裝置110(broker),此訊息301會至少包含一主題(topic)及與主題相關之資料(data),而訊息代理端裝置110會依據主題將資料分類。然而,因為訊息代理端裝置110並未接受到任何主題相關的訂閱訊息,因此訊息代理端裝置110不會對訊息301進行任何發送。 Please refer to the third figure. The third figure is a message transfer mode of the one-to-many system of the present invention under the MQTT protocol. The publishing device 101 (Pub) transmits the message 301 to the message proxy device 110 (broker). There will be at least one topic and data related to the topic, and the message broker device 110 will classify the materials according to the theme. However, because the message broker device 110 does not accept any topic related subscription messages, the message broker device 110 does not make any transmissions to the message 301.

當訂閱端裝置121(Sub)向訊息代理端裝置110發出一訂閱訊息302,此訂閱訊息302會至少包含一主題。因此,當發布端裝置101再向訊息代理端裝置110發布至少包含一主題(topic)及與主題相關之資料(data)的訊息303,此時,訊息代理端裝置110會將訊息303依據主題將資料分類,並且相同主題的資料進一步發送訊息304至訂閱端裝置121。 When the subscribing device 121 (Sub) sends a subscription message 302 to the message broker device 110, the subscription message 302 will contain at least one subject. Therefore, when the publishing device 101 issues a message 303 including at least a topic and a topic-related data to the message proxy device 110, the message proxy device 110 will use the message 303 according to the theme. The data is classified, and the information of the same subject further sends a message 304 to the subscribing device 121.

請參閱第四圖,第四圖係一種本發明應用於MQTT通訊協定下之連線監控機制。本發明之連線監控機制進一步設定發布端裝置101於一指定時間(如:60秒)為區間向訊息代理端110發送至少包含連線監控主題(Keep-connection)的在線通知訊息。 Please refer to the fourth figure. The fourth figure is a connection monitoring mechanism applied to the MQTT communication protocol. The connection monitoring mechanism of the present invention further sets the issuer device 101 to send an online notification message including at least a connection monitoring subject (Keep-connection) to the message broker 110 for a specified time (eg, 60 seconds).

因此,當訂閱端裝置121向訊息代理端裝置110發送至少包含連線監控主題(Keep-connection)的訂閱訊息401,而訊息代理端裝置110仍會接受發布端裝置101發送至少包含連線監控主題(Keep-connection)的在線通知訊息402。 Therefore, when the subscribing device 121 sends the subscription message 401 including at least the connection monitoring subject to the message proxy device 110, the message proxy device 110 still accepts the issue device 101 to send at least the connection monitoring topic. (Keep-connection) online notification message 402.

訊息代理端裝置110將在線通知訊息402分類,並發送至少包含連線監控主題(Keep-connection)的在線通知訊息403至訂閱端裝置121後,發布端裝置101於一指定時間(如:60秒)為區間向訊息代理端110持續發送至少包含連線監控主題(Keep-connection)的在線通知訊息404、406,訂閱端裝置121皆會接收到由訊息代理端裝置110送至少包含連線監控主題(Keep-connection)的在線通知訊息405、407。 The message proxy device 110 classifies the online notification message 402 and sends the online notification message 403 including at least the connection monitoring subject (Keep-connection) to the subscribing device 121, and the publishing device 101 is at a specified time (for example, 60 seconds). The interval notification message 404, 406 is continuously sent to the message proxy 110 for at least the connection monitoring subject (Keep-connection), and the subscribing device 121 receives the at least the connection monitoring topic sent by the message proxy device 110. (Keep-connection) online notification messages 405, 407.

由上述可知,只要發布端裝置101於系統上在線,並持續向訊息代理端110發送在線通知訊息402、404、406,訂閱端裝置121皆可由至少包含連線監控主題(Keep-connection)的在線通知訊息405、407判斷發布端裝置101在線。此連線監控機制可使訂閱端裝置121及時且正確的掌握發布端裝置101的在線狀態。 As can be seen from the above, as long as the publishing device 101 is online on the system and continuously sends the online notification messages 402, 404, and 406 to the message proxy 110, the subscribing device 121 can be online including at least a connection monitoring theme (Keep-connection). The notification messages 405, 407 determine that the originating device 101 is online. The connection monitoring mechanism enables the subscribing device 121 to timely and correctly grasp the online status of the publishing device 101.

較佳地,在線通知訊息可進一步包含發布端裝置101的編號(DeviceID),本發明適用的系統可為一對多或多對多的系統架構向,因此,訂閱端裝置121可由編號同時判斷多個發布端裝置(如:101、102、103、104、105)。 Preferably, the online notification message may further include the number (DeviceID) of the publishing device 101. The system to which the present invention is applicable may be a one-to-many or many-to-many system architecture. Therefore, the subscribing device 121 may judge by number simultaneously. Publisher devices (eg, 101, 102, 103, 104, 105).

較佳地,發布端裝置101需同時發送至少包含連線監控的多個主題的訊息時,該連線監控主題可合併於其他主題之後,以減少發布端裝置101訊息阻塞,且就算再訊息滿載的情況下,仍保持在一指定時間為區 隔的在線通知訊息的頻率。 Preferably, when the publishing device 101 needs to simultaneously send a message including at least a plurality of topics monitored by the connection, the connection monitoring topic may be merged with other topics to reduce the message blocking of the publishing device 101, and even if the message is fully loaded. In case of still maintaining a zone at a specified time The frequency of online notification messages.

在線狀態之檢查機制Online status check mechanism

本發明進一步提供在線狀態之檢查機制,請參閱第五圖。第五圖係一種本發明應用於MQTT通訊協定下之連線監控流程圖,以因應當發布端裝置因連線狀況不穩定等因素,而產生上線通知訊息丟失的狀況,使得訂閱端裝置仍認為此發布端裝置為下線,可能造成無法針對此發布端裝置進行進一步指示。 The present invention further provides an online status check mechanism, see Figure 5. The fifth figure is a flow chart of the connection monitoring of the present invention applied to the MQTT communication protocol, so that the status of the online notification message is lost due to factors such as unstable connection conditions of the publishing device, so that the subscribing device still considers The publisher device is offline, which may result in no further indication of the publisher device.

當發佈端裝置與訊息代理端專裝置連線後會向訊息代理端裝置發送上線通知訊息,並且每一個發佈端裝置於一指定時間為區間持續向訊息代理端裝置發送包含在線狀態相關之在線通知訊息(步驟501)。較佳地,發佈端裝置101的在線通知訊息可夾帶於一非在線狀態相關之通知訊息中。 When the publishing device is connected to the message proxy device, the online notification message is sent to the message proxy device, and each of the publishing devices continuously sends the online notification related to the online state to the message proxy device for a specified time interval. Message (step 501). Preferably, the online notification message of the publishing device 101 can be enqueried in a non-online related notification message.

因此當訂閱端裝置與訊息代理端裝置連線,並且向訊息代理端裝置訂閱至少一發佈端裝置的包含在線狀態相關之在線通知訊息(步驟502),訊息代理端裝置會向訂閱端裝置發送目前為上線的發布端裝置的上線通知訊息,並發送至少一發布端裝置的在線通知訊息(步驟503),其中此至少一發布端裝置必須先發送在線通知訊息至訊息代理端裝置。 Therefore, when the subscribing device is connected to the message proxy device and subscribes to the at least one publishing device's online presence related online notification message to the message proxy device (step 502), the message proxy device sends the current message to the subscribing device. The online notification message is sent to the online publishing device, and the online notification message of the at least one publishing device is sent (step 503), wherein the at least one publishing device must first send the online notification message to the message proxy device.

訂閱端裝置基於在線通知訊息更新每一個發佈端裝置的在線狀態及在線通知訊息的更新時間紀錄(步驟504)。較佳地,將每一個發布端裝置的在線狀態及更新時間記錄可分別儲存在訂閱端裝置儲存的資料儲存裝置。較佳地,依據每一個發布端裝置的編號(DeviceID)依序儲存每一個發布端裝置的在線狀態及在線通知訊息的更新時間紀錄。 The subscribing device updates the online status of each of the publishing device and the update time record of the online notification message based on the online notification message (step 504). Preferably, the online status and update time records of each of the publishing devices are respectively stored in the data storage device stored by the subscribing device. Preferably, the online status of each publishing device and the update time record of the online notification message are sequentially stored according to the number (DeviceID) of each publishing device.

較佳地,訊息代理端裝置基於在線通知訊息更新每一個發佈端裝置的在線狀態及在線通知訊息的更新時間紀錄。較佳地,將每一個發布端裝置的在線狀態及更新時間記錄可分別儲存在息代理端裝置包含的資料儲存裝置。較佳地,依據每一個發布端裝置的編號(DeviceID)依序儲存每一個發布端裝置的在線狀態及在線通知訊息的更新時間紀錄。 Preferably, the message proxy device updates the online status of each of the publishing device and the update time record of the online notification message based on the online notification message. Preferably, the online status and update time records of each of the publishing devices are respectively stored in the data storage device included in the information agent device. Preferably, the online status of each publishing device and the update time record of the online notification message are sequentially stored according to the number (DeviceID) of each publishing device.

此外,訂閱裝置端會定期檢查每一個發佈端裝置的在線狀態(步驟505),若當在線通知訊息的更新時間紀錄持續被更新,就代表訊息代理端裝置或訂閱端裝置持續收到發布端裝置的在線通知訊息,但是此發布端裝置的在線狀態卻為下線時,即表示此發布端裝置的上線通知訊息被丟失。 In addition, the subscriber device periodically checks the online status of each of the publisher devices (step 505). If the update time record of the online notification message is continuously updated, the message proxy device or the subscriber device continues to receive the publisher device. The online notification message, but when the online status of the publishing device is offline, the online notification message of the publishing device is lost.

因此,訂閱端裝置向訊息代理端裝置發送此發布端裝置之一重新連線通知訊息(步驟506),並且訂閱端裝置將在收到一此發布端裝置的上線通知訊息時,更改此發布端裝置的在線狀態改為上線。 Therefore, the subscribing device sends a reconnection notification message to the message proxy device (step 506), and the subscribing device changes the issuer when receiving an online notification message of the originating device. The online status of the device is changed to online.

此檢測機制對於系統管理者有極大的助力,正確的判斷裝置的在線狀態使得系統管理者可以進一步指示上線的發布端裝置執行動作,或指示其他裝置進行重新連線或斷線處理。 This detection mechanism is greatly helpful to the system administrator. Correctly determining the online status of the device allows the system administrator to further instruct the on-line issuing device to perform an action or instruct other devices to perform reconnection or disconnection processing.

請參閱第六圖,第六圖係一種本發明應用於MQTT通訊協定下之連線監控之檢查機制的訊息傳遞示意圖。當發布端裝置101已向訊息代理端裝置110發送上線通知訊息601後,卻在訊息代理端裝置110向訂閱端裝置121發送發布端裝置101的上線通知訊息602時發生訊息丟失。 Please refer to the sixth figure. The sixth figure is a schematic diagram of message transmission of the inspection mechanism of the invention for applying the connection monitoring under the MQTT communication protocol. When the originating device 101 has sent the online notification message 601 to the message proxy device 110, the message loss occurs when the message proxy device 110 transmits the online notification message 602 of the publishing device 101 to the subscribing device 121.

而後,發布端裝置101持續向訂閱端裝置121發送至少包含連線監控主題(Keep-connection)的在線通知訊息603、605,而訂閱端裝置121 亦持續收到由訊息代理端裝置110發送的至少包含連線監控主題(Keep-connection)的在線通知訊息604、606。 Then, the originating device 101 continues to send the online notification message 603, 605 including at least the connection monitoring subject (Keep-connection) to the subscribing device 121, and the subscribing device 121 Online notification messages 604, 606, at least including a link-up monitoring subject (Keep-connection) sent by the message broker device 110, are also continuously received.

訂閱端裝置121於定期檢查611可能還未更新在線通知訊息的更新時間紀錄,因此,訂閱端裝置121至少在定期檢查612時,一定會發現在線通知訊息的更新時間紀錄被更新,而發布端裝置101的在線狀態卻為離線。 The subscribing device 121 periodically checks 611 for the update time record of the online notification message that may not have been updated. Therefore, the subscribing device 121 will surely find that the update time record of the online notification message is updated at least when the periodic check 612 is performed, and the issue device is updated. The online status of 101 is offline.

訂閱端裝置121於此情況下,向訊息代理端裝置110發送發布端裝置101的重新連線通知訊息607,而訊息代理端裝置110則向發布端裝置101發送重新連線通知訊息607a後,發布端裝置101會回應要求而發送上線通知訊息608,並且訂閱端裝置121在收到上先通知訊息609後更新發布端裝置101的在線狀態。 In this case, the subscribing device 121 transmits the reconnection notification message 607 of the distribution device 101 to the message proxy device 110, and the message proxy device 110 transmits the reconnection notification message 607a to the distribution device 101, and then issues the message. The end device 101 sends an online notification message 608 in response to the request, and the subscribing device 121 updates the online status of the issuing device 101 after receiving the first notification message 609.

在線訊息紀錄表之更新機制Online message record update mechanism

請參閱第七圖,第七圖係一種本發明應用於MQTT通訊協定下之在線狀態紀錄表。訂閱端裝置121依據接收的在線通知訊息,更新在線狀態紀錄表701中更新時間紀錄,其中在線狀態紀錄表701儲存於訂閱端裝置121(如:伺服器)的資料儲存裝置121a的。 Please refer to the seventh figure. The seventh figure is an online status record table of the present invention applied to the MQTT communication protocol. The subscribing device 121 updates the update time record in the online status record table 701 according to the received online notification message, wherein the online status record table 701 is stored in the data storage device 121a of the subscribing device 121 (eg, a server).

較佳地,在線狀態紀錄表701可進一步儲存發布端裝置101、102、103、104、105的在線狀態。較佳地,在線狀態紀錄表701可儲存於訊息代理端裝置110包含的資料儲存裝置。較佳地,訊息代理端裝置110的資料儲存裝置及訂閱端裝置121的資料儲存裝置皆分別儲存在線狀態紀錄表701,可搭配比對使用。較佳地,訂閱端裝置121可基於在線狀態紀錄表701進一步判斷非在線狀態相關之訊息的有效性。 Preferably, the online status record table 701 can further store the online status of the issuer devices 101, 102, 103, 104, 105. Preferably, the online status record table 701 can be stored in the data storage device included in the message broker device 110. Preferably, the data storage device of the message proxy device 110 and the data storage device of the subscribing device 121 respectively store the online state record table 701, which can be used in comparison with the comparison. Preferably, the subscribing device 121 can further determine the validity of the non-online status related message based on the online status record table 701.

請參閱第八圖,第八圖係一種本發明應用於MQTT通訊協定下之連線監控之檢查流程圖。本發明進一步提供在線狀態紀錄表的更新機制,以確保提供給系統之資訊的正確性及即時性。 Please refer to the eighth figure. The eighth figure is a flow chart for checking the connection monitoring of the present invention under the MQTT communication protocol. The present invention further provides an update mechanism for the online status record table to ensure the correctness and immediacy of the information provided to the system.

系統管理者可依需求設定一傳送時間及一最大容忍遺失次數,其中傳送時間可設定為在線通知訊息從發布端裝置101、102、103、104、105發送到訂閱端裝置121接收到的時間與上次收到在線通知訊息的時間差,例如:60秒、30秒等。較佳地,可依據系統管理者的需求或系統架構的差異調整該時間。另,系統管理者可依需求設置一最大容忍遺失次數,而最大容忍時間將為傳送時間和最大容忍遺失次數相關。於本實施例中,最大容忍時間為傳送時間乘以最大容忍遺失次數加一,舉例而言,當傳送時間為60秒而最大容忍遺失次數為2時,最大容忍時間為180秒。 The system administrator can set a transmission time and a maximum tolerance loss number according to requirements, wherein the transmission time can be set as the time when the online notification message is sent from the issuing device 101, 102, 103, 104, 105 to the subscribing device 121. The time difference between the last time you received the online notification message, for example: 60 seconds, 30 seconds, and so on. Preferably, the time can be adjusted depending on the needs of the system administrator or the difference in system architecture. In addition, the system administrator can set a maximum tolerance loss count as required, and the maximum tolerance time will be related to the transmission time and the maximum number of tolerable loss. In this embodiment, the maximum tolerance time is the transmission time multiplied by the maximum tolerance loss number plus one. For example, when the transmission time is 60 seconds and the maximum tolerance loss number is 2, the maximum tolerance time is 180 seconds.

此領域通常知識者應當理解最大容忍時間為系統對該在線通知訊息最遲更新時間的要求,當超過最大容忍時間時,系統則判斷發布端裝置為下線,並進一步刪除未更新的在線通知訊息的在線更新時間紀錄,以助於減少下次檢查需讀取在線狀態紀錄表701的資料量。 In this field, the general knowledge person should understand that the maximum tolerance time is the system's latest update time requirement for the online notification message. When the maximum tolerance time is exceeded, the system determines that the publishing device is offline and further deletes the unupdated online notification message. The time record is updated online to help reduce the amount of data that needs to be read in the online status record table 701 for the next check.

當訂閱端裝置121的定期檢查機制開始時(步驟開始),於指定時間為週期,訂閱端裝置會定期檢查每一個發佈端裝置的在線狀態紀錄表(步驟801)及在線狀態。 When the periodic check mechanism of the subscribing device 121 starts (step start), at a specified time period, the subscribing device periodically checks the online status record table (step 801) and online status of each of the issuer devices.

訂閱端裝置計算每一個發佈端裝置的更新時間紀錄的最後更新時間到檢查時間(目前時間)的時間差(步驟802),並判斷該時間差是否超過最大容忍時間(步驟803)。當未超過最大容忍時間時,檢查發佈端裝置的在線狀態是否為上線(步驟804),若發佈端裝置的在線狀態為上線,則結束 本次檢查(步驟結束);若發佈端裝置的在線狀態為下線,則向訊息代理端裝置發送發佈端裝置之重新連線通知訊息(步驟805),並結束本次檢查(步驟結束)。 The subscribing device calculates a time difference from the last update time of the update time record of each of the issuer devices to the check time (current time) (step 802), and determines whether the time difference exceeds the maximum tolerance time (step 803). When the maximum tolerance time is not exceeded, it is checked whether the online status of the issuing device is online (step 804), and if the online status of the publishing device is online, the end is ended. This check (end of step); if the online status of the publishing device is offline, the re-connection notification message of the publishing device is sent to the message proxy device (step 805), and the current check is ended (the step ends).

然而,當超過最大容忍時間時,檢查發佈端裝置的在線狀態是否為上線(步驟806),若發佈端裝置的在線狀態為上線,則將發布端裝置的在線狀態改為下線(步驟807),並刪除此發布端裝置的更新時間紀錄(步驟808),再結束本次檢查(步驟結束);若發佈端裝置的在線狀態為下線,則刪除此發布端裝置的更新時間紀錄(步驟808),並結束本次檢查(步驟結束)。 However, when the maximum tolerance time is exceeded, it is checked whether the online status of the publishing device is online (step 806), and if the online status of the publishing device is online, the online status of the publishing device is changed to offline (step 807). And deleting the update time record of the publishing device (step 808), and then ending the current check (the step ends); if the online state of the publishing device is offline, deleting the update time record of the publishing device (step 808), And end this check (end of step).

在此使用的詞彙僅供描述說明,而不限制本發明之範疇,說明書中所述的功能、步驟及元件不限於特定數量,此領域通常知識者能領解一個或多個的功能、步驟及元件若能達到相同或相似的效果,皆屬於本發明之範疇。 The vocabulary used herein is for illustrative purposes only, and is not intended to limit the scope of the invention. The functions, steps and components described in the specification are not limited to a specific number, and those skilled in the art can understand one or more functions, steps and components. It is within the scope of the invention to achieve the same or similar effects.

Claims (20)

一種訊息佇列通訊協定之連線監控系統,其包含:至少一發佈端裝置,係至少配置以:與一訊息代理裝置建立連線;及於一指定時間為區間持續向該訊息代理端裝置發送包含在線狀態相關之一在線通知訊息;該訊息代理端裝置,係至少配置以:接收至少一發佈端裝置的該在線通知訊息;及發送該在線通知訊息至至少一訂閱端裝置;以及至少一該訂閱端裝置,其包含一第一資料儲存裝置,至少一該訂閱端裝置係至少配置以:與該訊息代理裝置建立連線;基於該在線通知訊息紀錄並更新每一個該發佈端裝置的在線通知訊息,建立一第一在線狀態紀錄表以記錄每一個該發佈端裝置的一在線狀態及一更新時間紀錄,並儲存於該第一資料儲存裝置;及定期檢查每一個該發佈端裝置的該在線狀態及該更新時間紀錄,並向該訊息代理端裝置重新發送該在線狀態不為上線的該發佈端裝置之一重新連線通知。 A connection monitoring system for a message routing protocol, comprising: at least one publishing device configured to: establish a connection with a message proxy device; and continuously send the message to the message proxy device for a specified time interval Include an online notification message related to the online status; the message proxy device is configured to: receive the online notification message of the at least one publishing device; and send the online notification message to the at least one subscribing device; and at least one a subscriber device, comprising: a first data storage device, at least one of the subscriber devices configured to: establish a connection with the message proxy device; record and update each online notification of the publisher device based on the online notification message a message, a first online status record table is created to record an online status and an update time record of each of the publishing device, and stored in the first data storage device; and the online of each of the publishing devices is periodically checked. Status and the update time record, and resend the online status to the message proxy device The release notification to reconnect the line on one end of the device. 如申請專利範圍第1項所述之連線監控系統,其中該訂閱端裝置設置一最大容忍時間,當至該第一在線狀態紀錄表對應的該在線狀態之最新的該更新時間紀錄到定期檢查的檢查時間超過該最大容忍時間,刪除該第一在線狀態紀錄表中對應的該更新時間紀錄。 The connection monitoring system of claim 1, wherein the subscription device sets a maximum tolerance time, and when the latest online update status corresponding to the first online status record table is recorded, the update time is recorded to the periodic check. The checking time exceeds the maximum tolerance time, and the corresponding update time record in the first online status record table is deleted. 如申請專利範圍第2項所述之連線監控系統,其中當該第一在線狀態紀錄表中對應的該在線狀態為上線,則該第一在線狀態紀錄表中對應的該在線狀態改為下線,並刪除該第一在線狀態紀錄表中對應的該更新時間紀錄。 The connection monitoring system of claim 2, wherein when the corresponding online status in the first online status record table is online, the corresponding online status in the first online status record is changed to offline. And deleting the corresponding update time record in the first online status record table. 如申請專利範圍第1項所述之連線監控系統,其中該訂閱端裝置基於該第一在線狀態紀錄表進一步指派特定的一或多個該發佈端裝置執行一或多個動作。 The connection monitoring system of claim 1, wherein the subscribing device further assigns a specific one or more of the issuing devices to perform one or more actions based on the first online status record table. 如申請專利範圍第1項所述之連線監控系統,其中該發佈端裝置的該在線通知訊息可夾帶於一非在線狀態相關之通知訊息中。 The connection monitoring system of claim 1, wherein the online notification message of the publishing device is entrained in a non-online related notification message. 如申請專利範圍第5項所述之連線監控系統,其中該訂閱端裝置基於該第一在線狀態紀錄表進一步判斷該非在線狀態相關之訊息的有效性。 The connection monitoring system of claim 5, wherein the subscribing device further determines the validity of the non-online status related message based on the first online status record table. 如申請專利範圍第5項所述之連線監控系統,其中該訊息代理端裝置包含一第二資料儲存裝置,基於該在線通知訊息,建立並持續更新一至少一該發佈端裝置的一第二在線狀態紀錄表,並將該第二在線狀態紀錄表儲存於該第二資料儲存裝置。 The connection monitoring system of claim 5, wherein the message proxy device comprises a second data storage device, based on the online notification message, establishing and continuously updating a second of the at least one publishing device The online status record table is stored in the second data storage device. 如申請專利範圍第7項所述之連線監控系統,其中該訂閱端裝置基於該第二在線狀態紀錄表進一步指派特定的一或多個該發佈端裝置執行一或多個動作。 The connection monitoring system of claim 7, wherein the subscribing device further assigns a specific one or more of the issuing devices to perform one or more actions based on the second online status record table. 如申請專利範圍第8項所述之連線監控系統,其中該訂閱端裝置基於該第一在線狀態紀錄表及/或該第二在線狀態紀錄表進一步判斷由判斷該非在線狀態相關之訊息的有效性。 The connection monitoring system of claim 8, wherein the subscribing device further determines, according to the first online status record table and/or the second online status record table, that the information related to the non-online status is valid. Sex. 一種訊息佇列通訊協定之連線監控方法,其包含: 至少一發佈端裝置與一訊息代理端裝置連線;每一個該發佈端裝置於一指定時間為區間持續向該訊息代理端裝置發送包含在線狀態相關之一在線通知訊息;一訂閱端裝置與該訊息代理端裝置連線;一訂閱端裝置向該訊息代理端裝置訂閱至少一該發佈端裝置的包含該在線狀態相關之該在線通知訊息;該訊息代理端裝置發送該在線通知訊息至該訂閱端裝置;該訂閱端裝置基於該在線通知訊息紀錄並更新至少一該發佈端裝置的在線狀態於一第一在線狀態紀錄表,該第一在線狀態紀錄表至少記錄每一個該發佈端裝置的一在線狀態及一更新時間紀錄;該訂閱裝置端定期檢查該每一個該發佈端裝置的該在線狀態;及該訂閱端裝置向該訊息代理端裝置發送該在線狀態不為上線的該發佈端裝置之一重新連線通知訊息。 A method for monitoring the connection of a communication protocol, comprising: At least one publishing device is connected to a message proxy device; each of the publishing devices continuously sends an online notification message including an online state to the message proxy device for a specified time interval; a subscribing device and the The message proxy device is connected to the message proxy device, and subscribes to the at least one online notification message of the publishing device that is related to the online state; the message proxy device sends the online notification message to the subscription terminal The device: the subscription device records and updates at least one online status of the publishing device based on the online notification message to a first online status record table, where the first online status record table records at least one online of each of the publishing devices. a status and an update time record; the subscribing device periodically checks the online status of each of the publishing devices; and the subscribing device transmits to the message proxy device one of the publishing devices whose online status is not online Reconnect notification message. 如申請專利範圍第10項所述之連線監控方法,進一步包含:該訂閱端裝置設置一最大容忍時間,當至該第一在線狀態紀錄表對應的該在線狀態之最新的該更新時間紀錄到定期檢查的檢查時間超過該最大容忍時間,刪除該第一在線狀態紀錄表中對應的該更新時間紀錄。 The method for monitoring a connection according to claim 10, further comprising: setting, by the subscribing device, a maximum tolerance time, when the latest update time of the online state corresponding to the first online status record table is recorded The inspection time of the periodic inspection exceeds the maximum tolerance time, and the corresponding update time record in the first online status record table is deleted. 如申請專利範圍第11項所述之連線監控方法,進一步包含:當該第一在線狀態紀錄表中對應的該在線狀態為上線,則該第一在線狀態紀錄表中對應的該在線狀態改為下線,並刪除該第一在線狀態紀錄表中對應的該更新時間紀錄。 The connection monitoring method of claim 11, further comprising: when the online status corresponding to the first online status record table is online, the corresponding online status change in the first online status record table The offline line is deleted, and the corresponding update time record in the first online status record table is deleted. 如申請專利範圍第10項所述之連線監控方法,進一步包含:該訊息代理 端裝置同時提供至少一該訂閱端裝置服務。 The method for monitoring a connection as described in claim 10, further comprising: the message agent The end device simultaneously provides at least one of the subscribing device services. 如申請專利範圍第10項所述之連線監控方法,進一步包含:該訂閱端裝置基於該第一在線狀態紀錄表進一步指派特定的一或多個該發佈端裝置執行一或多個動作。 The method for monitoring a connection according to claim 10, further comprising: the subscribing device further assigning the one or more specific publishing device to perform one or more actions based on the first online status record table. 如申請專利範圍第10項所述之連線監控方法,進一步包含:該發佈端裝置的該在線通知訊息可夾帶於一非在線狀態相關之通知訊息中。 The method for monitoring the connection according to claim 10, further comprising: the online notification message of the publishing device may be entrapped in a notification message related to the offline state. 如申請專利範圍第15項所述之連線監控方法,進一步包含:該訂閱端裝置基於該第一在線狀態紀錄表進一步判斷該非在線狀態相關之訊息的有效性。 The method for monitoring a connection according to claim 15, further comprising: the subscribing device further determining the validity of the information related to the offline status based on the first online status record table. 如申請專利範圍第15項所述之連線監控方法,進一步包含:該訊息代理端裝置,基於該在線通知訊息,建立並持續更新一至少一該發佈端裝置的一第二在線狀態紀錄表。 The method for monitoring a connection according to claim 15 , further comprising: the message proxy device, based on the online notification message, establishing and continuously updating a second online status record table of the at least one publishing device. 如申請專利範圍第17項所述之連線監控方法,進一步包含:該訂閱端裝置基於該第二在線狀態紀錄表進一步指派特定的一或多個該發佈端裝置執行一或多個動作。 The method for monitoring a connection according to claim 17, further comprising: the subscribing device further assigning the one or more specific publishing device to perform one or more actions based on the second online status record table. 如申請專利範圍第18項所述之連線監控方法,進一步包含:該訂閱端裝置基於該第一在線狀態紀錄表及/或該第二在線狀態紀錄表進一步判斷由判斷該非在線狀態相關之通知訊息的有效性。 The method for monitoring a connection according to claim 18, further comprising: the subscribing device further determining, by the first online status record table and/or the second online status record table, the notification related to determining the non-online status The validity of the message. 一種訊息佇列通訊協定之連線監控方法,包含建立一在線狀態紀錄表紀錄,基於至少一發佈端裝置的一在線通知訊息,紀錄每一個該發佈端裝置的一在線狀態及一更新時間紀錄,定義一傳送週期及一最大容忍遺失次數,並定期檢查該在線狀態,其包含: 判斷最後更新的時間到檢查的時間是否超過指定的一最大容忍時間,其中該最大容忍時間為該最大容忍遺失次數加一並乘以該傳送時間,並執行以下步驟:當超過該指定的最大容忍時間且該發佈端裝置的該在線狀態為上線,則修改該在線狀態為下線且刪除該發佈端裝置的在線狀態資料,並結束本次定期檢查;當超過該指定的最大容忍時間且該發佈端裝置的該在線狀態不為上線,則刪除該發佈端裝置的在線狀態資料,並結束本次定期檢查;及當未超過該制定的最大容忍時間且該發佈端裝置的該在線狀態為上線時,則結束本次定期檢查;或當未超過該制定的最大容忍時間且該發佈端裝置的該在線狀態不為上線時,則向一訊息代理端裝置發送該發佈端裝置之一重新連線通知訊息,並結束本次定期檢查。 A method for monitoring a connection of a communication protocol includes establishing an online status record record, and recording an online status and an update time record of each of the distribution devices based on an online notification message of at least one of the distribution devices. Define a delivery period and a maximum tolerance loss count, and periodically check the online status, which includes: Determining whether the last updated time to the inspection time exceeds a specified maximum tolerance time, wherein the maximum tolerance time is the maximum tolerance loss number plus one multiplied by the transmission time, and performing the following steps: when the specified maximum tolerance is exceeded If the online status of the publishing device is online, modify the online status to be offline and delete the online status data of the publishing device, and end the periodic check; when the specified maximum tolerance time is exceeded and the issuing end If the online status of the device is not online, the online status data of the publishing device is deleted, and the current periodic check is ended; and when the established maximum tolerance time is not exceeded and the online status of the publishing device is online, Ending the periodic check; or when the specified maximum tolerance time is not exceeded and the online status of the publishing device is not online, sending a reconnection notification message to the message proxy device And end this regular inspection.
TW106100705A 2017-01-10 2017-01-10 Method and system for connection monitoring of message queue protocol TWI617208B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
TW106100705A TWI617208B (en) 2017-01-10 2017-01-10 Method and system for connection monitoring of message queue protocol

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
TW106100705A TWI617208B (en) 2017-01-10 2017-01-10 Method and system for connection monitoring of message queue protocol

Publications (2)

Publication Number Publication Date
TWI617208B true TWI617208B (en) 2018-03-01
TW201826832A TW201826832A (en) 2018-07-16

Family

ID=62189270

Family Applications (1)

Application Number Title Priority Date Filing Date
TW106100705A TWI617208B (en) 2017-01-10 2017-01-10 Method and system for connection monitoring of message queue protocol

Country Status (1)

Country Link
TW (1) TWI617208B (en)

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20060136256A1 (en) * 2004-12-18 2006-06-22 Roots Jamie G Publish/subscribe messaging system
US20080294732A1 (en) * 2006-11-11 2008-11-27 International Business Machines Corporation Determining the status of a device through use of a publisher/subscriber interface
TW201237759A (en) * 2010-11-24 2012-09-16 Ibm Transactional messaging support in connected messaging networks
US20140172973A1 (en) * 2012-12-18 2014-06-19 Richard Kenneth Zadorozny Mobile Push Notification
US20150094871A1 (en) * 2013-09-27 2015-04-02 International Business Machines Corporation Managing devices in micro-grids
TWM526243U (en) * 2015-08-27 2016-07-21 傑卓國際有限公司 Things build products using the history of architecture

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20060136256A1 (en) * 2004-12-18 2006-06-22 Roots Jamie G Publish/subscribe messaging system
US20080294732A1 (en) * 2006-11-11 2008-11-27 International Business Machines Corporation Determining the status of a device through use of a publisher/subscriber interface
TW201237759A (en) * 2010-11-24 2012-09-16 Ibm Transactional messaging support in connected messaging networks
US20140172973A1 (en) * 2012-12-18 2014-06-19 Richard Kenneth Zadorozny Mobile Push Notification
US20150094871A1 (en) * 2013-09-27 2015-04-02 International Business Machines Corporation Managing devices in micro-grids
TWM526243U (en) * 2015-08-27 2016-07-21 傑卓國際有限公司 Things build products using the history of architecture

Also Published As

Publication number Publication date
TW201826832A (en) 2018-07-16

Similar Documents

Publication Publication Date Title
CN107295080B (en) Data storage method and server applied to distributed server cluster
US8024423B2 (en) Maintaining connections between mobile devices and servers
TWI527415B (en) Smooth host mobile system and method
CN107204901B (en) A computer system for providing and receiving status notifications
CN105337961B (en) The method and server communicated with client
EP4295542B1 (en) Automatic issue identification and status notification of screensharing in a virtual meeting
CN110266810A (en) Message receiving method, device and storage medium based on MQTT protocol
US8355401B2 (en) Controlling access to a destination in a data processing network
KR20050077688A (en) System and method for reestablishing the session between terminal and server
US20150081817A1 (en) Method for delivering push notification and push notification server for performing the same
US20090177743A1 (en) Device, Method and Computer Program Product for Cluster Based Conferencing
EP3818664B1 (en) User-centric connections to a location comprising digital collaboration tools
CN114385374B (en) Message processing method, device and storage medium based on message middleware
CN107645517B (en) Data pushing method and device
KR102105561B1 (en) Method for transmitting push notification and push notification server performing the same
CN108614750A (en) The restoration methods and device of delay machine data
US7779115B2 (en) Method and apparatus for processing client capability information over a network
CN110391991B (en) A method and related device for flow control
CN115086397A (en) TCP connection management method and system
TWI617208B (en) Method and system for connection monitoring of message queue protocol
CN108289081A (en) Method and system for connection monitoring of message queue communication protocol
CN110557331A (en) User offline control method, controller, forwarding equipment and user access system
CN110417850B (en) Software configuration acquisition method, system, server and medium
CN114079828A (en) Method and device for processing streaming media data
CN113411228A (en) Network condition determining method and server