azure service bus - does it allow modifying attributes of messages in queue

148 Views Asked by At

I am designing a queue based system for decoupling publisher of certain messages from their consumers. I have an additional requirement - when a publisher pushes a new message and if an earlier message of similar kind is already in queue and is yet to be processed(ie picked by consumer) , then the older message has to be deduped off before the new message is pushed into the queue; this is to save on cost of processing a message which we know is getting obsolete. I am exploring on the technology to be used to implement such a queue. Is Azure Service bus an option? Does it allow modifying attributes of specific messages in the queue? Also, any suggestion on what would be the best technology to implement such a queue?

1

There are 1 best solutions below

0
On

Try using sessions: https://code.msdn.microsoft.com/windowsazure/Brokered-Messaging-Session-41c43fb4

This way the second message has the same session ID, and the client will fetch all messages with the same session ID. The client must have some logic to discard the oldest one.