[rabbitmq-discuss] Rabbitmq - retrieving messages concurrently

Santhoshsd santhosh at 8kmiles.com
Fri Mar 30 12:51:24 BST 2012


I want to retrieve 5000 messages/second from a single RabbitMQ server
and for each message assign a number and then push it into redis.

I want to use a single queue multiple consumer approach in the
rabbitmq client. Please let me know the way the proceed after this
point in Java.

ConnectionFactory factory = new ConnectionFactory();
        factory.setUsername(Constants.USERNAME);
        factory.setPassword(Constants.PASSWORD);
        factory.setVirtualHost(Constants.VIRTUALHOST);
        factory.setHost(Constants.HOSTNAME);
        factory.setPort(Constants.PORTNUMBER);


        ExecutorService es = Executors.newFixedThreadPool(20);
        Connection conn = factory.newConnection(es);


More information about the rabbitmq-discuss mailing list