Conversation
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…a lightpush publish Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Migrate old experiment with filter, lightpush and store nodes with filter and lightpush clients in one network, publishing over relay and lightpush to python.
AlbertoSoutullo
requested changes
Sep 29, 2026
Comment on lines
+235
to
+268
| async def _publish_loop(self, cluster_id: int): | ||
| if not self.config.protocols: | ||
| raise ValueError("No protocols to publish with.") | ||
|
|
||
| self.log_event("start_messages") | ||
| tasks = [] | ||
| for message_index in range(0, self.config.num_messages): | ||
| protocol = self.config.protocols[message_index % len(self.config.protocols)] | ||
| name, num_nodes, service = self._publish_target(protocol) | ||
| pod_name = f"{name}-{random.randint(0, num_nodes - 1)}" | ||
| self.log_event( | ||
| { | ||
| "event": "publish", | ||
| "protocol": protocol, | ||
| "node": pod_name, | ||
| "message_index": message_index, | ||
| } | ||
| ) | ||
| tasks.append( | ||
| asyncio.create_task( | ||
| publish( | ||
| protocol, | ||
| self.namespace, | ||
| pod_name, | ||
| service, | ||
| self.config.msg_size_kbytes, | ||
| cluster_id, | ||
| self.config.content_topic, | ||
| ) | ||
| ) | ||
| ) | ||
| await asyncio.sleep(self.config.delay_after_publish) | ||
| await asyncio.gather(*tasks) | ||
| self.log_event("publisher_messages_finished") |
Collaborator
There was a problem hiding this comment.
publish() catches every exception and returns normally. This means a run where every relay/lightpush request fails can still look complete and ok. The analyzer expects num_messages messages, but there is no failure event or returned status to distinguish successful from failed publishes.
Contributor
Author
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Reads every store node's archive before teardown and checks it against the messages relay delivered.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds builder methods for filter and lightpush servers and edge clients, a lightpush publish through the publisher, and redacts message payloads in the publisher's logs. Stacked on #413.
Related to #374