Rule-Based Message Routing for Independent Microservices
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Defining communication protocols between independently developed microservices in a service-oriented architecture is burdensome for software developers, as these protocols require understanding both upstream and downstream services and can be updated independently.
Innovation Solution
A computer-implemented method for dynamically routing messages based on a plurality of rules, involving message conversion, queue assembly, and rule application to facilitate communication between microservices.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Adaptability or versatility
If communication protocols are defined between microservices, then microservices can cooperate to achieve complex functionalities, but the burden on software developers increases significantly
Solution Approach 1:
The patent introduces a message broker as an intermediary component that sits between microservices. Instead of microservices directly communicating with each other requiring complex protocol definitions, they publish and subscribe to messages through the broker using simple topic-based routing. This mediator handles the complexity of message routing, filtering, and delivery, while microservices only need to define simple publish/subscribe logic.
Solution Approach 2:
The message broker provides universal communication capabilities that work across all microservice interactions. A single broker handles diverse communication patterns (one-to-one, one-to-many, many-to-one, many-to-many) through unified topic-based routing mechanisms, eliminating the need for different protocol implementations for different communication scenarios.
2Adaptability or versatility
If microservices are developed and updated independently, then system modularity and flexibility improve, but coordinating communication between them becomes more difficult
Solution Approach 1:
The patent extracts the communication coordination logic from the microservices themselves and places it in the external message broker. Microservices no longer need to contain or manage communication protocols, routing logic, or service registry information. They simply publish messages to topics and subscribe to relevant topics, while the broker handles all coordination aspects including routing, filtering, and delivery management.
Solution Approach 2:
The system provides dynamic adaptability where microservices can be added, removed, or updated independently without affecting others. The message broker dynamically adjusts routing based on current service availability and subscription relationships. Services can change their subscription patterns or publishing behavior at runtime without requiring coordination with other services.
Data Source
AI summary
Aspects described herein may allow messages to be routed between different programs or microservices based on a plurality of rules. For example, a computing device may receive, from a data stream, a plurality of messages, wherein each message, of the plurality of messages, may be converted from information associated with a microservice. The computing device may obtain, from the data stream, a first message. The computing device may also obtain a plurality of rules. The computing device may determine, based on at least one rule of the plurality rules, a mapping between a characteristic and an identifier of a target, and may convert, based on the at least one rule and determining that the first message has the characteristic, a copy of the first message to a format suitable to be sent to the target. In this way, communication between independently developed programs may be facilitated.


