diff --git a/octue/cloud/pub_sub/message_handler.py b/octue/cloud/pub_sub/message_handler.py index 8385539d7..296d35e47 100644 --- a/octue/cloud/pub_sub/message_handler.py +++ b/octue/cloud/pub_sub/message_handler.py @@ -273,6 +273,15 @@ def _extract_and_enqueue_event(self, message): self._child_sdk_version = attributes["version"] message_number = attributes["message_number"] + + if message_number in self.waiting_messages: + logger.warning( + "%r: Message with duplicate message number %d received for question %s - overwriting original message.", + self.receiving_service, + message_number, + self.question_uuid, + ) + self.waiting_messages[message_number] = event def _attempt_to_handle_waiting_messages(self): diff --git a/pyproject.toml b/pyproject.toml index 24c706077..0aed7fb40 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "octue" -version = "0.52.0" +version = "0.52.1" description = "A package providing template applications for data services, and a python SDK to the Octue API." readme = "README.md" authors = ["Marcus Lugg ", "Thomas Clark "]