Coordinated Publish-Subscribe Messaging with Acknowledgment Broker
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
In asynchronous publish-subscribe messaging systems, there is a challenge in ensuring that actions related to a message are completed before proceeding with subsequent messages, as the publisher lacks knowledge of when all subscribers have finished their work, leading to potential sequence issues.
Innovation Solution
A coordinated publish-subscribe pattern, where the broker receives acknowledgments from subscribers confirming the completion of their actions and only then notifies the publisher to proceed with subsequent messages, ensuring all work related to a message is completed before publishing the next one.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Adaptability or versatility
If asynchronous messaging is used to improve scalability and decoupling, then system scalability and independence are improved, but the ability to guarantee sequential execution of actions is lost
Solution Approach 1:
The patent implements feedback mechanisms where subscribers send acknowledgments back to the broker confirming message processing completion. The broker tracks these acknowledgments and provides feedback to the publisher about the completion status of message handling across all subscribers, enabling sequential execution guarantees while maintaining asynchronous architecture.
Solution Approach 2:
The broker acts as an intermediary between publishers and subscribers, managing the coordination of message delivery and processing. It collects acknowledgments from all subscribers and controls when the publisher can proceed with the next message, thus guaranteeing sequential execution without requiring direct publisher-subscriber communication.
2Reliability
If the publisher waits for all subscribers to complete their work before publishing the next message, then sequential execution is guaranteed, but system productivity decreases
Solution Approach 1:
The patent allows the publisher to continue publishing messages to the broker while individual subscribers process messages at their own pace. The broker manages partial completion states, allowing the publishing process to proceed without waiting for all subscribers to finish, thus maintaining productivity while ensuring eventual sequential execution.
Solution Approach 2:
The broker preliminarily receives and queues messages from the publisher before they are fully processed by all subscribers. This allows the publisher to prepare and send the next message in advance, while the broker manages the coordination and acknowledgment collection in the background.
3Reliability
If acknowledgments are collected from all subscribers before proceeding, then action completion is guaranteed, but communication overhead increases
Solution Approach 1:
Each subscriber autonomously sends an acknowledgment to the broker when it completes processing a message. This self-service approach eliminates the need for the broker or publisher to actively query each subscriber's status, reducing communication overhead while ensuring reliable tracking of completion states.
Solution Approach 2:
The broker performs multiple functions: it routes messages to subscribers, collects acknowledgments from all subscribers, tracks processing status, and manages the coordination between publishers and subscribers. This multi-functionality consolidates communication overhead into a single intermediary rather than requiring multiple separate mechanisms.
Data Source
AI summary
Methods, systems, and computer readable media for coordinating publish-subscribe messaging. The method includes receiving, from a publisher, a first message pertaining to a first topic and sending the first message to at least a subscriber subscribed to the first message. The method further includes receiving, from each of the at least a subscriber subscribed to the first message, an acknowledgment that an action related to the first message is complete. The method further includes notifying the publisher that all acknowledgments related to the first message are received when the broker receives the acknowledgment from each of the at least a subscriber subscribed to the first message. The method further includes receiving, from the publisher, a second message based on the notification that all acknowledgments for the first message are received.


