A distributed task queue supporting priorities and time based exection based on redis. Named after the famous milau bridge (yes architecture fascinates me) The worker only supports one queue and uses Traditional threads based on CPU count (Work is in progress to make it support multiple queues)
Features
- At least once delivery
- Jobs are executed at only a specified time in future.
- Each job has 3 queues associated with it
- Redis is the only supported backend
Installation
Maven central
<dependency>
<groupId>io.github.kigsmtua</groupId>
<artifactId>Milau</artifactId>
<version>0.1.0</version>
</dependency>How To Use(Quickstart)
@Task(
queueName = "my-task-queue"
)
Class MyJob implements Runnable {
private String name;
public String getName() {
return this.name;
}
public void setName(String name) {
this.name = name;
}
public void run () {
try {
/// Sleep for some time to simulate execution
Thread.sleep(1);
} catch (InterruptedException e) {
}
}
}
Config config = new Config.ConfigBuilder("127.0.0.1", 6379).build();
Map<String , Object> jopProperties = new HashMap<>();
jopProperties.put("name", "johnDoe");
Client client = new Client(config);
client.enqueue(null, MyJob.class, jopProperties, 0);
Worker worker = new Worker(config, queue);
Thread workerThread = new Thread(worker);
workerThread.start();Whats Remaining
- Worker to run for all/multiple queues
- Record number of failures/keep stats
- Ability to pause given queues
- Use green threads to see if performance actually gets to improves
- Finish up on the Ack module
- Build recovery strategy for the worker module
Please read CONTRIBUTING.md and CODE_OF_CONDUCT.md Contributions are very welcome(the more the merrier)
We use SemVer for versioning. All releases are taggged please checkout a particular tag if testing as all code goes into master