Queue Manager - michaelmarconi/oncue GitHub Wiki
The Queue Manager's key responsibility is to create new jobs and tell the Scheduler about them. Each Job has a unique ID, which must be generated in a monotonically increasing fashion by the Queue Manager.
images/queue-manager-components.png
Current implementations
- Memory-backed: Use
InMemoryQueueManager.class
if you need a fast, volatile Queue Manager. This is great for testing. - Redis-backed: Use
RedisQueueManager.class
if you want to maintain the queue of new Jobs in Redis. This is useful when you need to cross platform boundaries. This implementation will start a childQueueMonitor
component that uses the blockingBRPOP
list dequeueing command to wait for new jobs to arrive.
New implementations
To create a new kind of Queue Manager, extend AbstractQueueManager
and override the following key method:
protected abstract Job createJob(String workerType, Map<String, String> jobParams);
Make sure to return a Job with a unique ID!