java.lang.IllegalStateException:连接池关闭spring-integration-aws库中的异常

时间:2019-02-05 14:03:31

标签: java spring-boot amazon-kinesis spring-integration-aws aws-sdk-java-2.0

我们正在使用spring-integration-aws-2.0.0来连接运动学来收听流。停止应用程序时,始终会收到以下异常。

a.i.k.KinesisMessageDrivenChannelAdapter : Got an exception java.lang.IllegalStateException: Connection pool shut down during [ShardConsumer{shardOffset=KinesisShardOffset{iteratorType=TRIM_HORIZON, sequenceNumber='null', timestamp=null, stream='developer-entitlement-command-stream-local', shard='shardId-000000000000', reset=false}, state=CONSUME}] task invocation.
Process will be retried on the next iteration.

尽管它可能尚未引起任何数据丢失。有人遇到这个错误吗?

1 个答案:

答案 0 :(得分:0)

这看起来很简单,但是很烦人。

  • 停止应用程序时,请确保关闭连接并将它们返回到池中。
  • 关闭应用程序时,任何引用或进程都不应在后台运行。

我的问题已通过上面的第二个选项解决。

希望这会有所帮助:)

相关问题