jxstanford/akka — comment on commit 806ae7712c0f2bb97b877f0c3c1f5f09f85d7ffb
File: akka-amqp/src/main/scala/akka/amqp/ProducerActor.scala line 25
By viktorklang:

I'd rather go with:

channel orElse errorCallbackActor match {
case Some(actor: ActorRef) => actor ! message
case Some(c: Channel) => c.basicPublish(exchangeName.getOrElse(""), routingKey, mandatory, immediate, properties.orNull, payload.toArray)
case _ => log.warning("Unable to send message [{}]", message)
}