Improve delivery acknowledgement handling
Summary
Make a number of improvements and fixes to message handling when using pull subscriptions. Also update the small amount of testing that interacts with GCP to use a dedicated separate GCP project.
Contents (#558)
Enhancements
- Increase number of questions that can be asked concurrently in
Child.ask_multipleto 32 - Make delivery acknowledgement and maximum hearbeat interval kwargs available in
Child.ask - Allow parents to start handling child responses from the first non-missed message (
n + 1) if the firstnwere missed - Add question UUID to heartbeat log messages
- Improve
PushSubscriptionCannotBePullederror message
Fixes
- Mark question as delivered on receipt of first response from child in case the delivery acknowledgement message is missed
- Stop loss of delivered question UUIDs if local metadata file does not yet exist
- Avoid message gap greater than the delivery acknowledgement timeout causing failure to receive child messages
- Allow a start time of zero in message handler
Dependencies
- Update to latest versions of
protobufandwerkzeugto avoid security issues
Operations
- Add terraform configuration for new test project
Refactoring
- Simplify nested conditional
- Minimise code within try/except block in
OrderedMessageHandler - Move message recording into
OrderedMessageHandler._handle_message - Factor out raising message handling error in message handler
- Rename
OrderedMessageHandler.received_messagestohandled_messages
Testing
- Use new URI for Strands JSON schemas in tests
- Use dedicated GCP project for testing services