Message publishing and subscribing method and apparatus
First Claim
Patent Images
1. A message publishing method, implemented by a message broker, on a computing device, that comprises at least one actual topic, comprising:
- separately allocating, by the message broker, a dummy topic for each publisher and subscriber, wherein the dummy topic has functions of searching for a next-hop actual topic, wherein each actual topic has a logical connection with at least one dummy topic or at least one actual topic;
receiving, by using the dummy topic corresponding to a first publisher, a message from the first publisher;
searching for, according to a routing rule between the dummy topic corresponding to the first publisher and the at least one actual topic, the next-hop actual topic of the dummy topic corresponding to the first publisher;
determining, according to a routing rule of the next-hop actual topic, a next-hop topic of the next-hop actual topic;
transmitting the message to a subscriber corresponding to the dummy topic when the next-hop topic is the dummy topic; and
repeating the determining step when the next-hop topic is an actual topic.
1 Assignment
0 Petitions
Accused Products
Abstract
A message publishing and subscribing method and apparatus, which relate to the information processing field and provide higher information transmission efficiency and better flexibility mainly by providing a corresponding dummy topic in a message broker for a publisher and a subscriber or by performing semantic recognition in the message broker for the publisher and the subscriber.
52 Citations
10 Claims
-
1. A message publishing method, implemented by a message broker, on a computing device, that comprises at least one actual topic, comprising:
-
separately allocating, by the message broker, a dummy topic for each publisher and subscriber, wherein the dummy topic has functions of searching for a next-hop actual topic, wherein each actual topic has a logical connection with at least one dummy topic or at least one actual topic; receiving, by using the dummy topic corresponding to a first publisher, a message from the first publisher; searching for, according to a routing rule between the dummy topic corresponding to the first publisher and the at least one actual topic, the next-hop actual topic of the dummy topic corresponding to the first publisher; determining, according to a routing rule of the next-hop actual topic, a next-hop topic of the next-hop actual topic; transmitting the message to a subscriber corresponding to the dummy topic when the next-hop topic is the dummy topic; and repeating the determining step when the next-hop topic is an actual topic. - View Dependent Claims (2, 3, 4, 5)
-
-
6. A computing device, comprising:
-
at least one actual topic; a memory configured to store computer program instructions; and a processor configured to execute the computer program instructions stored in the memory to perform the steps of; allocating a dummy topic for each publisher and subscriber, wherein the dummy topic has functions of searching for a next-hop actual topic and message forwarding, wherein each actual topic has a logical connection with at least one dummy topic or at least one actual topic; receiving, by using the dummy topic corresponding to a first publisher, a message from the first publisher; searching for, according to a routing rule between the dummy topic corresponding to the first publisher and the at least one actual topic, a next-hop actual topic of the dummy topic corresponding to the first publisher; determining, according to a routing rule of the next-hop actual topic, a next-hop topic of the next-hop actual topic; transmitting the message to a subscriber corresponding to the dummy topic when the next-hop topic is the dummy topic; and repeating the determining step when the next-hop topic is an actual topic. - View Dependent Claims (7, 8, 9, 10)
-
Specification