2

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?

Shafiul
  • 1,452
  • 14
  • 21

1 Answers1

1

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 :)

Krunal Barot
  • 914
  • 6
  • 17
  • 1
    amazon kinesis clients are configured as spring bean, using AmazonKinesisAsyncClientBuilder.standard()..build(). Hence we don't manually open/close any connection. I don't have any process in background. – Shafiul Feb 05 '19 at 15:09