apel / ssm

Secure STOMP Messenger.
apel.github.io
Apache License 2.0
11 stars 24 forks source link

Ack type needs changing #28

Closed tofu-rocketry closed 3 years ago

tofu-rocketry commented 9 years ago

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.

tofu-rocketry commented 9 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.

tofu-rocketry commented 3 years ago

This won't be changed now we're migrating to AMS.

tofu-rocketry commented 3 years ago

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')