Skip to content

Improve Kafka and RabbitMQ event integration guides and standardize artifact creation steps#549

Open
LakshanWeerasinghe wants to merge 7 commits into
wso2:mainfrom
LakshanWeerasinghe:impr-event
Open

Improve Kafka and RabbitMQ event integration guides and standardize artifact creation steps#549
LakshanWeerasinghe wants to merge 7 commits into
wso2:mainfrom
LakshanWeerasinghe:impr-event

Conversation

@LakshanWeerasinghe

@LakshanWeerasinghe LakshanWeerasinghe commented Jun 22, 2026

Copy link
Copy Markdown
Contributor

Description

Summary

This PR improves the event integration documentation and standardizes the
"create artifact" workflow across service and event pages. The largest changes
are substantial rewrites of the Kafka and RabbitMQ guides, which now cover
service creation, listener configuration, event handlers, and error handling
patterns in full. Smaller consistency fixes are applied across the remaining
artifact pages and the sidebar.

What changed

Kafka and RabbitMQ guides (major rewrite)

  • Reframed around creating a service (listener + event handlers) rather than
    just a listener.
  • Added complete Listener configuration fields reference tables.
  • Documented the onConsumerRecord and onError event handlers, including
    typed payload binding, record metadata access, and validation/seek behavior.
  • Added error-handling patterns and updated Ballerina code samples to match the
    current API.
  • Added the Kafka handler-config.png image.

Standardized artifact creation steps

  • Added a consistent first step — "Open your integration in WSO2 Integrator
    IDE. If you don't have an integration yet, see Create a new integration..."

    and renumbered subsequent steps across: automation, http, graphql,
    tcp, kafka, rabbitmq, mqtt, solace, twilio, and the CDC/Azure/
    Salesforce/GitHub event pages.

HTTP service page

  • Converted ### subheadings under the Ballerina Code tab to bold labels to fix
    sub-section navigation/anchor issues.

Navigation and titles

  • Renamed sidebar categories: Event-Driven IntegrationEvent Integration,
    File-Driven IntegrationFile Integration.
  • Updated the matching get-started page titles and headings to align with the
    new naming.

Summary by CodeRabbit

  • Documentation
    • Updated service and event integration guides with clearer, reorganized step-by-step creation instructions for improved user navigation.
    • Enhanced Kafka and RabbitMQ event integration documentation with expanded configuration details, handler examples, and typed message handling guidance.
    • Rebranded quick-start guides: "Event-Driven Integration" and "File-Driven Integration" are now "Event Integration" and "File Integration."
    • Updated sidebar navigation labels to reflect new naming conventions.

@coderabbitai

coderabbitai Bot commented Jun 22, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

Warning

Review limit reached

@LakshanWeerasinghe, we couldn't start this review because you've reached your PR review rate limit.

More reviews will be available in 55 minutes and 53 seconds. Learn how PR review limits work.

Your organization has run out of usage credits. Purchase more credits in the billing tab to continue.

⌛ How to resolve this issue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based credits.

🚦 How do rate limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan refill rate.

For paid Pro and Pro+ PR reviews, CodeRabbit uses rolling per-developer review limits. Reviews become available again as older review attempts age out of the rolling limit window.

Please see our Fair Usage Limits Policy for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 529ca738-6cff-4a53-8483-f0b8b7a2ef98

📥 Commits

Reviewing files that changed from the base of the PR and between bd838da and 343ddc4.

📒 Files selected for processing (8)
  • en/docs/develop/integration-artifacts/event/azure-service-bus.md
  • en/docs/develop/integration-artifacts/event/github-webhooks.md
  • en/docs/develop/integration-artifacts/event/kafka.md
  • en/docs/develop/integration-artifacts/event/rabbitmq.md
  • en/docs/develop/integration-artifacts/event/salesforce-events.md
  • en/docs/develop/integration-artifacts/service/graphql.md
  • en/docs/develop/integration-artifacts/service/tcp.md
  • en/sidebars.ts
📝 Walkthrough

Walkthrough

