mage-ai / mage-ai

🧙 Build, run, and manage data pipelines for integrating and transforming data.
https://www.mage.ai/
Apache License 2.0
7.39k stars 675 forks source link

Update activemq.py #5228

Closed diatco closed 6 days ago

diatco commented 1 week ago

Added heartbeats every 10 seconds for the listener in the stomp connection.

Description

Have added a heartbeat to the stomp connection : conn = stomp.Connection11([(connection_host, connection_port)], heartbeats=(10000, 10000)) This fixes the issue of the listener timing out after the default connectionTtl setting of 60 seconds. The activeMQ broker is expecting a heartbeat to make sure that the listener is alive. If none is received the connection times out after the predefined time.

How Has This Been Tested?

The change was tested by running a streaming pipeline using the activeMQ connection. Before this change the listener was shutting down after 60 seconds of listening. After the change the listener does not time out anymore.

Checklist

cc: @tommydangerous