MicrosoftDocs / azure-docs

Open source documentation of Microsoft Azure
https://docs.microsoft.com/azure
Creative Commons Attribution 4.0 International
10.31k stars 21.49k forks source link

No documentation for how to set SessionId with python #67021

Open mikegoatly opened 4 years ago

mikegoatly commented 4 years ago

The Python code used to write the output message to the Service Bus is just:

msg.set(input_msg)

However when sessions are enabled on the queue being written to, this fails with The SessionId was not set on a message, and it cannot be sent to the entity. It would be helpful if the documentation could cover what to do when sessions are enabled.


Document Details

Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

ChaitanyaNaykodi-MSFT commented 4 years ago

Hello @mikegoatly, Thank you for your feedback! We will review and update as appropriate.

ChaitanyaNaykodi-MSFT commented 3 years ago

Hello @mikegoatly, thank you for reaching out, you can refer to this sample for sending messages using Python when sessions are enabled. We have now assigned this issue to the author to review further and take the next course of action. Thank you!

anthonychu commented 3 years ago

I think @mikegoatly was trying to use the output binding. I'm not sure if the binding supports setting sessionId in out-of-proc languages. The change here may be to call out that to set the sessionId (and partitionId in Event Hubs, etc), the guidance is to use the SDKs. @stefanushinardi

mikegoatly commented 3 years ago

Thanks @anthonychu - yeah, that was my scenario. I came to the that conclusion, but wasn't aware of why the limitation was there and felt the documentation could do with being a bit more explicit. (I ended up switching over to .NET Core as I'm more familiar with it and there are fewer surprises for me there :) - we were only using Python because it was being used as part of a project that relied on Python elsewhere)