我遇到了Rabbitmq和grails的配置問題。我想知道是否有其他人遇到過這種特殊情況。 Config.groovy中在grails中設置Rabbitmq
我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] ERROR RabbitmqGrailsPlugin - RabbitMQ connection factory settings (rabbitmq.connectionfactory.username, rabbitmq.connectionfactory.password and rabbitmq.connectionfactory.hostname) must be defined in Config.groovy
而且我看不到我的配置設置如何被打破。 Grails環境配置是否不像記錄那樣工作?
邁克