Skip to content

Commit

Permalink
add heartbeat in stomp messaging
Browse files Browse the repository at this point in the history
  • Loading branch information
wguanicedew committed Nov 16, 2022
1 parent 56933c3 commit a3290d7
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion main/lib/idds/agents/common/plugins/messaging.py
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ def __init__(self, name="MessagingSender", **kwargs):
if not hasattr(self, 'destination'):
raise Exception('destination is required but not defined.')
if not hasattr(self, 'broker_timeout'):
self.broker_timeout = 10
self.broker_timeout = 60
else:
self.broker_timeout = int(self.broker_timeout)

Expand Down Expand Up @@ -118,6 +118,7 @@ def connect_to_messaging_brokers(self, sender=True):
conn = stomp.Connection12(host_and_ports=[(broker, port)],
vhost=self.vhost,
keepalive=True,
heartbeats=(60000, 60000), # one minute
timeout=timeout)
conns.append(conn)
return conns
Expand Down

0 comments on commit a3290d7

Please sign in to comment.