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 Sender Failover #223

Merged
merged 4 commits into from
May 8, 2024
Merged

Enable Sender Failover #223

merged 4 commits into from
May 8, 2024

Conversation

karenychen
Copy link
Contributor

Enable shuttle.Sender to failover to a new AzServiceBusSender. Caller can initiate the failover by calling sender.FailOver()

@coveralls
Copy link
Collaborator

coveralls commented Apr 24, 2024

Pull Request Test Coverage Report for Build 8996619862

Details

  • 25 of 25 (100.0%) changed or added relevant lines in 1 file are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage increased (+0.7%) to 87.627%

Totals Coverage Status
Change from base Build 8996293284: 0.7%
Covered Lines: 779
Relevant Lines: 889

💛 - Coveralls

@karenychen karenychen marked this pull request as ready for review April 25, 2024 00:33
v2/sender.go Outdated Show resolved Hide resolved
v2/sender.go Show resolved Hide resolved
v2/sender.go Outdated Show resolved Hide resolved
v2/sender.go Show resolved Hide resolved
v2/sender.go Outdated Show resolved Hide resolved
v2/sender.go Show resolved Hide resolved
@serbrech
Copy link
Member

serbrech commented May 7, 2024

Here is an interesting alternative implementation that has pros an cons.
you can reduce the scope of the lock, the number of places that have to care about a lock, at the cost of introducing a channel.
that allows you to control when you effectively attempts a send, and interleave the swap.

I think that the mutex is a good choice in this case though. but I'm curious about how the 2 implementation would differ :)

v2/sender_test.go Outdated Show resolved Hide resolved
v2/sender.go Outdated Show resolved Hide resolved
Copy link
Member

@serbrech serbrech left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚀 !

@serbrech serbrech force-pushed the karenchen/sender-failover branch from ec00f0b to 8702ab6 Compare May 8, 2024 05:12
@serbrech serbrech merged commit 7206dc3 into main May 8, 2024
5 checks passed
@serbrech serbrech deleted the karenchen/sender-failover branch May 8, 2024 05:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants