Hi In http://www.rabbitmq.com/api-guide.html#core the example says factory.setHostName(hostName); factory.setPortNumber(portNumber); But I think according to the API it is factory.setHost(hostName); factory.setPort(portNumber); Please check this. Abhishek Kona