Skip to content

Fix WMQ examples (75-77) - #492

Open
mp-orkes wants to merge 3 commits into
mainfrom
fix/wmq-examples
Open

Fix WMQ examples (75-77)#492
mp-orkes wants to merge 3 commits into
mainfrom
fix/wmq-examples

Conversation

@mp-orkes

@mp-orkes mp-orkes commented Aug 14, 2026

Copy link
Copy Markdown
Contributor

Tested WMQ & Agent examples:

  • 75 — docstring claimed the agent loops forever; main() ends it with handle.stop().
  • 76stop() fired right after the last send_message, so the third task was pulled but never answered. Now waits before stopping.
  • 77 — crashed on worker spawn (no if __name__ == "__main__" guard); added it plus a Ctrl+C that stops the agent.

Ran each against a local OSS server with WMQ enabled. 76 now answers all 3 tasks (_stop_requested: true, COMPLETED); 77 echoes produced records ([le_random_topic@0] hello).

🤖 Generated with Claude Code

mp-orkes and others added 3 commits August 13, 2026 22:16
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@@ -3,11 +3,17 @@
Demonstrates:

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Image

@@ -4,10 +4,18 @@
- wait_for_message_tool with streaming: push messages in and see the agent react

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Image

continue
if msg.error():
if msg.error().code() == KafkaError._PARTITION_EOF:
def main() -> None:

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Image

@mp-orkes
mp-orkes marked this pull request as ready for review August 14, 2026 01:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant