Is there some recommended patterns for workers in production?

I find in the samples, the workers are just in main functions.
Are there any recommended patterns for running workers in production ? For example, is spring boot recommended to integrate with workers?

I think it depends on your applications and frameworks used. If you use spring boot you could rely on application start / shutdown events for example to start and shut down down your worker factory and workers.

I right now use the workers directly, and I am not sure if I should use spring boot now :rofl: