servicebus - Azure Service bus: Multiple clients but only one message processed at a time -


i trying evaluate if azure service bus fit requirements.

i need able have multiple clients listening messages want ensure 1 of clients can process message @ given time. in effect when want lock whole queue reading whilst message being processed. (the message signal initiate database aggregation jobs)

so if message arrives , client 1 starts processing it, if message b arrives, not want client 2 start processing unless client 1 has finished.

i realise can achieve having 1 client listening. other option @ instance id , start listener if instance id = 0, wondered if there way of avoiding instance id specific logic.

you can achieve using sessions on service bus queue. sender perspective can add string sessionid property on each message , designate session belong to. on receiver side call acceptmessagesession , lock entire session. messages show session later delivered receiver has session locked them calling receive. other clients can calling acceptmessagesession on queue if messages going single session (all had same sessionid) 1 of receiver see it. samples using sessions available here: http://code.msdn.microsoft.com/windowsazure/brokered-messaging-session-41c43fb4

the scenario describing not clear purpose azure storage blob lease etc. may solve same locking semantics need.


Comments

Popular posts from this blog

Android layout hidden on keyboard show -

google app engine - 403 Forbidden POST - Flask WTForms -

c - Why would PK11_GenerateRandom() return an error -8023? -