: "/"); factory.setVirtualHost(vHost); factory.setSaslConfig(new CustomSaslConfig()); conn = factory.newConnection(); channel = conn.createChannel();
public void receive(ReceiverService service) throws Exception { // let's setup evrything and start listening this.service = service; ConnectionFactory factory = createConnectionFactory(); factory.setSaslConfig(new CustomSaslConfig()); connection = factory.newConnection(); channel = connection.createChannel(); channel.exchangeDeclare("testExchange", "fanout"); channel.queueDeclare(QUEUE_NAME, false, true, false, null); channel.queueBind(QUEUE_NAME, "testExchange", "testRouting"); channel.basicConsume(QUEUE_NAME, true, newConsumer(channel)); }