A
A
Alexey Kopendakov2018-06-07 13:22:52
Java
Alexey Kopendakov, 2018-06-07 13:22:52

How to organize the queue of tasks?

Good afternoon.
It was necessary to organize the execution of tasks according to the schedule in the application.
The scheduler itself is approximately clear how to write.
Table in the database with the fields id, idTasksToStart, Start time, status.
Pull the table once a minute or five .. if the status is not fulfilled, and the time is overdue, then we start the task. After completion, change the status of the task to completed and add this task with the new time.
But how to organize the execution queue? There will be up to 3000 tasks in the future. The execution time is about 20 seconds. Tasks can be executed in parallel. But not all at once .... (polling devices via gsm modem)
Since I have not encountered this, I ask for help in determining what to use .... this miracle will spin in wildfly.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
O
OnYourLips, 2018-06-07
@alex_kag

Rabbitmq.
Simply because it's the most popular solution, and it fits.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question