Skip to content

Fix dependency lifetime issue in PingPong sample projects#1445

Merged
jeremydmiller merged 1 commit intoJasperFx:mainfrom
hamedsabzian:main
May 27, 2025
Merged

Fix dependency lifetime issue in PingPong sample projects#1445
jeremydmiller merged 1 commit intoJasperFx:mainfrom
hamedsabzian:main

Conversation

@hamedsabzian
Copy link
Contributor

@hamedsabzian hamedsabzian commented May 24, 2025

Issues:

  • IMessageBus is registered with the scoped lifetime. But it is used in the background services as a constructor parameter. Only the singleton dependencies can be injected directly into the background services.
  • It seems that setting options.ApplicationAssembly is required. Without it, the message handlers are not found in the consumer applications.

@jeremydmiller
Copy link
Member

@hamedsabzian Good catch. That wasn't an issue when we depended on Lamar

@jeremydmiller jeremydmiller merged commit 09725d7 into JasperFx:main May 27, 2025
1 check passed
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