Search code examples
javaqueuejmsactivemq-classicjms-topic

Prevent Temp Queue auto Topic creation in ActiveMQ


I have a Rest service that create temp queues on activeMQ for receive response.

Every request create a temp queue. When I go to Topics list, I view the next:

Topics

For each temp queue, is created automatically a topic. The principal problem with it, is that topics have a limit for 1,000 topics.

Then, when limit is exceeded, no more messages is accepted from application in ActiveMQ.

Is posible avoid create automatically Topics for each temp queue ? I have try with tcp://localhost:61616?jms.watchTopicAdvisories=false Also with connectionFactory.setWatchTopicAdvisories(false); and not working.

Thanks


Solution

  • The cause was not close connections:

    Connection connection = connectionFactory.createConnection();

    I´ve added:

    connection.close();

    And not more topics are stored.