1 of 1 people found this helpful
I feel like you need to implement this part of logic yourself. for example you create a consumer that receive every message from the outgoing queue, examines the worker name and check if the worker exists or not. Starts the worker if needed.
Then forward the message to another topic (which all workers subscribe to). Then commit the session to let the message be removed from the original queue.
Or just directly dispatch the message to the worker (no topic needed).
Thanks Yong. I don't think we'd be able to do it quite like that. One requirement we have is if we lose a node we'd want to recreate the workers on another node relatively quickly. Here's our current plan.
1) order queue - orders put on this queue with worker name property used in selection by consumers (workers).
2) active worker queue - coordinating system pushes out a message for each worker expected to be running. Worker consumes and discards off this queue with selectors. Messages not consumed within a second will be assumed not to have a worker running and will be expired to queue 3.
3) worker launch queue - nodes consume off this queue and start the named worker
So.....does this sound ludicrous?