문제

I went thought the document of nservicebus http://docs.particular.net/, but still confuse how can i do what i want to do.

My aim is to have a windows service, generate tasks and put them into a queue, on the other end, i need some consumers, whenever who is free, pick up a tasks from the queue, and do the job specify in the message.

can anyone give me some hint, how can i continue??

Thanks

도움이 되었습니까?

해결책

The distributor will do exactly what you are after. Basically the distributor will control n number of nodes which use a round robin style work allocation. The nodes register with the distributor by passing a "I'm ready for work" message to it. The distributor then puts these messages in a queue. When the distributor receives the real message, it will pop the first "I'm ready" message off the queue and forward the message onto the appropriate node. When the node then finishes processing the message, he'll send a new "I'm ready" message to the distributor which will end up on the bottom of the queue.

So basically, it'll do exactly what you want.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top