user422646
user422646

Reputation: 1

configure the broker

I am using ActiveMQ as message Broker with something like 140 Topics. I am facing a problem that the broker keeps old messages, instead of discarding them in order to send new messages (so clients gets old data instead of current data). How do I configure the broker not to keep old messages? the important data is allways the last data, so if a consumer didn't get data, he will get next time the most updated. I have configured on producer TTL as 250, but it doesn't seem to work... One other thing, How can I disable the creation of advisory topics?

Any help will be appreciated...

Upvotes: 0

Views: 1536

Answers (2)

anubhava
anubhava

Reputation: 784898

Advisory messages are required for dynamic network broker topologies as NetworkConnectors subscribe to advisory messages. In the absence of advisories, a network must be statically configured.

Beware that using advisorySupport="false" will NOT work with dynamic network brokers as per this reference page: http://activemq.apache.org/advisory-message.html

Upvotes: 1

rvxnet
rvxnet

Reputation: 457

Are you using a durable consumer to receive these messages from the topics concerned? If so, the broker will be holding on to all messages sent when you were disconnected. Switch to a regular consumer in order to only see "current" messages on the topic.

To prevent the creation of advisory topics and their associated messages add the advisorySupport="false" property to the <broker /> element of the ActiveMQ config file.

Upvotes: 0

Related Questions