sendTopic
Sends a message to all queues that match the routing key pattern.
Uses AMQP-style topic routing with wildcards:
The routing_key is matched against all patterns in the topic_bindings table
Messages are sent to ALL matching queues
The operation is atomic: either all matching queues receive the message or none do
Return
A Result containing the number of queues that received the message.
Parameters
The routing key for the message (e.g., "logs.error", "app.user.created"). Must not contain wildcards (* or #).
The content of the message to be sent.
Optional metadata to include with the message. Defaults to an empty map.
The duration to delay the message delivery. Defaults to 0 seconds.
suspend fun sendTopic(routingKey: String, message: String, headers: Map<String, String> = emptyMap(), delay: Duration = 0.seconds): Result<Long>(source)
Sends a message to all queues that match the routing key pattern.
This is the context version that can be used within a transaction or query executor.
Return
A Result containing the number of queues that received the message.
Parameters
The routing key for the message.
The content of the message to be sent.
Optional metadata to include with the message.
The duration to delay the message delivery.