Skip to content

Commit

Permalink
change the default concurrent consumers count to 1
Browse files Browse the repository at this point in the history
change the name of the concurrent consumers property from rabbitmq.connectionfactory.consumers to rabbitmq.concurrentConsumers
make the channel cache size configurable via rabbitmq.connectionfactory.channelCacheSize
  • Loading branch information
Jeff Brown committed Jul 27, 2010
1 parent c67c548 commit a2b9966
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions RabbitmqGrailsPlugin.groovy
Expand Up @@ -46,7 +46,8 @@ The Rabbit MQ plugin provides integration with the Rabbit MQ Messaging System.
def connectionFactoryUsername = connectionFactoryConfig?.username
def connectionFactoryPassword = connectionFactoryConfig?.password
def connectionFactoryHostname = connectionFactoryConfig?.hostname
def connectionFactoryConsumers = connectionFactoryConfig?.consumers ?: 5
def connectionChannelCacheSize = connectionFactoryConfig?.channelCacheSize ?: 10
def connectionFactoryConsumers = application.config.rabbitmq?.concurrentConsumers ?: 1

if(!connectionFactoryUsername || !connectionFactoryPassword || !connectionFactoryHostname) {
log.error 'RabbitMQ connection factory settings (rabbitmq.connectionfactory.username, rabbitmq.connectionfactory.password and rabbitmq.connectionfactory.hostname) must be defined in Config.groovy'
Expand All @@ -61,7 +62,7 @@ The Rabbit MQ plugin provides integration with the Rabbit MQ Messaging System.
rabbitMQConnectionFactory(connectionFactoryClass, connectionFactoryHostname) {
username = connectionFactoryUsername
password = connectionFactoryPassword
channelCacheSize = 10
channelCacheSize = connectionChannelCacheSize
}
rabbitTemplate(RabbitTemplate) {
connectionFactory = rabbitMQConnectionFactory
Expand Down

0 comments on commit a2b9966

Please sign in to comment.