Closed tofu-rocketry closed 3 years ago
Would need to change ack='auto'
to ack='client'
for listener in start_connection
, and send ack messages for those received (probably) in on_message
.
This won't be changed now we're migrating to AMS.
For archival reference. Changes to on_message
were to add something like:
try:
ack_id = headers['ack']
log.debug("Sending acknowledgment for message with id %s", ack_id)
self._conn.ack({'id': ack_id})
except KeyError:
log.warn("Unable to acknowledge message - "
"No ack header received for ID = %s", empaid)
And in start_connection
: self._conn.subscribe(destination=self._listen, id=1, ack='client')
As mentioned in this GGUS ticket, STOMP clients usually default to auto acknowledgement, when, for reliability, we should be using client mode.
See ticket for details and suggestions.