failover - ActiveMQ: Reject connections from producers when persistent store fills -
i configure activemq producers failover (i'm using stomp protocol) when broker reaches configured limit. want allow consumers continue consumption overloaded broker, unabated.
reading activemq docs, looks can configure activemq 1 of few things when broker reaches limits (memory or disk):
- slow down messages using
producerflowcontrol="true"
(by blocking send) - throw exceptions when using
sendfailifnospace="true"
- neither of above, in case..i'm not sure happens? reverts tcp flow control?
it doesn't of these things designed trigger producer failover. producer failover when fails connect not, far can tell, when fails send (due producer flow control, example).
so, possible me configure broker refuse connections when reaches limits? or best bet detect slow down on producer side, , manually reconfigure producers use different broker @ time?
thanks!
your best bet use sendfailifnospace
, or better sendfailifnospaceaftertimeout
. throw exception client, can attempt resend message broker @ application level (though can encapsulate logic on top of stomp library, , use facade code). though if activemq setup correctly wired, load both in terms of production , consumption should more or less evenly distributed across brokers, feature may not buy great deal.
you better result if concentrated on fast consumption of messages, , increased storage limits smooth out peaks in load.
Comments
Post a Comment