@Test void start_withQueueNameThatDoesNotExist_throwAnException() throws Exception { SimpleMessageListenerContainer container = new SimpleMessageListenerContainer(); container.setAmazonSqs(mock(AmazonSQSAsync.class, withSettings().stubOnly())); container.setMessageHandler(new QueueMessageHandler()); container.afterPropertiesSet(); assertThatThrownBy(() -> container.start("bar")) .isInstanceOf(IllegalArgumentException.class).hasMessageContaining("bar"); }
public void start(String logicalQueueName) { Assert.isTrue(this.runningStateByQueue.containsKey(logicalQueueName), "Queue with name '" + logicalQueueName + "' does not exist"); QueueAttributes queueAttributes = this.getRegisteredQueues() .get(logicalQueueName); startQueue(logicalQueueName, queueAttributes); }
SimpleMessageListenerContainer extends AbstractMessageListenerContainer { public void start(String logicalQueueName) { Assert.isTrue(this.runningStateByQueue.containsKey(logicalQueueName), "Queue with name '" + logicalQueueName + "' does not exist"); QueueAttributes queueAttributes = this.getRegisteredQueues() .get(logicalQueueName); startQueue(logicalQueueName, queueAttributes); } }
SimpleMessageListenerContainer extends AbstractMessageListenerContainer { public void start(String logicalQueueName) { Assert.isTrue(this.runningStateByQueue.containsKey(logicalQueueName), "Queue with name '" + logicalQueueName + "' does not exist"); QueueAttributes queueAttributes = this.getRegisteredQueues() .get(logicalQueueName); startQueue(logicalQueueName, queueAttributes); }  }
SimpleMessageListenerContainer extends AbstractMessageListenerContainer { public void start(String logicalQueueName) { Assert.isTrue(this.runningStateByQueue.containsKey(logicalQueueName), "Queue with name '" + logicalQueueName + "' does not exist"); QueueAttributes queueAttributes = this.getRegisteredQueues() .get(logicalQueueName); startQueue(logicalQueueName, queueAttributes); }  void setTaskExecutor(AsyncTaskExecutor taskExecutor); long getBackOffTime(); void setBackOffTime(long backOffTime); long getQueueStopTimeout(); void setQueueStopTimeout(long queueStopTimeout); void stop(String logicalQueueName); void start(String logicalQueueName); boolean isRunning(String logicalQueueName); }
SimpleMessageListenerContainer extends AbstractMessageListenerContainer { public void start(String logicalQueueName) { Assert.isTrue(this.runningStateByQueue.containsKey(logicalQueueName), "Queue with name '" + logicalQueueName + "' does not exist"); QueueAttributes queueAttributes = this.getRegisteredQueues() .get(logicalQueueName); startQueue(logicalQueueName, queueAttributes); }  void setTaskExecutor(AsyncTaskExecutor taskExecutor); long getBackOffTime(); void setBackOffTime(long backOffTime); long getQueueStopTimeout(); void setQueueStopTimeout(long queueStopTimeout); void stop(String logicalQueueName); void start(String logicalQueueName); boolean isRunning(String logicalQueueName);  }