Smart Routing
Last updated
Last updated
KubeMQ smart routing is In-flight and routing tables messaging feature which allows to multicast a messages to many destinations in single operation.
RPC and Queues senders can multicast a message to many channels at once, even to a different messaging pattern. Separate each destination with a ;
and specify the message pattern type with :
.
A predefined routes rule can be set with KubeMQ Smart Routing configuration and can be used like that:
Mixing message pattern destination is allowed. for example, an events sender can send a message to events_store subscriber and to a queues subscriber at the same time.
A routing rule is defined by a record with two fields:
Routes cannot point to another Route Key
Two routing rules:
The Smart Route preload configuration feature is available only on KubeMQ Enterprise Edition.
Register for free 30 days license here.
Pattern
Format
Example
Events
events:
events: events.foo.bar;events: events.foo.bar.1
Events Store
events_store:
events_store: store.foo.bar;events_store: store.foo.bar.1
Queues
queues:
queues: q1.foo.bar; queues: q2.foo.bar
Pattern
Format
Will routes
Routes
routes: all-foo-bar
to all destinations defined by all-foo-bar route
Sends From
Channel Destinations
Will routes to
Events
foo.bar;foo.bar.1;events_store: store.foo;queues: q1
events->foo.bar, events->foo.bar.1, events_store->store.foo, queues->q1
Events Store
foo.bar.store;events: bar.1;queues:q2; routes:my-route
events_store->foo.bar.store, events-> bar.1, queues -> q2, all destinations defined by my-route
Queues
q1.foo.bar;events: bar.1;events_store:store.foo.1
queues-> q1.foo.bar, events-> bar.1, events_store-> store.foo.1
Field
Type
Description
Key
string
unique key name for the routing rule
Routes
string
channel destinations separated by ;