Skip to content

Update BaseQueueHostedService to not create a IQueueClient#401

Merged
kevinwell merged 1 commit intomasterfrom
queue-worker-change
Mar 5, 2026
Merged

Update BaseQueueHostedService to not create a IQueueClient#401
kevinwell merged 1 commit intomasterfrom
queue-worker-change

Conversation

@MrSmoke
Copy link
Member

@MrSmoke MrSmoke commented Mar 4, 2026

This is a breaking change.

I've updated the BaseQueueHostedService to accept a IQueueClient via the constructor instead of creating a RabbitMQ client internally. This is so we can share IQueueClients across multiple workers to avoid creating extra connections.

Changes

  • Added IQueueClient to ctor
  • Removed all queue options from BaseQueueHostedServiceOptions
  • Removed _queueClient dispose from BaseQueueHostedService.Dispose since disposing the client is no longer up to the worker

Pull this from DI/ctor instead so we can share instances
@MrSmoke MrSmoke requested a review from kevinwell March 4, 2026 23:20
@kevinwell kevinwell merged commit 7131365 into master Mar 5, 2026
5 checks passed
@kevinwell kevinwell deleted the queue-worker-change branch March 5, 2026 12:27
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.

2 participants