我遇到了 Rabbitmq 和 grails 的配置问题。我想知道是否有其他人遇到过这种特殊情况。
我在 config.groovy 中的 rabbitmq 配置如下所示:
environments {
production {
rabbitmq {
connectionfactory {
username = '******'
password = '******'
hostname = 'ip-******.ec2.internal'
channelCacheSize = 25
prefetchCount = 10
concurrentConsumers = 3
}
retryPolicy {
maxAttempts = 10
}
queues = {
exchange name: 'plover', type: topic, durable: true, {
error durable: true, binding: 'error.#'
user durable: true, binding: 'user.#'
track durable: true, binding: 'track.#'
klout durable: true, binding: 'klout.#'
showuser durable: false, binding: 'showuser.#'
network durable: true, binding: 'network.#'
customer durable: true, binding: 'cusotmer.#'
recommend durable: true, binding: 'recommend.#'
pusher durable: true, binding:'pusher.#'
backfill durable: true, binding: 'backfill.#'
mail durable: true, binding: 'mail.#'
checkaction durable: true, binding: 'checkaction.#'
timertasks durable: true, binding: 'timertasks.#'
mission durable: true, binding: 'mission.#'
sentiment durable: true, binding: 'sentiment.#'
updateuser durable: false, binding: 'updateuser.#'
googlereader durable: true, binding: 'googlereader.#'
flickr durable: true, binding: 'flickr.#'
}
exchange name:'pubsub', type: fanout, durable: true
}
}
}
development {
rabbitmq {
connectionfactory {
username = 'guest'
password = 'guest'
hostname = 'localhost'
channelCacheSize = 25
prefetchCount = 10
concurrentConsumers = 3
}
retryPolicy {
maxAttempts = 10
}
queues = {
exchange name: 'plover', type: topic, durable: true, {
error durable: true, binding: 'error.#'
user durable: true, binding: 'user.#'
track durable: true, binding: 'track.#'
klout durable: true, binding: 'klout.#'
showuser durable: false, binding: 'showuser.#'
network durable: true, binding: 'network.#'
customer durable: true, binding: 'cusotmer.#'
recommend durable: true, binding: 'recommend.#'
pusher durable: true, binding:'pusher.#'
backfill durable: true, binding: 'backfill.#'
mail durable: true, binding: 'mail.#'
checkaction durable: true, binding: 'checkaction.#'
timertasks durable: true, binding: 'timertasks.#'
mission durable: true, binding: 'mission.#'
sentiment durable: true, binding: 'sentiment.#'
updateuser durable: false, binding: 'updateuser.#'
googlereader durable: true, binding: 'googlereader.#'
flickr durable: true, binding: 'flickr.#'
}
exchange name:'pubsub', type: fanout, durable: true
}
}
}
}
因此,所有 Rabbitmq 配置设置都按预期在生产/开发环境中完成。
但是,当我尝试在生产或本地开发上运行时,我收到以下错误:
2013-04-18 13:23:10,583 [pool-7-thread-1] 错误 RabbitmqGrailsPlugin - RabbitMQ 连接工厂设置(rabbitmq.connectionfactory.username、rabbitmq.connectionfactory.password 和 rabbitmq.connectionfactory.hostname)必须在 Config 中定义.groovy
而且我看不到我的配置设置是如何损坏的。grails 环境配置是否按文档说明工作?
麦克风