-
Notifications
You must be signed in to change notification settings - Fork 4.9k
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
Use events for lock lost notification #37643
Merged
Merged
Changes from all commits
Commits
Show all changes
17 commits
Select commit
Hold shift + click to select a range
b4f24ca
Set up CI with Azure Pipelines
JoshLove-msft 8a8e4e8
Update azure-pipelines.yml for Azure Pipelines
JoshLove-msft 48634b8
Update azure-pipelines.yml for Azure Pipelines
JoshLove-msft 2de4315
Update LineCounter.csproj
JoshLove-msft 7a20ca6
Update azure-pipelines.yml for Azure Pipelines
JoshLove-msft 5281ad4
Use events for lock lost notification
JoshLove-msft 4ad80e9
docs
JoshLove-msft 007a35d
docs
JoshLove-msft a412323
PR fb
JoshLove-msft d3e621f
Fix
JoshLove-msft 43e3b1f
Ensure CT registration is disposed when callback completes
JoshLove-msft 1ca8832
Fix tests
JoshLove-msft 3fab5b5
Remove superfluous registration
JoshLove-msft ad4c059
Update sdk/servicebus/Azure.Messaging.ServiceBus/src/Processor/Proces…
JoshLove-msft 75403a5
Merge branch 'main' of https://github.com/Azure/azure-sdk-for-net
JoshLove-msft af1e7d9
Merge branch 'sb-lock-token' of https://github.com/JoshLove-msft/azur…
JoshLove-msft efd98dd
Update docs
JoshLove-msft File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
# ASP.NET Core | ||
# Build and test ASP.NET Core projects targeting .NET Core. | ||
# Add steps that run tests, create a NuGet package, deploy, and more: | ||
# https://docs.microsoft.com/azure/devops/pipelines/languages/dotnet-core | ||
|
||
trigger: | ||
- master | ||
|
||
pool: | ||
vmImage: 'ubuntu-latest' | ||
|
||
variables: | ||
buildConfiguration: 'Release' | ||
|
||
steps: | ||
- script: dotnet build samples/linecounter/LineCounter.csproj --configuration $(buildConfiguration) | ||
displayName: 'dotnet build $(buildConfiguration)' |
This file contains 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
This file contains 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
This file contains 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
36 changes: 36 additions & 0 deletions
36
sdk/servicebus/Azure.Messaging.ServiceBus/src/Processor/MessageLockLostEventArgs.cs
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
// Copyright (c) Microsoft Corporation. All rights reserved. | ||
// Licensed under the MIT License. | ||
|
||
using System; | ||
|
||
namespace Azure.Messaging.ServiceBus | ||
{ | ||
/// <summary> | ||
/// This type represents the event args relating to the message lock lost event. | ||
/// </summary> | ||
public class MessageLockLostEventArgs | ||
JoshLove-msft marked this conversation as resolved.
Show resolved
Hide resolved
|
||
{ | ||
/// <summary> | ||
/// Constructs a new <see cref="MessageLockLostEventArgs"/> instance. | ||
/// </summary> | ||
/// <param name="message">The message that the lock was lost for.</param> | ||
/// <param name="exception">The exception, if any, which led to the event being raised.</param> | ||
public MessageLockLostEventArgs(ServiceBusReceivedMessage message, Exception exception) | ||
{ | ||
Message = message; | ||
Exception = exception; | ||
} | ||
|
||
/// <summary> | ||
/// The message that the lock was lost for. | ||
/// </summary> | ||
public ServiceBusReceivedMessage Message { get; } | ||
|
||
/// <summary> | ||
/// Gets the exception, if any, which led to the event being raised. If the exception is null, | ||
/// then the event was raised due to the message lock expiring based on the | ||
/// <see cref="ServiceBusReceivedMessage.LockedUntil"/> property. | ||
/// </summary> | ||
public Exception Exception { get; } | ||
} | ||
} |
This file contains 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
This file contains 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
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@JoshLove-msft Is there a reason this pipeline yml needs to be in the root of the repo? I think it would be better in the same folder with what it will be used with.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This was a bad merge. Will revert in new PR.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
#37757