简体   繁体   中英

java.lang.IllegalStateException: Connection pool shut down exception from spring-integration-aws library

We are using spring-integration-aws-2.0.0 for connecting to kinesis to listen to stream. While stopping the application, always getting the following exception.

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.

though it has probably not caused any data loss yet. Has anyone got this error?

This looks like a simple one but it is annoying.

  • When stopping the application make sure that the connections are closed and they are returned to the pool.
  • Any reference or a process should not be running in the background when the application is being closed.

My issue got fixed by the second option above.

Hope this helps :)

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM