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

Azure SDK for Python | peek() doesn't work

$
0
0

Hello,

When I try to peek at messages in a topic subscription with a count of say, five, I can only get the first two messages although the subscription has 10+ messages. Here's what I'm trying:

subscription_client = SubscriptionClient.from_connection_string(CONNECTION_STR
, name=SUBSCRIPTION_NAME, topic=TOPIC_NAME)

with subscription_client.get_receiver() as receiver:   
    messages = receiver.peek(count=5,start_from=None)
    for message in messages:  
         print(message.message,"\n")

I also noticed that for subscriptions with 100+ messages, I could only peek at first four messages.

Please help.



Viewing all articles
Browse latest Browse all 1916

Trending Articles



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