question

IqbalZafar-4376 avatar image
0 Votes"
IqbalZafar-4376 asked BrunoLucas-9843 commented

Get messages from a service bus queue only retrieves a single message

I have a azure service bus queue which has a number of message's within it. And have a logic-app using a manual trigger. I then add a "Get messages from a queue (peek-lock)" action to the app to get the messages from this service bus and set the maximum message count to "170". But when it's triggered it only picks 1 message. Can someone explain why this is. And why it's not picking up 170 messages.

Thanks

azure-logic-appsazure-service-bus
· 2
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

@IqbalZafar-4376, Thanks for reaching out. Can you please confirm whether you are using the session property for the action Get messages from a queue (peek-lock)?
The only scenario that i can think about will be when you are using the session while retrieving the messages where messages will be returned from a single partition in case of partition entity with session enabled. The other scenario could be when a single message content might be equal to the maximum message size of that SKU.

0 Votes 0 ·

Hi @IqbalZafar-4376 ,
Just reaching ouch to see if you have managed to identify the problem.
Is there anything else we can do to help?

0 Votes 0 ·

1 Answer

BrunoLucas-9843 avatar image
0 Votes"
BrunoLucas-9843 answered

hi @IqbalZafar-4376 ,

this is how I've done it:

-added the "get message from a queue (peek lock)"
-added an action to process/receive the messages. on this case, just a compose to troubleshoot
-inside the compose I've added the "Current item" from the "ForEach"

197208-image.png

After succeeding , I switched to pull from a queue with Partitions. That produced the problem. When queue has partitions it will pull 1 message only.

I can't find an option to handle queues with partitions in the "get message from a queue (peek lock)" task

Is you queue partitioning enabled?

Are you looping through your messages?



image.png (22.5 KiB)
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.