Reputation: 2554
Does Solace have some API call (possibly administrative) by which it can be determined that a topic or queue has at least one "alive" subscriber? For example, a call to return the count of active subscriptions on the topic?
The use case is determining, in a request/reply scenario, whether there is a server "listening" to the relevant endpoint. (Clearly, it would be pointless for a client to send a request if there is no server to respond. Instead, some form of remedial action would be called for.)
Upvotes: 2
Views: 208
Reputation: 1
You can try to execute the SEMP/CLI command:
show smrp subscriptions topic <topicName>
and find out if you have existing clients for it.
Upvotes: 0
Reputation: 106
Solace does not have an API call that can be used to determine if whether a topic has any subscribers. Similarly, there isn't also any API calls that can be used to determine if a queue has any active consumers.
Instead, what can be done is to enable the "Reject Msg To Sender On No Subscription Match" property on the Client Profile.
When that property is enabled, any Guaranteed Messages that are published to a topic with no subscribers on the Message VPN will be rejected with a "No Subscription Match" error.
However, do note that if the topic subscription of any queue on the Message VPN matches the topic that the Guaranteed Messages are being published to, then the messages will not be rejected with the "No Subscription Match" error. Instead, these messages will be spooled to the queue.
Upvotes: 2