Quantcast
Channel: Service Bus forum
Viewing all articles
Browse latest Browse all 1916

Priority Queue and Ordering of Messages

$
0
0

I have following scenario 
There are 10 messages (M1..M10) to process, priority of messages are  (Priority 1 - 3, 1 = high, 2= medium, 3 = low), each message results in an action (say an phone activation, deactivate phone, bill notification for sake of it, identified here as A= activate, D = deactivate, B= Bill-ready and each message have a receiver address / phone number where message will be sent ultimately)

Each Priority have its own queue to avoid pileup of messages (say 100000 D messages in front of 100 A messages may result into slowness of P1 message going out)
Message number -> Message Type -> Priority -> receiver phone mapping is as below

Msg -> Type - > Pri -> email
M1 ->  A    - > (P1) -> address1
M2 ->  A    - > (P1) -> address2
M3 ->  A    - > (P1) -> address3
M4 ->  B    - > (P2) -> address1
M5 ->  A    - > (P1) -> address4
M6 ->  A    - > (P1) -> address5
M7 ->  D    - > (P3) -> address6
M8 ->  D    - > (P3) -> address1
M9 ->  A    - > (P1) -> address2
M10->  B    - > (P2) -> address1

As you may notice, there are messages that are intended for a phone number in different priority order, Address 1 have P1, P2 and P3 messages
Is it possible to control locking and ordering of messages, 

scenario is that I want to only send P2 message for a phone number once P1 message is processed, even if I scale out and increase my processor roles (in your diagram sub)I dont want to start processing messages out of order.

Is it something that Azure Queue / Service bus support or have a library that have methods for it, I can see that it was an huge issue with MSMQ and had an adverse effect on performance (coz it was not supported out of the box and to do what i am mentioning you were pretty much had to lock a record loop through entire queue to see if there are more messages for this phone number in the queue and figure out ordering on your own, huge performance hit)

Any help is highly appreciated


Please mark as answered if it helped

Vishal Narayan Saxena

http://twitter.com/vishalishere

http://www.ogleogle.com/vishal/




Viewing all articles
Browse latest Browse all 1916

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>