Skip to content

Commit

Permalink
don't fail silently when unable to bind a consumer
Browse files Browse the repository at this point in the history
  • Loading branch information
Tim Harper committed Dec 14, 2015
1 parent 8120354 commit 9984d72
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ class Subscription private(config: BoundChannel) extends Directives {
protected [op_rabbit] lazy val queue = config.boundConsumer.queue
protected [op_rabbit] lazy val consumer = config.boundConsumer

def run(rabbitControl: ActorRef, timeout: FiniteDuration = 5 seconds): SubscriptionRef = {
def run(rabbitControl: ActorRef, timeout: FiniteDuration = 5.seconds): SubscriptionRef = {
implicit val akkaTimeout = Timeout(timeout)
SubscriptionRefProxy((rabbitControl ? this).mapTo[SubscriptionRef])
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,7 @@ private [op_rabbit] class SubscriptionActor(subscription: Subscription, connecti
* possible for the initialization to succeed at one point, but
* fail later. */
closed.tryFailure(ex)
log.error(ex, s"An error while trying to bind a consumer to ${subscription.consumer.queue.queueName}")

ex match {
case shutdownEx: ShutdownSignalException =>
Expand Down

0 comments on commit 9984d72

Please sign in to comment.