SmartsquareGmbH / mqtt-starter

HiveMQ Spring Boot Starter
MIT License
15 stars 5 forks source link

How to not connect when in dev profile #6

Closed ohadlahav closed 2 years ago

ohadlahav commented 2 years ago

Hi,

Looking for elegant way to not connect to mqtt broker when in dev profile.

Thanks

deen13 commented 2 years ago

Hey,

I don't know if this addresses your problem but we @smartsquaregmbh using a local broker in the development phase which is configured in the application.properties. During the deployment the application.properties gets replaced by another one that contains the credentials for the production broker.

If that workflow don't fit your needs, please feel free to create a pull request. Please reach out to us if you have any questions on how to get started. :)

rubengees commented 2 years ago

We could also introduce a mqtt.enabled property. I have seen other libraries e.g. the keycloak one to do that.

ohadlahav commented 2 years ago

Hi,

Thanks for the quick response. I use local broker configured in application.properties. Thing is that i have a dev/test profile where i don't want to start a broker. mqtt.enable property would solve it for me.

rubengees commented 2 years ago

Released in 0.14.0!