Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enable a way to Unregister Message Handler and Session Handler #14021

Merged
merged 23 commits into from
Sep 10, 2020
Merged
Changes from 1 commit
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
8c46a41
add UnregisterMessageHandler method
DorothySun216 Aug 6, 2020
db9b322
Update sdk/servicebus/Microsoft.Azure.ServiceBus/src/Core/IReceiverCl…
DorothySun216 Aug 10, 2020
da77a24
Update sdk/servicebus/Microsoft.Azure.ServiceBus/src/Core/MessageRece…
DorothySun216 Aug 10, 2020
5e1576a
Update the unregister method to be async and await for inflight opera…
DorothySun216 Aug 13, 2020
61f0998
Update sdk/servicebus/Microsoft.Azure.ServiceBus/src/SubscriptionClie…
DorothySun216 Aug 13, 2020
2988d02
Update sdk/servicebus/Microsoft.Azure.ServiceBus/src/Core/MessageRece…
DorothySun216 Aug 13, 2020
d3faba2
Update sdk/servicebus/Microsoft.Azure.ServiceBus/src/QueueClient.cs
DorothySun216 Aug 13, 2020
4b921a6
Change name to have async suffix and add to existing onMessageQueueTests
DorothySun216 Aug 13, 2020
78aff54
Add UnregisterSessionHandlerAsync and corresponding tests
DorothySun216 Aug 13, 2020
25f6b8d
nit
DorothySun216 Aug 13, 2020
d4a5589
nit
DorothySun216 Aug 13, 2020
ecd820b
Merge branch 'master' of https://github.com/Azure/azure-sdk-for-net i…
DorothySun216 Aug 20, 2020
cd8f044
Add a new cancellation type to not cancel inflight message handling o…
DorothySun216 Aug 23, 2020
fff0016
Add another type of cancellation token to session handler path
DorothySun216 Aug 24, 2020
fae7bf1
nit
DorothySun216 Aug 24, 2020
642dc36
Add a timeout parameter to unregister functions and add according uni…
DorothySun216 Sep 4, 2020
ffc4249
nit
DorothySun216 Sep 4, 2020
fbd31d0
cancel runningTaskCancellationTokenSource after unregister is done
DorothySun216 Sep 4, 2020
f4dac4b
change public API
DorothySun216 Sep 9, 2020
9692122
update the API header
DorothySun216 Sep 9, 2020
7741ad9
update the API definition
DorothySun216 Sep 10, 2020
2bb96a5
fix spacing
DorothySun216 Sep 10, 2020
c0ec74a
fix ApproveAzureServiceBus CIT test
DorothySun216 Sep 10, 2020
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
update the API definition
  • Loading branch information
