Search code examples
c#.netazureazureservicebusazure-servicebus-queues

Azure Service Bus Queue Authorization for Multiple Senders


Is there a way to authorize certain message senders of an Azure Service Bus Queue to be able to only send specific messages? E.g. sender 1 can send message type 123 but sender 2 can can send message type 456. When consume 1 tries to send a message 123 they will get denied or the message will not be processed.

I've been looking into the SAS authorization type but I'm not really sure how this would be consumed on the server that's pulling the messages off the queue.


Solution

  • You might consider creating a separate queue for each message type. This will allow you to effectively segregate and scale your senders and listeners without having to jump through all sorts of pre-processing and authorization hoops. Service bus queues are priced by the transaction so additional queues will not add to your overall cost.