question

babruvahana avatar image
0 Votes"
babruvahana asked babruvahana commented

Send messages to ASB scheduled queue via APIs

Hi Experts,

I am new to Azure World.

I have a requirement to schedule the messages[for about 5 min] while sending them to Azure Service Bus via API as we are sending messages from the SAP Cloud Integration tool.
So I am trying to send the messages using postman with the below details, but the messages are going to the main queue instead of scheduled queues. It seems like I am making mistake in the header property
Operation: POST
URL: https://{mynamespace}.servicebus.windows.net/{myqueuename}/messages
**Header:**ScheduledEnqueueTimeUtc = 2021-09-15T14:25:00Z


Any leads will be really helpful.
132396-post-message.png
132348-postaman-message.png

Regards,
Pavan G


azure-service-bus
post-message.png (64.6 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.

1 Answer

MayankBargali-MSFT avatar image
1 Vote"
MayankBargali-MSFT answered babruvahana commented

@babruvahana As per the Send Message document you need to set the BrokerProperties in the header and the value should be json object of BrokerProperties class

Header
BrokerProperties: {"ScheduledEnqueueTimeUtc":"2021-09-16T12:01:00Z"}
Content-Type : application/atom+xml;type=entry;charset=utf-8

Let me know if you are still facing the issue.

Please 'Accept as answer' and ‘Upvote’ if it helped so that it can help others in the community looking for help on similar topics.

· 1
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.

Hi @MayankBargali-MSFT ,

I hope you are doing well :)

Thanks a lot for the help, I have implemented the headers as you suggested and it is working for me :)

Regards,
Pavan

1 Vote 1 ·