paykoob paykoob - 2 months ago 24
Scala Question

op-rabbit connection disconnect

I wrote a simple rabbit-mq amqp client with op-rabbit client:

val rabbitControl = system.actorOf(Props[RabbitControl])
rabbitControl !
Message.topic(
message,
routingKey = topicName,
properties = Seq(properties.DeliveryModePersistence(persistent = false))
)


this works well, but after increasing number of messages I got this warns very very fast:

05:59:59.636 [push-server-akka.actor.default-dispatcher-12] INFO c.t.akka.rabbitmq.ChannelActor - akka://push-server/user/$a/connection/confirmed-publisher-channel connected
05:59:59.637 [push-server-akka.actor.default-dispatcher-6] WARN c.t.akka.rabbitmq.ChannelActor - akka://push-server/user/$a/connection/confirmed-publisher-channel disconnected
05:59:59.638 [push-server-akka.actor.default-dispatcher-3] INFO c.t.akka.rabbitmq.ChannelActor - akka://push-server/user/$a/connection/confirmed-publisher-channel connected
05:59:59.639 [push-server-akka.actor.default-dispatcher-6] WARN c.t.akka.rabbitmq.ChannelActor - akka://push-server/user/$a/connection/confirmed-publisher-channel disconnected
05:59:59.640 [push-server-akka.actor.default-dispatcher-3] INFO c.t.akka.rabbitmq.ChannelActor - akka://push-server/user/$a/connection/confirmed-publisher-channel connected
05:59:59.641 [push-server-akka.actor.default-dispatcher-8] WARN c.t.akka.rabbitmq.ChannelActor - akka://push-server/user/$a/connection/confirmed-publisher-channel disconnected
05:59:59.642 [push-server-akka.actor.default-dispatcher-3] INFO c.t.akka.rabbitmq.ChannelActor - akka://push-server/user/$a/connection/confirmed-publisher-channel connected
05:59:59.643 [push-server-akka.actor.default-dispatcher-6] WARN c.t.akka.rabbitmq.ChannelActor - akka://push-server/user/$a/connection/confirmed-publisher-channel disconnected
05:59:59.644 [push-server-akka.actor.default-dispatcher-5] INFO c.t.akka.rabbitmq.ChannelActor - akka://push-server/user/$a/connection/confirmed-publisher-channel connected
05:59:59.645 [push-server-akka.actor.default-dispatcher-6] WARN c.t.akka.rabbitmq.ChannelActor - akka://push-server/user/$a/connection/confirmed-publisher-channel disconnected
05:59:59.647 [push-server-akka.actor.default-dispatcher-5] INFO c.t.akka.rabbitmq.ChannelActor - akka://push-server/user/$a/connection/confirmed-publisher-channel connected
05:59:59.647 [push-server-akka.actor.default-dispatcher-5] WARN c.t.akka.rabbitmq.ChannelActor - akka://push-server/user/$a/connection/confirmed-publisher-channel disconnected
05:59:59.649 [push-server-akka.actor.default-dispatcher-12] INFO c.t.akka.rabbitmq.ChannelActor - akka://push-server/user/$a/connection/confirmed-publisher-channel connected
05:59:59.650 [push-server-akka.actor.default-dispatcher-12] WARN c.t.akka.rabbitmq.ChannelActor - akka://push-server/user/$a/connection/confirmed-publisher-channel disconnected


tens of warns per second, and my amqp messages dont deliver to dests in rabbitmq(mqtt clients)

what's wrong?

Answer

I found the problem. it was a typo mistake.
In op-rabbit config I set a wrong topic-exchange-name.
but the error was very illusive.
It should be "there is no such exchange"

op-rabbit {
  topic-exchange-name = "amq.topic"
  connection {
    virtual-host = "/"
    hosts = ["172.16.0.45"]
    username = "..."
    password = "..."
    port = 5672
    timeout = 3s
  }
}
Comments