Skip to content

refactor: App on startup to conditionally start mqtt publisher #57

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

Merged
merged 2 commits into from
Aug 4, 2025

Conversation

naqvis
Copy link
Contributor

@naqvis naqvis commented Jul 23, 2025

No description provided.

Copy link
Member

@stakach stakach left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we should continue to launch the MQTT broker - as publish is a no-op if there are no MQTT destinations configured.

Then we probably add a bound on this channel, limit it to 1000 queued messages: Channel(Message).new(1000)
https://github.com/PlaceOS/source/blob/master/src/source/publishing/publisher.cr#L13

Then we should launch the publishers in parallel for processing
https://crystal-lang.org/api/1.17.0/Fiber/ExecutionContext/Parallel.html

Copy link
Member

@stakach stakach left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Copy link
Member

@stakach stakach left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@stakach stakach merged commit 4e0e057 into master Aug 4, 2025
9 of 11 checks passed
@stakach stakach deleted the refactor/publisher branch August 4, 2025 00:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants