- Support for assigning values to AWS SQS queue attributes value `VisibilityTimeout` and `RedrivePolicy` that is used to assign a queue to use a dead-letter queue after a number of failed attempts to consume a message. By default no changes will be done to the existing queue attributes and a change will only be triggered by assigning values to the `visibility_timeout` or both of `dead_letter_queue_name` + `max_receive_count` keyword arguments.
python
tomodachi.aws_sns_sqs(
topic=None,
competing=True,
queue_name=None,
filter_policy=FILTER_POLICY_DEFAULT,
visibility_timeout=VISIBILITY_TIMEOUT_DEFAULT, affects MessageVisibility
dead_letter_queue_name=DEAD_LETTER_QUEUE_DEFAULT, affects RedrivePolicy
max_receive_count=MAX_RECEIVE_COUNT_DEFAULT, affects RedrivePolicy
**kwargs,
)
- Fixes a bug where SQS messages wouldn't get deleted from the queue if a middleware function catches an exception without reraising it. This is because the `delete_message` is not called from within `routine_func` (due to the exception breaking normal control flow), but the message deletion from middleware bubble is also skipped, as no exception is propagated from it. (github: **technomunk**)
- Adds basic support for FIFO queues & topics on AWS SQS queues managed by a `tomodachi` service decorated function, which can be used where one needs guaranteed ordering of the consumed messages. (github: **kjagiello**)
- Updates to the internal `tomodachi.envelope.ProtobufBase` envelope to now also support newer versions of protobuf.
- Added documentation to describe the "magic" functions that hooks into the service lifecycle; `_start_service`, `_started_service`, `_stopping_service`, `_stop_service`.