@Test(expected = ProcessException.class) public void failOnNonExistingQueue() throws Exception { Connection conn = new TestConnection(null, null); try (AMQPConsumer consumer = new AMQPConsumer(conn, "hello")) { consumer.consume(); } }
public GetResponse consume() { try { return this.channel.basicGet(this.queueName, true); } catch (IOException e) { logger.error("Failed to receive message from AMQP; " + this + ". Possible reasons: Queue '" + this.queueName + "' may not have been defined", e); throw new ProcessException(e); } }
AMQPConsumer extends AMQPWorker { public GetResponse consume() { try { return this.channel.basicGet(this.queueName, true); } catch (IOException e) { logger.error("Failed to receive message from AMQP; " + this + ". Possible reasons: Queue '" + this.queueName + "' may not have been defined", e); throw new ProcessException(e); } } }
AMQPConsumer extends AMQPWorker { public GetResponse consume() { try { return this.channel.basicGet(this.queueName, true); } catch (IOException e) { logger.error("Failed to receive message from AMQP; " + this + ". Possible reasons: Queue '" + this.queueName + "' may not have been defined", e); throw new ProcessException(e); } } AMQPConsumer(Connection connection, String queueName); }
AMQPConsumer extends AMQPWorker { public GetResponse consume() { try { return this.channel.basicGet(this.queueName, true); } catch (IOException e) { logger.error("Failed to receive message from AMQP; " + this + ". Possible reasons: Queue '" + this.queueName + "' may not have been defined", e); throw new ProcessException(e); } } AMQPConsumer(Connection connection, String queueName); GetResponse consume(); @Override String toString(); }
AMQPConsumer extends AMQPWorker { public GetResponse consume() { try { return this.channel.basicGet(this.queueName, true); } catch (IOException e) { logger.error("Failed to receive message from AMQP; " + this + ". Possible reasons: Queue '" + this.queueName + "' may not have been defined", e); throw new ProcessException(e); } } AMQPConsumer(Connection connection, String queueName); GetResponse consume(); @Override String toString();  }