IP Library › Granted Patent US 12,457,270
Granted Patent B1
US 12,457,270 · App. 18/989,505 · Granted Oct 28, 2025

Method of managing messages

Inventors: Silvio Giebl (Landshut, DE); Henning Lohse (Landshut, DE); Lukas Brandl (Landshut, DE)
Assignee: HiveMQ GmbH
H04L67/55
View Patent ↗
Loading inventors, assignments & file history…
Monitor This Case
Get email alerts when status or documents change.
Order Certified Copies
Most orders are placed with the USPTO same day — all within 24 business hours.
Order via The Patent Place →
Pre-filled with this patent's details
Quick Facts
Patent No.
US 12,457,270
App. No.
18/989,505
Granted
Oct 28, 2025
Kind
B1
Abstract

There is provided a method for managing messages in a broker cluster. The broker cluster comprises a plurality of nodes each of which maintains a separate counter. The master node of the plurality of nodes in the broker cluster receives a request containing a payload for a message to be stored at the master node. The master node generates a key for the message, wherein the key comprises at least: a client identifier of a client to receive the message, and a sequence number from the counter of the master node. The master node stores a message formed based on the key and the payload as a key-value pair at the master node.

Claims (59)

1. A method of managing messages in a broker cluster, wherein the broker cluster comprises a plurality of nodes each of which maintains a separate counter, the method comprising:

a master node in the broker cluster receiving a request containing a payload for a message to be stored at the master node;

generating, by the master node, a key for the message, wherein the key comprises at least:

a client identifier of a client to receive the message, and

a sequence number from the counter of the master node, and

storing a message formed based on the key and the payload as a key-value pair in a storage at the master node;

sending, by the master node, the message to at least one follower node of the plurality of nodes in the broker cluster for storage;

the at least one follower node, upon receiving the message, comparing the sequence number used to generate the key of the message with a sequence number of a counter of the follower node and storing the message in a storage at the follower node;

wherein in a case that the sequence number used to generate the key of the message is greater than or equal to the sequence number of the counter of the follower node, the follower node advances the sequence number of the counter of the follower node to a value greater than the sequence number used to generate the key.

2. A method according to claim 1 , wherein the key further comprises an identifier of the master node that generates the key.

3. A method according to claim 1 , wherein each counter is configured to increase strictly monotonically.

4. A method according to claim 1 , wherein the request containing a payload for a message is received from a publisher client and an identity of the master node among the plurality of nodes is determined based on a hash of an identifier of the publisher client.

5. A method according to claim 1 , wherein, in a case that the master node becomes unavailable, the follower node becomes the master node.

6. A method according to claim 5 , wherein after the following node becomes the master node, the method comprises:

receiving, at the master node of the plurality of nodes, a second request containing a second payload for a second message to be stored at the master node;

generating, by the master node, a key for the second message, wherein the key comprises at least:

an identifier of a client to receive the second message, and

a sequence number from the counter of the master node, and

storing a message formed based on the key and the payload as a key-value pair at the master node.

7. A method according to claim 1 , wherein the client that receives the message is a subscriber client that has sent a request to subscribe to a topic to the broker cluster, wherein the method further comprises the master node identifying the client to receive the message based on a topic of the received request containing a payload for a message.

8. A method according to claim 1 , further comprising sending the message to the client that has the client identifier.

9. A method according to claim 8 , wherein after sending the message to the client that has the client identifier, the master node deletes the message from the storage at the master node.

10. A method according to claim 1 , wherein storing a message formed based on the key and the payload as a key-value pair comprises storing the message in a storage, wherein the messages in the storage are sorted by a byte order of the keys.

11. A system comprising an information processing apparatus configured to perform the role of a master node in a broker cluster that comprises a plurality of nodes and an information processing apparatus configured to perform the role of a follower node in the broker cluster, wherein the master node comprises:

at least one processor;

and at least one memory including computer program code;

the at least one memory and the computer program code being configured to, with the at least one processor, cause the master node to at least maintain a counter and

perform a method comprising:

receiving a request containing a payload for a message to be stored at the master node;

generating a key for the message, wherein the key comprises at least: a client identifier of a client to receive the message, and a sequence number from the counter of the master node,

storing the message formed based on the key and the payload as a key-value pair at the master node, and

sending the message to the follower node of the plurality of nodes in the broker cluster for storage;

wherein the follower node comprises:

at least one processor;

and at least one memory including computer program code;

