1
0
mirror of https://github.com/bitwarden/server synced 2026-01-05 10:03:23 +00:00

Refactor configuration for azure queue service for events to include queue name (#6724)

* Refactor configuration for azure queue service for events to include queue name

* Address PR feedback

* Add check for queue name before writing to Azure Queue Service

* Fix file encoding (lint error)
This commit is contained in:
Brant DeBow
2025-12-15 08:49:32 -05:00
committed by GitHub
parent 99e1326039
commit ed76fe2ab6
6 changed files with 35 additions and 9 deletions

View File

@@ -91,7 +91,8 @@ public static class EventIntegrationsServiceCollectionExtensions
return services;
}
if (CoreHelpers.SettingHasValue(globalSettings.Events.ConnectionString))
if (CoreHelpers.SettingHasValue(globalSettings.Events.ConnectionString) &&
CoreHelpers.SettingHasValue(globalSettings.Events.QueueName))
{
services.TryAddSingleton<IEventWriteService, AzureQueueEventWriteService>();
return services;

View File

@@ -8,7 +8,7 @@ namespace Bit.Core.Services;
public class AzureQueueEventWriteService : AzureQueueService<IEvent>, IEventWriteService
{
public AzureQueueEventWriteService(GlobalSettings globalSettings) : base(
new QueueClient(globalSettings.Events.ConnectionString, "event"),
new QueueClient(globalSettings.Events.ConnectionString, globalSettings.Events.QueueName),
JsonHelpers.IgnoreWritingNull)
{ }