Question

I have the following situation that is affecting our ActiveMQ 5.8 broker.

Several Perl scripts on a Windows workstation connected to ActiveMQ using STOMP and subscribed (nondurable) to various topics. The power failed on the Workstation.

Using the Web console, I can see that ActiveMQ still thinks these subscribers are connected, based on the number of consumers shown and on the high temp message store being used. I had set for no producer flow control and set memory limits, so what I believe I am seeing is that ActiveMQ is spooling all messages to disk because it thinks the long dead subscribers are still connected and might eventually read them. It's been 30 days, and ActiveMQ still doesn't realize that these subscribers are no longer connected.

It there a way to configure ActiveMQ so that "undead" subscriber connections like these are eventually cleared automatically?

Was it helpful?

Solution

While the previous answer is basically correct, ActiveMQ does provide solutions for STOMP transports on the Broker to heart-beat connections, even if the client connects with STOMP v1.0. I blogged about this some time ago when ActiveMQ v5.6 was released, see the section on STOMP 1.0 default heartbeat configuration. Another option is to set tcp keepAlive on for the transport and tune your OS to use a shorter default check interval, the default is usually around two hours.

OTHER TIPS

Though Stomp 1.1+ supports Heartbeating, Active MQ currently doesnt support inactive consumer detection for Stomp. (usually achieved with wireFormat.maxInactivityDuration).

Be Careful:
These values are currently not supported but are planned for a later release

ActiveMQ supports it for Openwire though. i,e after the configured duration the consumer would be considered DEAD !

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top