Skip to content

Topics

A topic is a logical address used for message routing.

Producers publish messages with topics. Consumers do not consume from topics directly. FlowMQ routes messages by matching topics against filters on destinations such as streams, queues, and subscriptions.

Topic Names

Topics are hierarchical strings separated by /.

Examples:

text
sensors/factory-1/temperature
orders/us/created
devices/vehicle-42/status

Topic names are exact publish-time addresses. Producers should publish to concrete topic names, not wildcard filters.

Topic Filters

A topic filter matches one or more topics.

Topic filters support wildcards:

WildcardMeaningExample
+Matches one levelsensors/+/temperature
#Matches zero or more levels at the endsensors/#

Examples:

text
Filter: sensors/+/temperature
Matches: sensors/room-1/temperature
Does not match: sensors/room-1/humidity
text
Filter: sensors/#
Matches: sensors/room-1/temperature
Matches: sensors/room-1/humidity