Created
April 11, 2018 09:47
-
-
Save mossey/c9c37ccd8c9a00ff2a6c7042a6ff979a to your computer and use it in GitHub Desktop.
Publish to ASB
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from azure.servicebus import ServiceBusService | |
from azure.servicebus import Message | |
key_name = "component" # SharedAccessKeyName from Azure portal | |
key_value = "GQ0I5xfvkOKU4u719LeXEQV7U/iiSJBmcD7HwA05rt4=" # SharedAccessKey from Azure portal | |
sbs = ServiceBusService("dev-bonga-asb", | |
shared_access_key_name=key_name, | |
shared_access_key_value=key_value) | |
msg = Message( | |
' {"trackingID":"mljdlkasjldkjasldkjlaksd", "senderJID":"moses@localhost","conversationID":"jsalkjdlkjakldjaklsdjlkasjd","transactionUUID":"***[email protected]\\/0303\\/2727 04:55:03","transactionType":"AccountBalance","responseCode":"00","responseDescription":"697.00"}') | |
sbs.send_queue_message('example_queue', msg) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
azure-servicebus |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment