jtjeferreira opened a new pull request, #226:
URL: https://github.com/apache/incubator-pekko-connectors/pull/226

   The `KinesisSchedulerSourceStage` needs to run the 
`software.amazon.kinesis.coordinator.Scheduler` in a thread. The scheduler runs 
a loop and uses `Thread.sleep`, which needs careful use because it is a 
blocking operation.
   
   Currently, it uses `Future(scheduler.run())`, which will use the implicit 
`ExecutionContext` from the constructor. By default, this EC will be the akka 
default dispatcher which is not suitable for blocking. Also, note the use of 
`ActorAttributes.IODispatcher` in `initialAttributes` which is not having any 
effect as we are not using the stage materializer.
   
   This PR removes the EC from the constructor, and uses the stage logic 
materializer EC (which will be the IODispatcher) which is aligned with other 
custom stages in this project. 
   
   Questions:
   * Is it okay to use the `IODispatcher`? AFAICT that dispatcher has 16 
threads, so if we launch 16 Schedulers, there will be no more threads available
   * How do I test this?


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to