Documentation updates across WSO2 Integrator IDE artifact pages: the sidebar and two get-started pages rename "Event-Driven Integration" and "File-Driven Integration" to shorter forms. All artifact creation walkthroughs gain a new initial "open integration" step. Kafka and RabbitMQ event pages are substantially rewritten. HTTP service subsection headings are reformatted to bold text.

Changes

Terminology Rename

Layer / File(s) Summary
Sidebar and page title renames
en/sidebars.ts, en/docs/get-started/build-event-driven-integration.md, en/docs/get-started/build-file-driven-integration.md
Sidebar category labels, frontmatter title values, and H1 headings are changed from "Event-Driven Integration" / "File-Driven Integration" to "Event Integration" / "File Integration".

Documentation Content Updates

Layer / File(s) Summary
Add initial 'open integration' step across artifact creation pages
en/docs/develop/integration-artifacts/automation.md, en/docs/develop/integration-artifacts/event/azure-service-bus.md, en/docs/develop/integration-artifacts/event/cdc-mssql.md, en/docs/develop/integration-artifacts/event/cdc-postgresql.md, en/docs/develop/integration-artifacts/event/github-webhooks.md, en/docs/develop/integration-artifacts/event/mqtt.md, en/docs/develop/integration-artifacts/event/salesforce-events.md, en/docs/develop/integration-artifacts/event/solace.md, en/docs/develop/integration-artifacts/event/twilio.md, en/docs/develop/integration-artifacts/service/graphql.md, en/docs/develop/integration-artifacts/service/http.md, en/docs/develop/integration-artifacts/service/tcp.md
Every artifact creation walkthrough gains a new step 1 ("open your integration in WSO2 Integrator IDE"), with all subsequent steps renumbered accordingly.
Kafka documentation rewrite
en/docs/develop/integration-artifacts/event/kafka.md
Overview, creation section, and frontmatter replaced to reflect Kafka services and typed event handling. Listener configuration gains a full kafka:ConsumerConfiguration fields table. onConsumerRecord is documented with typed payload binding (Order[]) and kafka:AnydataConsumerRecord[] for metadata access including manual offset management via kafka:Caller. onError is documented with PayloadBindingError/PayloadValidationError branching, autoSeekOnValidationFailure: false flag, and caller->seek(offset + 1) pattern. What's next links updated.
RabbitMQ documentation rewrite
en/docs/develop/integration-artifacts/event/rabbitmq.md
Page intro, initial code narrative, and all handler sections are rewritten. queueName changes from "myQueue" to "orders". Service configuration gains autoAck: false and queue declaration properties (durable, autoDelete). onMessage example updated to use ensureType() and caller->basicAck(). onRequest section added with replyTo-based request/response example. onError section and AnydataMessage field reference refreshed. What's next links updated.
HTTP service: convert subsection headings to bold text labels
en/docs/develop/integration-artifacts/service/http.md
Listener, routing, parameter binding, response handling, and error-handling subsection headings throughout the HTTP service page are converted from markdown heading syntax (### ...) to bold text labels (**...**); all body text and code examples are unchanged.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~15 minutes

Poem

🐰 Hop, hop, the docs have grown,
New steps to open integrations shown!
Kafka and Rabbit got a thorough refine,
Bold labels replaced headings in a line.
"Driven" was dropped — just "Integration" now,
The warren of docs takes a tidy bow! 🌿

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 inconclusive)

Check name Status Explanation Resolution
Description check ❓ Inconclusive The PR description provides a comprehensive overview of changes including a detailed summary section, what changed breakdown, and objectives. However, it does not follow the required template structure with sections like Purpose, Goals, Approach, Release note, etc. Consider restructuring the description to follow the repository's template with explicit sections: Purpose/Goals, Approach, Release note, Documentation, and other required sections for consistency.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The PR title clearly and concisely summarizes the main changes: improving Kafka and RabbitMQ guides and standardizing artifact creation steps across multiple pages.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Actionable comments posted: 3

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (2)
en/docs/develop/integration-artifacts/event/azure-service-bus.md (1)

36-42: ⚠️ Potential issue | 🔴 Critical | ⚡ Quick win

Fix duplicate step numbering in the artifact creation flow.

