StackStorm / StackStorm/st2

Add support for RabbitMQ heartbeats in st2.conf

Open
#4,780 4 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement feature HA K8s rabbitmq
Dominant language
Python
Stars
6.5k
Forks
787
PR merge metrics
No merged PRs in 30d

Description

Experiencing MQ issues with ST2 HA env where st2 services can be rescheduled/restarted/killed on a random basis which is normal in K8s. For example after some time RMQ eventually can report more then expected consumers for queues, that's undesired.

This probably means issues with st2 code and how clients are interacting with the message bus.
It's not clear if duplicated clients are in some zombie-state and actually consuming/wasting incoming messages or not.

For better work with MQ and monitoring connections, add support for RabbitMQ heartbeats setting in st2.conf. This way, clients failing to reply on heartbeat within set interval is disconnected by the server forcefully.

See https://www.rabbitmq.com/heartbeats.html

This will improve overall ST2 HA capabilities.

Contributor guide

Open the contributing guide

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.

Research direction

Start by locating st2.conf handling and the message-bus client configuration used by ST2 services. Read RabbitMQ's heartbeat documentation, then trace how connection settings reach each client. Done means a heartbeat interval can be configured in st2.conf and is applied to the relevant RabbitMQ connections, with behavior verified in the affected services.

Written by the indexing model from the issue text.

Assessment

Tech stack
python, rabbitmq
Domain
devops, distributed-systems
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
32/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.