🎄 Happy Holidays! 🥳
Most of Solace is closed December 24–January 1 so our employees can spend time with their families. We will re-open Thursday, January 2, 2024. Please expect slower response times during this period and open a support ticket for anything needing immediate assistance.
Happy Holidays!
Please note: most of Solace is closed December 25–January 2, and will re-open Tuesday, January 3, 2023.
Topic names in Queues
Publisher publishing to topic, which is mapped to a persistent queue for consumer.
e.g publisher1/A/B/C ==> publisher1_queue
(topic subscription publisher1/>)
Is there a way to identify the topic name (pulisher1/A/B/C
) by consumer who is subscribing to publisher1_queue
?
Comments
-
For sure. Just because the message ended up in the queue for the consumer, the message's Destination doesn't change. So, if you're using the Solace Java (JCSMP) API, then when you receive the message you simply do
msg.getDestination().getName();
. https://docs.solace.com/API-Developer-Online-Ref-Documentation/java/com/solacesystems/jcsmp/XMLMessage.html#getDestination()BTW, I really wouldn't suggest naming your queue after the publisher. Queues really "belong" to the consumer, acting as the persistent storage for while they're slow or offline.
3 -
Hey, I talked about this question on my "office hours" stream last week. Check it out: https://youtube.com/watch?v=d6vHFle74g0&t=2205s
0