-1

Is there a python API for reading all message present in a queue at that time? I found the api for .net:

https://learn.microsoft.com/en-us/dotnet/api/microsoft.servicebus.messaging.queueclient.peekbatch?view=azure-dotnet#Microsoft_ServiceBus_Messaging_QueueClient_PeekBatch_System_Int32_

David Makogon
  • 69,407
  • 21
  • 141
  • 189
kiran
  • 445
  • 1
  • 5
  • 11

1 Answers1

1

As I known, Azure SDK for Python is wrapped Azure REST API, there is only a REST API to peek a message at one time, so the answer is no.

And there are some issues for this needs on Azure GitHub repo as below, the offical team recommended using AMQP instead of HTTP to peek messages.

  1. Add support ReceiveBatch in servicebus.py
  2. ServiceBus Batch Receive support

Hope it helps.

Jay Gong
  • 23,163
  • 2
  • 27
  • 32