0

I am using Kinesis to consume a stream inside of a Spring Boot App. I'm using the KCL provided by AWS for this and to start it, you define a Kinesis com.amazonaws.services.kinesis.clientlibrary.lib.worker.Worker instance and call .run() on it. I do not wish to use spring-integration for this task.

I want to build an abstraction here so that developers can create several workers and have them run automatically during or after application startup, and then call the respective .shutdown() method on Application termination. Right now I'm doing this by creating a @Component for each Worker and then run() on @PostConstruct and @PreDestroy.

Is there a better way?

IcedDante
  • 6,145
  • 12
  • 57
  • 100

0 Answers0