Topic to Queue Mapping
2 Minute Read
This tutorial builds on the basic concepts introduced in the Persistence with Queues tutorial and will show you how to make use of one of Solace’s advanced queueing features called
In addition to persistent messages published directly to a durable queue, it is possible to add one or more topic subscriptions to the queue so that messages published to those topics are also delivered to and persisted by the queue. This is a powerful feature that enables queues to participate equally in point-to-point and publish/subscribe messaging models. More details about the "Topic to Queue Mapping" feature can be found here.
The following diagram illustrates this feature.
If you have a durable queue named “Q”, it will receive messages published directly to the queue destination named “Q”. However, it is also possible to add subscriptions to this queue in the form of topics. This example adds topics “A” and “B”. Once these subscriptions are added, the queue will start receiving messages published to topic destinations “A” and “B”. When you combine this with wildcard support provided by Solace topics, this opens up a number of interesting use cases.
Once having Topic to Queue Mapping configured, the
QueueConsumer sample from the Persistence with Queues tutorial can be used to consume messages.