In my application I have Akka and Spring integrated i.e. I can call Spring Boot services from an actor.
Integration is based on Akka Extensions.
Spring service in injected into the actor by means of @Autowired annotation.
When I call Spring service inside the actor everything works just fine but I noticed that Spring service is executed within a different thread than the thread that was used by default dispatcher to invoke an actor.
For some reason I would like to have Spring service to be invoked with the same thread as the “owning” actor is.
So my question is why does Akka use different thread to execute Spring service and what could be done for workaround?