Skip to content

Missing graceful shutdown option when kpl-kcl-enabled: true #222

@jakub-rogowski

Description

@jakub-rogowski

In what version(s) of Spring Cloud Stream Binder for AWS Kinesis are you seeing this issue?

4.0.3

Describe the issue

We are attempting to gracefully shut down KCL Schedulers. However, this cannot be accomplished through the binder configuration because the KclMessageDrivenChannelAdapter has a hardcoded shutdown process:

@Override
protected void doStop() {
	super.doStop();
	this.scheduler.shutdown();
}

Additionally, the KinesisMessageChannelBinder has a hardcoded adapter creation method, which complicates the use of the Scheduler's method: CompletableFuture<Boolean> startGracefulShutdown().

KclMessageDrivenChannelAdapter adapter =
		new KclMessageDrivenChannelAdapter(this.amazonKinesis, this.cloudWatchClient, this.dynamoDBClient,
				streams);

Expected behavior

Is it possible to configure this behavior easily using the binder, or are we missing something related to the graceful shutdown process?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions