To understand the concept of managing load and scalablity with background tasks and queues, take a look at the Heroku devcenter article Worker Dynos, Background Jobs and Queueing.
There is also an example of how to manage longer running jobs with Java and RabbitMQ in the Heroku dev center article Asynchronous Web-Worker Model Using RabbitMQ in Java
Please remember, adding a
workeror other backgrond process will increase your dyno usage and therefore you 750 hours monthly credit will not cover the whole month. Its recommended to set your dynos to zero when not in use for any non production systems.