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

multiple mqtt clients using forRootAsync #5

Open
huaxiaoxuan7 opened this issue Aug 3, 2020 · 0 comments
Open

multiple mqtt clients using forRootAsync #5

huaxiaoxuan7 opened this issue Aug 3, 2020 · 0 comments

Comments

@huaxiaoxuan7
Copy link

Hi there!

In my project I am using more than one mqtt clients, each client is created by one specific module. It works fine when I'm using forRoot method.

However, when I switched to forRootAsync method, only the first module worked, other clients did not init. I tried to load the modules dynamically, but I got the same result. Where could be wrong?

In my app.module.ts:

@Module({
  imports: [
    ConfigModule.forRoot({
      isGlobal: true,
      expandVariables: true,
    }),
    Module1,
    Module2,
    Module3,
    Module4
  ]
})

Only Module1 worked.

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

No branches or pull requests

1 participant