the at least one memory and the computer program code of the follower node being configured to, with the at least one processor, cause the follower node to at least perform a method comprising:

upon receiving the message, comparing the sequence number used to generate the key of the message with a sequence number of a counter of the follower node,

storing the message in a storage at the follower node, and

in a case that the sequence number used to generate the key of the message is greater than or equal to the sequence number of the counter of the follower node, advancing the sequence number of the counter of the follower node to a value greater than the sequence number used to generate the key.

12. A non-transitory computer-readable storage medium storing a plurality of programs, wherein, when executed by a master node and a follower node in a broker cluster comprising a plurality of nodes each of which maintains a separate counter, the plurality of programs causes the master node to perform a method of managing messages, the method comprising:

receiving a request containing a payload for a message to be stored at the master node;

generating a key for the message, wherein the key comprises at least:

a client identifier of a client to receive the message, and

a sequence number from the counter of the master node, and

storing a message formed based on the key and the payload as a key-value pair in a storage at the master node, and

sending the message to at least one follower node of the plurality of nodes in the broker cluster for storage;

wherein the plurality of programs causes the follower node to perform a method comprising:

upon receiving the message, comparing the sequence number used to generate the key of the message with a sequence number of a counter of the follower node,

storing the message in a storage at the follower node, and

in a case that the sequence number used to generate the key of the message is greater than or equal to the sequence number of the counter of the follower node, advancing the sequence number of the counter of the follower node to a value greater than the sequence number used to generate the key.

13. A method of managing messages in a broker cluster, wherein the broker cluster comprises a plurality of nodes each of which maintains a separate counter, the method comprising:

a master node in the broker cluster receiving a request containing a payload for a message to be stored at the master node, wherein the request containing the payload for the message is received from a publisher client and an identity of the master node among the plurality of nodes is determined based on a hash of an identifier of the publisher client;

generating, by the master node, a key for the message, wherein the key comprises at least:

a client identifier of a client to receive the message, and

a sequence number from the counter of the master node, and

storing a message formed based on the key and the payload as a key-value pair in a storage at the master node.

14. A method according to claim 13 , wherein the method further comprises sending the message to at least one follower node of the plurality of nodes in the broker cluster for storage.

15. A method according to claim 14 , wherein the follower node, upon receiving the message, compares the sequence number used to generate the key of the message with a sequence number of a counter of the follower node and stores the message in a storage at the follower node.

16. A method according to claim 15 , wherein in a case that the sequence number used to generate the key of the message is greater than or equal to the sequence number of the counter of the follower node, the follower node advances the sequence number of the counter of the follower node to a value greater than the sequence number used to generate the key.

Assignments (2)
SECURITY INTEREST Recorded Jun 30, 2026
From: HIVEMQ INC.; HIVEMQ GMBH
To: HORIZON TECHNOLOGY FINANCE CORPORATION
Reel/Frame 075136/0713 →
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Feb 5, 2025
From: LOHSE, HENNING; BRANDL, LUKAS; GIEBL, SILVIO
To: HIVEMQ GMBH
Reel/Frame 070118/0157 →
Priority Claims (1)
GB 2405917 · Apr 26, 2024 · national
References Cited (14)
US 20060145831A1 · Bornhoevd · 2006 [cited by examiner]
US 20180295062A1 · Bellesa et al. · 2018 [cited by applicant]
US 20190014188A1 · Schreter · 2019 [cited by applicant]
US 20210112013A1 · Fugitt · 2021 [cited by examiner]
US 20250036442A1 · Gautam · 2025 [cited by examiner]
CN 113014634B · 2023 [cited by examiner]
CN 117221316A · 2023 [cited by examiner]
WO 2012156851A1 · 2012 [cited by applicant]
WO 2022031162A1 · 2022 [cited by applicant]
Giebl, Silvio_Master Thesis_Messaging Guarentees at Multi-Datacenter Cluster Bridging of Publisher-Subscriber-Systemen, Sep. 8, 2020. [cited by applicant]
MQTT specification, Mar. 7, 2019. [cited by applicant]
GB Combined Search and Examination Report dated Sep. 25, 2024 for GB Application No. GB2405917.2. [cited by applicant]
Andes: A Highly Scalable Persistent Messaging System - Web Services (ICWS), 2012 IEEE 19th International Conference on, IEEE, Jun. 24, 2012, pp. 504-511, XP32217727. [cited by applicant]
European Extended Search Report dated Sep. 4, 2025 for European Patent Application No. 25163394.7. [cited by applicant]