You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
To upload a file (assuming it is called task1-upload.txt, it contains the exact text "hello world" (no quotation marks), and it is placed in the same folder as the script below), the method **put_blob** can be used:
91
+
To upload a file (assuming it is called task1-upload.txt, it contains the exact text "hello world" (no quotation marks), and it is placed in the same folder as the script below), the method **put\_blob** can be used:
It is then possible to call the **get___messages** method, process the message and then call **delete_message**on the messages ID. This two-step process ensures messages don't get lost when they are removed from the queue.
126
+
It is then possible to call the **get\_messages** method, process the message and then call **delete\_message**with the message id and receipt. This two-step process ensures messages don't get lost when they are removed from the queue.
ServiceBus Queues are an alternative to Storage Queues that might be useful in scenarios where more advanced messaging features are needed (larger message sizes, message ordering, single-operaiton destructive reads, scheduled delivery) using push-style delivery (using long polling).
139
138
140
-
The **create_queue** method can be used to ensure a queue exists:
139
+
The **create\_queue** method can be used to ensure a queue exists:
from azure.servicebus import ServiceBusService, Message
180
+
sbs = ServiceBusService(service_namespace, account_key, 'owner')
181
+
msg = Message('Hello World!')
182
+
sbs.send_topic_message('taskdiscussion', msg)
182
183
```
183
184
184
-
A client can then create a subscription and start consuming messages by calling the **create__subscription** method followed by the **receive__subscription__message** method. Please note that any messages sent before the subscription is created will not be received.
185
+
A client can then create a subscription and start consuming messages by calling the **create\_subscription** method followed by the **receive\_subscription\_message** method. Please note that any messages sent before the subscription is created will not be received.
Copy file name to clipboardExpand all lines: src/azure/__init__.py
+74-28Lines changed: 74 additions & 28 deletions
Original file line number
Diff line number
Diff line change
@@ -43,12 +43,12 @@
43
43
_ERROR_CANNOT_FIND_ROW_KEY='Cannot find row key in request.'
44
44
_ERROR_INCORRECT_TABLE_IN_BATCH='Table should be the same in a batch operations'
45
45
_ERROR_INCORRECT_PARTITION_KEY_IN_BATCH='Partition Key should be the same in a batch operations'
46
-
_ERROR_DUPLICATE_ROW_KEY_IN_BATCH='Partition Key should be the same in a batch operations'
46
+
_ERROR_DUPLICATE_ROW_KEY_IN_BATCH='Row Keys should not be the same in a batch operations'
47
47
_ERROR_BATCH_COMMIT_FAIL='Batch Commit Fail'
48
48
_ERROR_MESSAGE_NOT_PEEK_LOCKED_ON_DELETE='Message is not peek locked and cannot be deleted.'
49
49
_ERROR_MESSAGE_NOT_PEEK_LOCKED_ON_UNLOCK='Message is not peek locked and cannot be unlocked.'
50
-
_ERROR_QUEUE_NOT_FOUND='Queue is not Found'
51
-
_ERROR_TOPIC_NOT_FOUND='Topic is not Found'
50
+
_ERROR_QUEUE_NOT_FOUND='Queue was not found'
51
+
_ERROR_TOPIC_NOT_FOUND='Topic was not found'
52
52
_ERROR_CONFLICT='Conflict'
53
53
_ERROR_NOT_FOUND='Not found'
54
54
_ERROR_UNKNOWN='Unknown error (%s)'
@@ -58,6 +58,8 @@
58
58
_ERROR_VALUE_SHOULD_NOT_BE_NULL='%s should not be None.'
59
59
_ERROR_CANNOT_SERIALIZE_VALUE_TO_ENTITY='Cannot serialize the specified value (%s) to an entity. Please use an EntityProperty (which can specify custom types), int, str, bool, or datetime'
0 commit comments