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
Copy file name to clipboardExpand all lines: articles/service-bus-messaging/message-transfers-locks-settlement.md
+11-12Lines changed: 11 additions & 12 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -34,10 +34,10 @@ If the application produces bursts of messages, illustrated here with a plain lo
34
34
With an assumed 70-millisecond Transmission Control Protocol (TCP) roundtrip latency distance from an on-premises site to Service Bus and giving just 10 ms for Service Bus to accept and store each message, the following loop takes up at least 8 seconds, not counting payload transfer time or potential route congestion effects:
35
35
36
36
```csharp
37
-
for (inti=0; i<100; i++)
37
+
for (inti=0; i<10; i++)
38
38
{
39
-
// creating the message omitted for brevity
40
-
awaitclient.SendAsync(…);
39
+
// creating the message omitted for brevity
40
+
awaitsender.SendMessageAsync(message);
41
41
}
42
42
```
43
43
@@ -47,9 +47,9 @@ With the same assumptions as for the prior loop, the total overlapped execution
47
47
48
48
```csharp
49
49
vartasks=newList<Task>();
50
-
for (inti=0; i<100; i++)
50
+
for (inti=0; i<10; i++)
51
51
{
52
-
tasks.Add(client.SendAsync(…));
52
+
tasks.Add(sender.SendMessageAsync(message));
53
53
}
54
54
awaitTask.WhenAll(tasks);
55
55
```
@@ -62,26 +62,25 @@ Semaphores, as shown in the following code snippet in C#, are synchronization ob
Applications should **never** initiate an asynchronous send operation in a "fire and forget" manner without retrieving the outcome of the operation. Doing so can load the internal and invisible task queue up to memory exhaustion, and prevent the application from detecting send errors:
75
75
76
76
```csharp
77
-
for (inti=0; i<100; i++)
77
+
for (inti=0; i<10; i++)
78
78
{
79
-
80
-
client.SendAsync(message); // DON’T DO THIS
79
+
sender.SendMessageAsync(message); // DON’T DO THIS
81
80
}
82
81
```
83
82
84
-
With a low-level AMQP client, Service Bus also accepts "pre-settled" transfers. A pre-settled transfer is a fire-and-forget operation for which the outcome, either way, isn't reported back to the client and the message is considered settled when sent. The lack of feedback to the client also means that there's no actionable data available for diagnostics, which means that this mode doesn't qualify for help via Azure support.
83
+
With a low-level AMQP client, Service Bus also accepts "presettled" transfers. A presettled transfer is a fire-and-forget operation for which the outcome, either way, isn't reported back to the client and the message is considered settled when sent. The lack of feedback to the client also means that there's no actionable data available for diagnostics, which means that this mode doesn't qualify for help via Azure support.
0 commit comments