docs(mqtt-bridge): bridge does not retry when the broker is down at start

Open Beginner friendly
#808 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
78/100
Issue type
Documentation
Clarity
Clearly specified
Activity status
Active
Tech stack
node.js, typescript

Research direction

Read the mqtt-bridge README and tests/e2e/tests/08-mqtt-bridge-errors.bats, focusing on the "broker unreachable" test and the reconnectPeriod option. Confirm the documented first-connection behavior against the issue’s reported error, then update the README and E2E test so they agree. Done means the README explains whether startup retries occur and the test matches that behavior.

Written by the indexing model from the issue text.

Description

Problem

When the MQTT broker is not reachable at start, mqtt-bridge exits at once:

Error: connect ECONNREFUSED 127.0.0.1:9999

It does not retry, although there is a reconnectPeriod / --mqtt-reconnect-period option. A reader may expect the bridge to wait for the broker (for example when both start at the same time after a reboot). The current behavior is fine for a supervisor that restarts the process, but it is not written down.

Done when

  • The mqtt-bridge README says that the first connection is not retried and reconnectPeriod applies only after a successful connection (or the behavior is changed to retry, and the README says so).
  • The E2E test "broker unreachable" in tests/e2e/tests/08-mqtt-bridge-errors.bats matches the documented behavior.

Related: #766. Found while writing E2E tests for #340.

Dominant language
TypeScript
Stars
3
Forks
0
Avg merge
13h 46m
Merged PRs (30d)
58

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from groupsky/ya-modbus

All issues in groupsky/ya-modbus

Similar issues

More TypeScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.