Lines 36 and 38 both start with step "5." The sequence should read:

  • Step 5: Click Create
  • Step 6: WSO2 Integrator opens the service in the Service Designer...
  • Step 7: Click + Add Handler to add event handlers.
🔢 Proposed fix for step numbering
5. Click **Create**.

-5. WSO2 Integrator opens the service in the **Service Designer**. The canvas shows the attached listener pill and the **Event Handlers** section.
+6. WSO2 Integrator opens the service in the **Service Designer**. The canvas shows the attached listener pill and the **Event Handlers** section.

   ![Service Designer showing the Azure Service Bus service canvas](/img/develop/integration-artifacts/event/azure-service-bus/step-service-designer.png)

-6. Click **+ Add Handler** to add event handlers.
+7. Click **+ Add Handler** to add event handlers.
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@en/docs/develop/integration-artifacts/event/azure-service-bus.md` around
lines 36 - 42, The markdown document has duplicate step numbering where both the
"Click **Create**" step and the "WSO2 Integrator opens the service in the
**Service Designer**" step are numbered as step 5. Fix this by renumbering the
second step (WSO2 Integrator opens the service...) from 5 to 6, and then update
the final step (Click **+ Add Handler** to add event handlers) from 6 to 7 to
maintain the correct sequential order throughout the artifact creation flow.
en/docs/develop/integration-artifacts/service/graphql.md (1)

53-60: ⚠️ Potential issue | 🔴 Critical | ⚡ Quick win

Duplicate step number: Step 6 appears twice; steps 7+ are mis-numbered.

Line 55 (newly renumbered) correctly sets step 6 as "WSO2 Integrator opens the service in the GraphQL diagram...". However, line 59 still has the old step 6 label for "Select + Create Operations", and line 60 is labeled step 7. After the step insertion, these should be steps 7 and 8.

🔧 Proposed fix
6. WSO2 Integrator opens the service in the **GraphQL diagram**, an interactive canvas where you define types, fields, and resolvers. The diagram shows the service card labeled with the base path (for example, `/graphql`) and a **+ Create Operations** button. Use the **Configure** button at the top right to edit service and listener settings, and the toolbar at the bottom left to zoom, fit, refresh, or export the diagram.

   ![GraphQL diagram canvas](/img/develop/integration-artifacts/service/graphql-service/step-graphql-diagram.png)

-6. Select **+ Create Operations** on the service card to add a **Query**, **Mutation**, or **Subscription** field.
-7. Select the field row to open the **flow designer** and define the resolver logic.
+7. Select **+ Create Operations** on the service card to add a **Query**, **Mutation**, or **Subscription** field.
+8. Select the field row to open the **flow designer** and define the resolver logic.
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@en/docs/develop/integration-artifacts/service/graphql.md` around lines 53 -
60, The documentation has duplicate step numbering where step 6 is listed twice.
The first instance at the beginning of the paragraph describing the GraphQL
diagram canvas is correctly numbered as step 6, but the subsequent steps labeled
as "Select **+ Create Operations** on the service card" and "Select the field
row to open the **flow designer**" are incorrectly numbered as 6 and 7
respectively. Renumber these last two steps to be 7 and 8 to maintain proper
sequential ordering in the numbered list.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@en/docs/develop/integration-artifacts/event/kafka.md`:
- Line 203: In the event handlers table where the `onConsumerRecord` entry is
defined, fix the subject-verb agreement error in the description. The current
text "New message arrive from the subscribed topics" has a singular subject with
a plural verb. Change it to either "New messages arrive from the subscribed
topics" (keeping plural form) or "A new message arrives from the subscribed
topics" (using singular form with singular verb). Choose whichever maintains
better consistency with the rest of the documentation.

In `@en/docs/develop/integration-artifacts/event/salesforce-events.md`:
- Around line 35-37: The step numbering in the document contains a duplicate:
the instruction "Click **Create**" is correctly labeled as step 5, but the
following instruction beginning with "WSO2 Integrator opens the service in the
**Service Designer**" is also incorrectly numbered as step 5. Change the step
number of the "WSO2 Integrator opens the service..." instruction from 5 to 6 to
maintain proper sequential numbering throughout the procedure.

In `@en/docs/develop/integration-artifacts/service/tcp.md`:
- Line 26: Step 2 in the TCP artifact creation documentation currently only
mentions the design view option for adding artifacts, which is inconsistent with
the wording used in other artifact pages like HTTP, GraphQL, and event
artifacts. Update step 2 to mention both the canvas and sidebar options for
adding artifacts to match the consistent pattern used across all other artifact
creation documentation pages.

---

Outside diff comments:
In `@en/docs/develop/integration-artifacts/event/azure-service-bus.md`:
- Around line 36-42: The markdown document has duplicate step numbering where
both the "Click **Create**" step and the "WSO2 Integrator opens the service in
the **Service Designer**" step are numbered as step 5. Fix this by renumbering
the second step (WSO2 Integrator opens the service...) from 5 to 6, and then
update the final step (Click **+ Add Handler** to add event handlers) from 6 to
7 to maintain the correct sequential order throughout the artifact creation
flow.

In `@en/docs/develop/integration-artifacts/service/graphql.md`:
- Around line 53-60: The documentation has duplicate step numbering where step 6
is listed twice. The first instance at the beginning of the paragraph describing
the GraphQL diagram canvas is correctly numbered as step 6, but the subsequent
steps labeled as "Select **+ Create Operations** on the service card" and
"Select the field row to open the **flow designer**" are incorrectly numbered as
6 and 7 respectively. Renumber these last two steps to be 7 and 8 to maintain
proper sequential ordering in the numbered list.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 0944c2d1-9bef-4f80-8b51-32c08008cb27

📥 Commits

Reviewing files that changed from the base of the PR and between 05f5ed5 and bd838da.

⛔ Files ignored due to path filters (1)
  • en/static/img/develop/integration-artifacts/event/kafka/handler-config.png is excluded by !**/*.png
📒 Files selected for processing (17)
  • en/docs/develop/integration-artifacts/automation.md
  • en/docs/develop/integration-artifacts/event/azure-service-bus.md
  • en/docs/develop/integration-artifacts/event/cdc-mssql.md
  • en/docs/develop/integration-artifacts/event/cdc-postgresql.md
  • en/docs/develop/integration-artifacts/event/github-webhooks.md
  • en/docs/develop/integration-artifacts/event/kafka.md
  • en/docs/develop/integration-artifacts/event/mqtt.md
  • en/docs/develop/integration-artifacts/event/rabbitmq.md
  • en/docs/develop/integration-artifacts/event/salesforce-events.md
  • en/docs/develop/integration-artifacts/event/solace.md
  • en/docs/develop/integration-artifacts/event/twilio.md
  • en/docs/develop/integration-artifacts/service/graphql.md
  • en/docs/develop/integration-artifacts/service/http.md
  • en/docs/develop/integration-artifacts/service/tcp.md
  • en/docs/get-started/build-event-driven-integration.md
  • en/docs/get-started/build-file-driven-integration.md
  • en/sidebars.ts

Comment thread en/docs/develop/integration-artifacts/event/kafka.md Outdated
Comment thread en/docs/develop/integration-artifacts/event/salesforce-events.md Outdated
Comment thread en/docs/develop/integration-artifacts/service/tcp.md Outdated
@github-actions

github-actions Bot commented Jun 22, 2026

Copy link
Copy Markdown

Broken links, images & orphan pages

Passing — no broken links or images found.

Links/images come from one crawl of the production build (baseUrl-aware). Orphans are docs not referenced by sidebars.ts.

Summary

  • Broken links & images — total 0 · 🆕 introduced 0 · 📄 already on main 0
  • Orphan pages — total 8 · 🆕 introduced 0 · 📄 already on main 8

Broken links & images

Introduced by this PR

No new broken link(s)/image(s) introduced by this PR. ✅

Already on main — 0 total

None.

Orphan pages

Introduced by this PR

No new orphan page(s) introduced by this PR. ✅

Already on main — 8 total

Already present on the base branch (not caused by this PR):

Show 8
  • docs/deploy-operate/observe/datadog-integration
  • docs/deploy-operate/observe/elastic-stack-elk
  • docs/deploy-operate/observe/metrics-prometheus-grafana
  • docs/deploy-operate/observe/opensearch-integration
  • docs/deploy-operate/observe/recipe-elk-stack
  • docs/deploy-operate/observe/recipe-kubernetes-production
  • docs/deploy-operate/observe/recipe-local-development
  • docs/deploy-operate/observe/recipe-opensearch-setup

# Kafka

Listen to messages from Apache Kafka topics with consumer group management, offset control, and schema-aware deserialization.
Kafka event integrations connect WSO2 Integrator to Apache Kafka topics as a consumer. Use them to build real-time data pipelines, fan out events across downstream systems, and trigger processing logic whenever messages arrive on a topic. This page covers how to create a Kafka service, configure the service and listener settings, define event handlers for message processing and error recovery, and apply error handling patterns.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Suggested change
Kafka event integrations connect WSO2 Integrator to Apache Kafka topics as a consumer. Use them to build real-time data pipelines, fan out events across downstream systems, and trigger processing logic whenever messages arrive on a topic. This page covers how to create a Kafka service, configure the service and listener settings, define event handlers for message processing and error recovery, and apply error handling patterns.
Kafka event integrations connect WSO2 Integrator to Apache Kafka topics as a consumer. Use them to build real-time data pipelines, route and distribute events across downstream systems, and trigger processing logic whenever messages arrive on a topic. This page covers how to create a Kafka service, configure the service and listener settings, define event handlers for message processing and error recovery, and apply error handling patterns.

Saying our integration fans events out is misleading IMO

Comment on lines +115 to +116
import ballerinax/kafka;
import ballerina/log;

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Suggested change
import ballerinax/kafka;
import ballerina/log;
import ballerina/log;
import ballerinax/kafka;

topics: "orders"
});

service on orderListener {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Isn't this a repetition of the source code under Creating a Kafka service?

Comment on lines +248 to +261
import ballerina/log;
import ballerinax/kafka;

type Order readonly & record {
int orderId;
string productName;
decimal price;
boolean isValid;
};

listener kafka:Listener orderListener = new (kafka:DEFAULT_URL, {
groupId: "order-processor",
topics: "orders"
});

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Suggested change
import ballerina/log;
import ballerinax/kafka;
type Order readonly & record {
int orderId;
string productName;
decimal price;
boolean isValid;
};
listener kafka:Listener orderListener = new (kafka:DEFAULT_URL, {
groupId: "order-processor",
topics: "orders"
});

I feel like we are repeating the same source again and again while appending a bit more each time. Shall we add only the service code here?

Use the flow canvas to add a conditional branch on the error type, log the failure, seek past the erroneous record using a Kafka **Caller** action, or forward the raw record to a dead letter topic.

### Main configurations
<!-- TODO: Add screenshot of onError Flow Designer canvas -->

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Shall we add the needed SS's here


| Field | Description |
|---|---|
| **Durable** | When `true`, the queue survives broker restarts. Defaults to `false`. |

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

With 1.6.0 (pending), the default of durable is updated to true. Auto delete will be updated to false.

Suggested change
| **Durable** | When `true`, the queue survives broker restarts. Defaults to `false`. |
| **Durable** | When `true`, the queue survives broker restarts. Defaults to `true`. |

|---|---|
| **Durable** | When `true`, the queue survives broker restarts. Defaults to `false`. |
| **Exclusive** | When `true`, the queue is used by only one connection and is deleted when that connection closes. Defaults to `false`. |
| **Auto Delete** | When `true`, the queue is automatically deleted when the last consumer unsubscribes. Defaults to `true`. |

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Suggested change
| **Auto Delete** | When `true`, the queue is automatically deleted when the last consumer unsubscribes. Defaults to `true`. |
| **Auto Delete** | When `true`, the queue is automatically deleted when the last consumer unsubscribes. Defaults to `false`. |

- kafka: fix subject-verb agreement (New messages arrive)
- kafka: reword intro (route and distribute events)
- kafka: order ballerina/log import before ballerinax/kafka
- rabbitmq: correct Durable (true) and Auto Delete (false) defaults for 1.6.0
- salesforce-events, azure-service-bus, graphql: fix duplicate step numbering
- tcp: align "Add Artifact" step with other service pages (canvas and sidebar)

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
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