NatsListener currently retries indefinitely (correct for daemon startup). However, callers in test harnesses or short-lived processes need a way to bound retries. Add an optional max_attempts: std::optional<uint32_t> = std::nullopt field to NatsListener::Config. When set, throw std::runtime_error after exceeding the limit rather than looping forever. This makes the class usable outside daemon contexts without changing the default behaviour.
Follow-up from #139
NatsListener currently retries indefinitely (correct for daemon startup). However, callers in test harnesses or short-lived processes need a way to bound retries. Add an optional
max_attempts: std::optional<uint32_t> = std::nulloptfield to NatsListener::Config. When set, throw std::runtime_error after exceeding the limit rather than looping forever. This makes the class usable outside daemon contexts without changing the default behaviour.Follow-up from #139