zer0Id0l
zer0Id0l

Reputation: 1444

For JMS, how to access topic name in Java code?

I am using ActiveMQ which uses JMS. I have a requirement where I need to find the topic name from Java program. Is there any JMS api for that?

EDIT: There is an api in JMS to find topic but will it work for ActiveMQ topics?

Upvotes: 0

Views: 247

Answers (1)

Mayoares
Mayoares

Reputation: 1284

There are many ways to do that (choosing one depends on your use case).

A possibility for ActiveMQ is

org.apache.activemq.broker.jmx.BrokerViewMBean.getTopics()

Upvotes: 1

Related Questions