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

Platform/pm 2535/upgrade to azure messaging servicebus #3102

Merged

Conversation

MGibson1
Copy link
Member

@MGibson1 MGibson1 commented Jul 13, 2023

Type of change

- [ ] Bug fix
- [ ] New feature development
- [x] Tech debt (refactoring, code cleanup, dependency upgrades, etc)
- [ ] Build/deploy pipeline (DevOps)
- [ ] Other

Objective

Dependency update of Microsoft.Azure.ServiceBus to Azure.Messaging.ServiceBus.

Code changes

  • launch.json: We build service bus subjects based on the value of an environment variable and the service that is running.
  • packages.lock.json/core.csproj: Remove Microsoft.Azure.ServiceBus and add Azure.Messaging.ServiceBus
  • applicationCacheHostedService / InMemoryServiceBusApplicationCache: Use the new ServiceBusClient and ServiceBusAdministrativeClient to coordinate reading/writing messages

Before you submit

  • Please check for formatting errors (dotnet format --verify-no-changes) (required)
  • If making database changes - make sure you also update Entity Framework queries and/or migrations
  • Please add unit tests where it makes sense to do so (encouraged but not required)
  • If this change requires a documentation update - notify the documentation team
  • If this change has particular deployment requirements - notify the DevOps team

@MGibson1 MGibson1 requested a review from a team July 13, 2023 20:52
@bitwarden-bot
Copy link

bitwarden-bot commented Jul 13, 2023

Logo
Checkmarx One – Scan Summary & Details3534bcd3-3474-4c3f-83f7-d8f56fef4b16

No New Or Fixed Issues Found

@MGibson1 MGibson1 marked this pull request as ready for review July 27, 2023 12:42
@MGibson1 MGibson1 requested review from a team as code owners July 27, 2023 12:42
Copy link
Contributor

@withinfocus withinfocus left a comment

Choose a reason for hiding this comment

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

I have been interested in seeing this change so this is great! Couple questions.

_topicClient = new TopicClient(globalSettings.ServiceBus.ConnectionString,
globalSettings.ServiceBus.ApplicationCacheTopicName);
_serviceBusClient = new ServiceBusClient(globalSettings.ServiceBus.ConnectionString);
_topicMessageSender = new ServiceBusClient(globalSettings.ServiceBus.ConnectionString).CreateSender(globalSettings.ServiceBus.ApplicationCacheTopicName);
Copy link
Contributor

Choose a reason for hiding this comment

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

❓ Is it safe to call CreateSender in the constructor?

Copy link
Member Author

Choose a reason for hiding this comment

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

@MGibson1 MGibson1 requested a review from withinfocus August 2, 2023 13:39
withinfocus
withinfocus previously approved these changes Aug 2, 2023
Copy link
Contributor

@withinfocus withinfocus left a comment

Choose a reason for hiding this comment

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

Only lock file updates. This is gonna help a ton of PRs though!

@MGibson1 MGibson1 merged commit a5bda60 into master Aug 7, 2023
@MGibson1 MGibson1 deleted the platform/pm-2535/upgrade-to-azure-messaging-servicebus branch August 7, 2023 13:57
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.

3 participants