Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Jan 29, 2026

PR #1031 tests batched producing only to apricots (cluster1). To demonstrate the mesh filter's key behavior—splitting batched ProduceRequests across upstream clusters—add testing for a second topic routed to cluster2.

Changes

  • example.rst: Extended Step 8 with blueberries topic example showing 20 batched messages to cluster2
  • verify.sh: Added test sending 20 messages to blueberries, verifying all arrive at cluster2

Matches coverage of upstream test_producing_with_batched_records which validates cross-cluster batching with apricots → cluster1 and berries → cluster2.

Original prompt

Enhancement to PR #1031

The current PR #1031 adds documentation and tests for high-volume batched producing, but only tests sending to one topic (apricots → cluster1).

To fully cover the mesh filter's key behavior—splitting batched ProduceRequests across different upstream clusters—we need to also document and test sending batched messages to a second topic routed to a different cluster.

What to Add

1. kafka-mesh/example.rst - Extend Step 8

After the existing apricots example, add documentation showing:

  • Sending 20 messages rapidly to a b-prefixed topic (e.g., blueberries) which routes to cluster2
  • Consuming from cluster2 to verify all 20 messages arrived
  • Explanation that this demonstrates the mesh filter correctly splitting batched requests by destination cluster

2. kafka-mesh/verify.sh - Add second topic test

After the existing apricots test, add:

  • Send 20 messages to blueberries topic
  • Consume from cluster2 and verify count is 20
  • Assert success

Context

This is needed to match the coverage of the original envoy integration test test_producing_with_batched_records which sends 100 messages each to two topics (apricots → cluster1, berries → cluster2) with batching enabled, verifying both are correctly routed.

Files to Modify

  1. kafka-mesh/example.rst - Extend the new Step 8 section
  2. kafka-mesh/verify.sh - Add test for second topic/cluster

Style

Follow the existing patterns in the PR - use the same bash loop style, same verification approach, same doc formatting.

This pull request was created from Copilot chat.


💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

Co-authored-by: phlax <454682+phlax@users.noreply.github.com>
Copilot AI changed the title [WIP] Enhance documentation and tests for multi-cluster batched requests kafka-mesh: Add second cluster batching test (blueberries → cluster2) Jan 29, 2026
Copilot AI requested a review from phlax January 29, 2026 19:41
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.

2 participants