-
Notifications
You must be signed in to change notification settings - Fork 85
Publish messages getting dropped #86
Description
In one of my applications I am generating an array of messages and iterating over them and pushing them (Publish) to the producer.
I am creating the producer as follows -
val deadLetterOption = config.deadletter match {
case true => clientProps ++ Map("x-dead-letter-routing-key" -> config.deadletterRoutingKey, "x-dead-letter-exchange" -> config.deadletterExchange)
case _ => clientProps
}
val ttlOption = config.ttl > 0 match {
case true => deadLetterOption ++ Map("x-message-ttl" -> new Integer(config.ttl))
case false => deadLetterOption
}
val channelParameters = Option(ChannelParameters(1))
val exchangeParams = ExchangeParameters(name = exchange, passive = false,
exchangeType = "direct", durable = true, autodelete = false, clientProps)
val queueParams = QueueParameters(queueName, passive = false, durable = true, exclusive = false, autodelete = false,
clientProps)
val producer = ConnectionOwner.createChildActor(connection, ChannelOwner.props(channelParams = channelParameters),
timeout = timeout.second)
Amqp.waitForConnection(system, producer).await()
producer ! DeclareExchange(exchangeParams)
producer ! DeclareQueue(queueParams)
producer ! QueueBind(queue = queueName, exchange = exchange, routing_key = queueName)
I am getting the following in my deadletter watcher -
Publish(my_ex,my_q,[B@f94d482,None,true,false)
When I generate 100k messages, I get this dropped messages for > 10k messages.
I am using unbounded mailbox (unless this library uses some other mailbox from code).
What could be the reason for these drops?