I am new to Azure Service Bus and I found that I need to continuously poll for Queue messages in order to receive them. However, I want the Queue to push the message to some sort of listener on the client-side of things without it having to poll for messages.
I have read that polling is optional in Azure Service Bus but I couldn't find how to receive messages without it.
Please help if you can. Thank you
Event Grid works on a Push mechanism, which means that the Event Grid pushes the event to its Subscribers, whereas in Service Bus, the subscribers pull the messages from the Bus.
To send bulk messages in a Service Bus Queue or Topic you should navigate to the required Service Bus Namespace > Navigate into the required Queue or Topic > Click the add message icon to send messages. You can configure the message count to send bulk messages.
Azure Service Bus' primary protocol is AMQP 1.0 and it can be used from any AMQP 1.0 compliant protocol client. Several open-source AMQP clients have samples that explicitly demonstrate Service Bus interoperability.
I have read that polling is optional in Azure Service Bus but I couldn't find how to receive messages without it.
Polling is optional if you start receiving on demand. Otherwise, it's not optional and long-polling will take place.
I want the Queue to push the message to some sort of listener on the client-side of things without it having to poll for messages.
There's a way to achieve exactly that using Event Grid integration with Azure Service Bus. Service Bus will emit an event to notify about messages awaiting processing and no active listeners. That way your application/system reacts and doesn't have to poll.
Note that the key scenario for this feature is low volume of messages that do not need to have a receiver that polls for messages continuously.
It should be possible. Take a look on the following to get an idea on how it could be done:
Hope it helps!
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With