Skip to content

Commit 3ec8799

Browse files
author
Maxim Fedorov
committed
Disable native connection autorecovery
Native autorecovery brakes recovery capabitilies of akka-rabbitmq. This is a quickfix to prevent accidental issues. re #39
1 parent 57ce40b commit 3ec8799

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

src/main/scala/com/thenewmotion/akka/rabbitmq/ConnectionActor.scala

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,14 @@ class ConnectionActor(
128128
children.foreach(_ ! ParentShutdownSignal)
129129
}
130130

131+
/**
132+
* As connection recovery at this level does not play well
133+
* with [[http://www.rabbitmq.com/api-guide.html#recovery native recovery]]
134+
* factory settings are changed to disable it even if it was enabled
135+
* to ensure correctness of operations.
136+
*/
131137
def setup = {
138+
factory.setAutomaticRecoveryEnabled(false)
132139
val connection = factory.newConnection()
133140
log.debug("setting up new connection {}", connection)
134141
connection.addShutdownListener(this)

0 commit comments

Comments
 (0)