DorothySun216 committed Sep 10, 2020
commit 7741ad954d29a9694ab34dbf5a40ef1a5d24f7eb
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ namespace Microsoft.Azure.ServiceBus
string QueueName { get; }
void RegisterSessionHandler(System.Func<Microsoft.Azure.ServiceBus.IMessageSession, Microsoft.Azure.ServiceBus.Message, System.Threading.CancellationToken, System.Threading.Tasks.Task> handler, Microsoft.Azure.ServiceBus.SessionHandlerOptions sessionHandlerOptions);
void RegisterSessionHandler(System.Func<Microsoft.Azure.ServiceBus.IMessageSession, Microsoft.Azure.ServiceBus.Message, System.Threading.CancellationToken, System.Threading.Tasks.Task> handler, System.Func<Microsoft.Azure.ServiceBus.ExceptionReceivedEventArgs, System.Threading.Tasks.Task> exceptionReceivedHandler);
Task UnregisterSessionHandlerAsync(System.TimeSpan inflightSessionHandlerTasksWaitTimeout);
System.Threading.Tasks.Task UnregisterSessionHandlerAsync(System.TimeSpan inflightSessionHandlerTasksWaitTimeout);
}
public interface ISessionClient : Microsoft.Azure.ServiceBus.IClientEntity
{
Expand All @@ -132,7 +132,7 @@ namespace Microsoft.Azure.ServiceBus
System.Threading.Tasks.Task<System.Collections.Generic.IEnumerable<Microsoft.Azure.ServiceBus.RuleDescription>> GetRulesAsync();
void RegisterSessionHandler(System.Func<Microsoft.Azure.ServiceBus.IMessageSession, Microsoft.Azure.ServiceBus.Message, System.Threading.CancellationToken, System.Threading.Tasks.Task> handler, Microsoft.Azure.ServiceBus.SessionHandlerOptions sessionHandlerOptions);
void RegisterSessionHandler(System.Func<Microsoft.Azure.ServiceBus.IMessageSession, Microsoft.Azure.ServiceBus.Message, System.Threading.CancellationToken, System.Threading.Tasks.Task> handler, System.Func<Microsoft.Azure.ServiceBus.ExceptionReceivedEventArgs, System.Threading.Tasks.Task> exceptionReceivedHandler);
Task UnregisterSessionHandlerAsync(System.TimeSpan inflightSessionHandlerTasksWaitTimeout);
System.Threading.Tasks.Task UnregisterSessionHandlerAsync(System.TimeSpan inflightSessionHandlerTasksWaitTimeout);
System.Threading.Tasks.Task RemoveRuleAsync(string ruleName);
}
public interface ITopicClient : Microsoft.Azure.ServiceBus.Core.ISenderClient, Microsoft.Azure.ServiceBus.IClientEntity
Expand Down Expand Up @@ -237,11 +237,11 @@ namespace Microsoft.Azure.ServiceBus
protected override System.Threading.Tasks.Task OnClosingAsync() { }
public void RegisterMessageHandler(System.Func<Microsoft.Azure.ServiceBus.Message, System.Threading.CancellationToken, System.Threading.Tasks.Task> handler, Microsoft.Azure.ServiceBus.MessageHandlerOptions messageHandlerOptions) { }
public void RegisterMessageHandler(System.Func<Microsoft.Azure.ServiceBus.Message, System.Threading.CancellationToken, System.Threading.Tasks.Task> handler, System.Func<Microsoft.Azure.ServiceBus.ExceptionReceivedEventArgs, System.Threading.Tasks.Task> exceptionReceivedHandler) { }
public async Task UnregisterMessageHandlerAsync(System.TimeSpan inflightMessageHandlerTasksWaitTimeout) { }
public System.Threading.Tasks.Task UnregisterMessageHandlerAsync(System.TimeSpan inflightMessageHandlerTasksWaitTimeout) { }
public override void RegisterPlugin(Microsoft.Azure.ServiceBus.Core.ServiceBusPlugin serviceBusPlugin) { }
public void RegisterSessionHandler(System.Func<Microsoft.Azure.ServiceBus.IMessageSession, Microsoft.Azure.ServiceBus.Message, System.Threading.CancellationToken, System.Threading.Tasks.Task> handler, Microsoft.Azure.ServiceBus.SessionHandlerOptions sessionHandlerOptions) { }
public void RegisterSessionHandler(System.Func<Microsoft.Azure.ServiceBus.IMessageSession, Microsoft.Azure.ServiceBus.Message, System.Threading.CancellationToken, System.Threading.Tasks.Task> handler, System.Func<Microsoft.Azure.ServiceBus.ExceptionReceivedEventArgs, System.Threading.Tasks.Task> exceptionReceivedHandler) { }
public async Task UnregisterSessionHandlerAsync(System.TimeSpan inflightSessionHandlerTasksWaitTimeout) { }
public System.Threading.Tasks.Task UnregisterSessionHandlerAsync(System.TimeSpan inflightSessionHandlerTasksWaitTimeout) { }
public System.Threading.Tasks.Task<long> ScheduleMessageAsync(Microsoft.Azure.ServiceBus.Message message, System.DateTimeOffset scheduleEnqueueTimeUtc) { }
public System.Threading.Tasks.Task SendAsync(Microsoft.Azure.ServiceBus.Message message) { }
public System.Threading.Tasks.Task SendAsync(System.Collections.Generic.IList<Microsoft.Azure.ServiceBus.Message> messageList) { }
Expand Down Expand Up @@ -455,11 +455,11 @@ namespace Microsoft.Azure.ServiceBus
protected override System.Threading.Tasks.Task OnClosingAsync() { }
public void RegisterMessageHandler(System.Func<Microsoft.Azure.ServiceBus.Message, System.Threading.CancellationToken, System.Threading.Tasks.Task> handler, Microsoft.Azure.ServiceBus.MessageHandlerOptions messageHandlerOptions) { }
public void RegisterMessageHandler(System.Func<Microsoft.Azure.ServiceBus.Message, System.Threading.CancellationToken, System.Threading.Tasks.Task> handler, System.Func<Microsoft.Azure.ServiceBus.ExceptionReceivedEventArgs, System.Threading.Tasks.Task> exceptionReceivedHandler) { }
public async Task UnregisterMessageHandlerAsync(System.TimeSpan inflightMessageHandlerTasksWaitTimeout) { }
public System.Threading.Tasks.Task UnregisterMessageHandlerAsync(System.TimeSpan inflightMessageHandlerTasksWaitTimeout) { }
public override void RegisterPlugin(Microsoft.Azure.ServiceBus.Core.ServiceBusPlugin serviceBusPlugin) { }
public void RegisterSessionHandler(System.Func<Microsoft.Azure.ServiceBus.IMessageSession, Microsoft.Azure.ServiceBus.Message, System.Threading.CancellationToken, System.Threading.Tasks.Task> handler, Microsoft.Azure.ServiceBus.SessionHandlerOptions sessionHandlerOptions) { }
public void RegisterSessionHandler(System.Func<Microsoft.Azure.ServiceBus.IMessageSession, Microsoft.Azure.ServiceBus.Message, System.Threading.CancellationToken, System.Threading.Tasks.Task> handler, System.Func<Microsoft.Azure.ServiceBus.ExceptionReceivedEventArgs, System.Threading.Tasks.Task> exceptionReceivedHandler) { }
public async Task UnregisterSessionHandlerAsync(System.TimeSpan inflightSessionHandlerTasksWaitTimeout) { }
public System.Threading.Tasks.Task UnregisterSessionHandlerAsync(System.TimeSpan inflightSessionHandlerTasksWaitTimeout) { }
public System.Threading.Tasks.Task RemoveRuleAsync(string ruleName) { }
public override void UnregisterPlugin(string serviceBusPluginName) { }
}
Expand Down Expand Up @@ -534,7 +534,7 @@ namespace Microsoft.Azure.ServiceBus.Core
System.Threading.Tasks.Task DeadLetterAsync(string lockToken, string deadLetterReason, string deadLetterErrorDescription = null);
void RegisterMessageHandler(System.Func<Microsoft.Azure.ServiceBus.Message, System.Threading.CancellationToken, System.Threading.Tasks.Task> handler, Microsoft.Azure.ServiceBus.MessageHandlerOptions messageHandlerOptions);
void RegisterMessageHandler(System.Func<Microsoft.Azure.ServiceBus.Message, System.Threading.CancellationToken, System.Threading.Tasks.Task> handler, System.Func<Microsoft.Azure.ServiceBus.ExceptionReceivedEventArgs, System.Threading.Tasks.Task> exceptionReceivedHandler);
Task UnregisterMessageHandlerAsync(System.TimeSpan inflightMessageHandlerTasksWaitTimeout);
System.Threading.Tasks.Task UnregisterMessageHandlerAsync(System.TimeSpan inflightMessageHandlerTasksWaitTimeout);
}
public interface ISenderClient : Microsoft.Azure.ServiceBus.IClientEntity
{
Expand Down Expand Up @@ -584,7 +584,7 @@ namespace Microsoft.Azure.ServiceBus.Core
public System.Threading.Tasks.Task<Microsoft.Azure.ServiceBus.Message> ReceiveDeferredMessageAsync(long sequenceNumber) { }
public void RegisterMessageHandler(System.Func<Microsoft.Azure.ServiceBus.Message, System.Threading.CancellationToken, System.Threading.Tasks.Task> handler, Microsoft.Azure.ServiceBus.MessageHandlerOptions messageHandlerOptions) { }
public void RegisterMessageHandler(System.Func<Microsoft.Azure.ServiceBus.Message, System.Threading.CancellationToken, System.Threading.Tasks.Task> handler, System.Func<Microsoft.Azure.ServiceBus.ExceptionReceivedEventArgs, System.Threading.Tasks.Task> exceptionReceivedHandler) { }
public async Task UnregisterMessageHandlerAsync(System.TimeSpan inflightMessageHandlerTasksWaitTimeout) { }
public System.Threading.Tasks.Task UnregisterMessageHandlerAsync(System.TimeSpan inflightMessageHandlerTasksWaitTimeout) { }
public override void RegisterPlugin(Microsoft.Azure.ServiceBus.Core.ServiceBusPlugin serviceBusPlugin) { }
public System.Threading.Tasks.Task RenewLockAsync(Microsoft.Azure.ServiceBus.Message message) { }
public System.Threading.Tasks.Task<System.DateTime> RenewLockAsync(string lockToken) { }
Expand Down