spring-cloud-aws
spring-cloud-aws copied to clipboard
aws spring cloud 3.x : There is no queue stop timeout, that is creating problems by increasing buid timeout.
Type: Feature
Is your feature request related to a problem? Please describe. public void stop(String logicalQueueName) { stopQueue(logicalQueueName);
try {
if (isRunning(logicalQueueName)) {
Future<?> future = this.scheduledFutureByQueue.remove(logicalQueueName);
if (future != null) {
future.get(this.queueStopTimeout, TimeUnit.MILLISECONDS);
}
}
}
catch (InterruptedException e) {
Thread.currentThread().interrupt();
}
catch (ExecutionException | TimeoutException e) {
getLogger().warn("Error stopping queue with name: '" + logicalQueueName + "'", e);
}
}
There used to be a queueStopTimeout in the previous version, that let us, shut the queue down by interrupting the thread, when the application shuts down. In v3
@Override
public void stop() {
if (!this.isRunning) {
return;
}
logger.debug("Stopping container {}", this.id);
synchronized (this.lifecycleMonitor) {
this.isRunning = false;
doStop();
}
logger.info("Container {} stopped", this.id);
}
Please advice if this exists, leave implementation, do you see a "hacky" way?
Another hacky thing I had to do: https://github.com/awspring/spring-cloud-aws/issues/1055