Hopefully all good now
MODIFY
lib/beetle/configuration.rb
lib/beetle/configuration.rb
@@ -35,10 +35,13 @@ module Beetle
# handler timeout.
attr_accessor :redis_failover_timeout
- # how long we want status keys to survive after we have seen the second message of
- # a redundant message pair. Setting this to a high value (hours) will reduce the
- # likelihood of executing handler logic, but can cause a higher redis database
- # size with all associated problems. Defaults to 5 minutes.
+ # how long we want status keys to survive after we have seen the second message of a
+ # redundant message pair. Defaults to 5 minutes. Setting this to a high value (hours)
+ # will reduce the likelihood of executing handler logic more than once, but can cause
+ # a higher redis database size with all associated problems. A handler can be
+ # executed more than once if the ack to the RabbitMQ server gets lost between the consumer
+ # and the RabbitMQ instance. This happens extremely seldom in our environment, but we cannot
+ # rule it out and we also don't quite understand (yet) why it happens.
attr_accessor :redis_status_key_expiry_interval
# how often heartbeat messages are exchanged between failover

MODIFY
test/beetle/message_test.rb
test/beetle/message_test.rb
@@ -128,7 +128,7 @@ module Beetle
end
end
- test "successful processing of a non redundant message should delete all keys from the database (except the staus key, which should be set to expire)" do
+ test "successful processing of a non redundant message should delete all keys from the database (except the status key, which should be set to expire)" do
header = header_with_params({})
header.expects(:ack)
message = Message.new("somequeue", header, 'foo', :store => @store)
@@ -147,7 +147,7 @@ module Beetle
end
end
- test "successful processing of a redundant message twice should delete all keys from the database (except the staus key, which should be set to expire)" do
+ test "successful processing of a redundant message twice should delete all keys from the database (except the status key, which should be set to expire)" do
header = header_with_params({:redundant => true})
header.expects(:ack).twice
message = Message.new("somequeue", header, 'foo', :store => @store)

Hopefully all good now