Skip to content

Conversation

ammadfa
Copy link

@ammadfa ammadfa commented Sep 21, 2025

Community plugins

  • Add amqp1 driver for jobs to community plugins docs

Summary by CodeRabbit

  • Documentation
    • Added comprehensive documentation for the AMQP1 community plugin (AMQP 1.0 driver), covering features, configuration for Azure Service Bus and RabbitMQ, TLS options, advanced pipelines, migration guidance, and troubleshooting.
    • Included build/integration examples and usage snippets to streamline setup and observability.
    • Linked the AMQP1 docs in the documentation sidebar (SUMMARY) and added a new entry in the Community Plugins index with repository and docs links.

  - Add amqp1 driver for jobs to community plugins docs
Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR adds documentation for the AMQP1 community plugin, which provides a unified AMQP 1.0 driver for job queues that works with both Azure Service Bus and RabbitMQ. The plugin uses the pure go-amqp library for standardized protocol support.

  • Adds comprehensive documentation for the AMQP1 plugin including features, configuration, and implementation details
  • Updates the community plugins index to include the new AMQP1 plugin
  • Adds navigation entry in the summary for the new documentation

Reviewed Changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.

File Description
community-plugins/intro.md Adds AMQP1 plugin entry to the community plugins table
community-plugins/amqp1.md Complete documentation for the AMQP1 plugin including configuration examples and usage
SUMMARY.md Adds navigation entry for the AMQP1 plugin documentation

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

Copy link

coderabbitai bot commented Sep 22, 2025

Note

Other AI code review bot(s) detected

CodeRabbit has detected other AI code review bot(s) in this pull request and will avoid duplicating their findings in the review comments. This may lead to a less comprehensive review.

Walkthrough

Adds AMQP1 plugin documentation and links it into the community plugins list and documentation summary/navigation.

Changes

Cohort / File(s) Summary of Changes
Community Plugins Docs
community-plugins/amqp1.md, community-plugins/intro.md
Added comprehensive AMQP 1.0 driver plugin docs; updated community plugins list with AMQP1 entry and links.
Docs TOC
SUMMARY.md
Inserted AMQP1 entry under Community Plugins to include the new doc in navigation.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

Suggested labels

enhancement

Suggested reviewers

  • wolfy-j

Poem

Thump-thump goes my doc-bound heart,
AMQP1 hops in—new charts to chart!
Two brokers, one warren, signals align,
Queues like clover in orderly line.
I twitch my ears at TLS so bright,
Logs glow softly in the moonlit night.
Hop on—packets take flight! 🐇✨

Pre-merge checks and finishing touches

✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title Check ✅ Passed The title accurately and succinctly describes the primary change—adding the amqp1 driver documentation to the community plugins docs—and aligns with the modified files (SUMMARY.md, community-plugins/amqp1.md, and community-plugins/intro.md); it is a clear single-sentence summary suitable for reviewers, though it repeats "community plugins" twice.
Docstring Coverage ✅ Passed No functions found in the changes. Docstring coverage check skipped.
✨ Finishing touches
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment

Tip

👮 Agentic pre-merge checks are now available in preview!

Pro plan users can now enable pre-merge checks in their settings to enforce checklists before merging PRs.

  • Built-in checks – Quickly apply ready-made checks to enforce title conventions, require pull request descriptions that follow templates, validate linked issues for compliance, and more.
  • Custom agentic checks – Define your own rules using CodeRabbit’s advanced agentic capabilities to enforce organization-specific policies and workflows. For example, you can instruct CodeRabbit’s agent to verify that API documentation is updated whenever API schema files are modified in a PR. Note: Upto 5 custom checks are currently allowed during the preview period. Pricing for this feature will be announced in a few weeks.

Please see the documentation for more information.

Example:

reviews:
  pre_merge_checks:
    custom_checks:
      - name: "Undocumented Breaking Changes"
        mode: "warning"
        instructions: |
          Pass/fail criteria: All breaking changes to public APIs, CLI flags, environment variables, configuration keys, database schemas, or HTTP/GraphQL endpoints must be documented in the "Breaking Change" section of the PR description and in CHANGELOG.md. Exclude purely internal or private changes (e.g., code not exported from package entry points or explicitly marked as internal).

Please share your feedback with us on this Discord post.


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 and usage tips.

@rustatian
Copy link
Member

rustatian commented Sep 22, 2025

Thank you @ammadfa 👍🏻
Everything looks good (I've slightly corrected a connection string example) 😃
It'll be merged once I release a Velox 2025.2, because you used it in the docs on how to build RR with your plugin, but that version has not been released yet.

@rustatian rustatian self-assigned this Sep 22, 2025
@rustatian rustatian changed the title Community plugins: Add amqp1 driver for jobs to community plugins docs [Waiting for Velox 2025.2]: Community plugins: Add amqp1 driver for jobs to community plugins docs Sep 22, 2025
Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🧹 Nitpick comments (9)
community-plugins/intro.md (1)

27-27: Improve link text clarity in the table.

Use descriptive anchor text instead of the generic “link”.

-| AMQP1 | [link](https://github.com/ammadfa/amqp1)| AMQP 1.0 driver for Azure Service Bus and RabbitMQ with pure go-amqp library | [docs](./amqp1.md) |
+| AMQP1 | [ammadfa/amqp1](https://github.com/ammadfa/amqp1) | AMQP 1.0 driver for Azure Service Bus and RabbitMQ with pure go-amqp library | [docs](./amqp1.md) |
community-plugins/amqp1.md (8)

1-1: Page title should be sentence case.

-# Jobs — AMQP 1.0 Driver
+# Jobs — AMQP 1.0 driver

64-64: Use descriptive anchor text for internal links.

-More info about customizing RR with your own plugins: [link](../customization/plugin.md)
+More info about customizing RR with your own plugins: [Writing a Plugin](../customization/plugin.md)

43-60: Pin plugin versions in velox.toml for reproducible builds.

Floating tags like “master”/“latest” make builds non‑deterministic.

-[plugins.amqp1]
-tag = "master"
-module_name = "github.com/ammadfa/amqp1"
+[plugins.amqp1]
+tag = "vX.Y.Z"            # pin to a released tag
+module_name = "github.com/ammadfa/amqp1"
@@
-[plugins.jobs]
-tag = "latest"
+[plugins.jobs]
+tag = "v5.x.x"
 module_name = "github.com/roadrunner-server/jobs/v5"
@@
-[plugins.server]
-tag = "latest"
+[plugins.server]
+tag = "v5.x.x"
 module_name = "github.com/roadrunner-server/server/v5"
@@
-[plugins.http]
-tag = "latest"
+[plugins.http]
+tag = "v5.x.x"
 module_name = "github.com/roadrunner-server/http/v5"

Would you like me to look up the latest stable tags and propose concrete versions?


74-91: ASB credentials in URLs must be URL‑encoded; prefer env vars.

SAS keys often contain special chars (=, +). Recommend percent‑encoding or using env vars to avoid parse errors and leaking secrets.

 amqp1:
-  addr: "amqps://YOUR_POLICY_NAME:YOUR_ACCESS_KEY@YOUR_NAMESPACE.servicebus.windows.net:5671/"
+  # Prefer env vars; ensure values are URL-encoded if embedded
+  addr: "amqps://${ASB_POLICY}:${ASB_KEY}@${ASB_NAMESPACE}.servicebus.windows.net:5671/"

Add a short note after the block:

  • “Ensure ASB credentials are percent‑encoded when used in URLs, or use env vars as shown above.”

131-136: Link to RabbitMQ AMQP 1.0 plugin docs.

Provide an authoritative reference for enabling the plugin.

-**RabbitMQ Requirements:**
-- Enable AMQP 1.0 plugin: `rabbitmq-plugins enable rabbitmq_amqp1_0`
+**RabbitMQ Requirements:**
+- Enable AMQP 1.0 plugin: `rabbitmq-plugins enable rabbitmq_amqp1_0` (see RabbitMQ docs)
+  - https://www.rabbitmq.com/docs/amqp-1-0

141-152: TLS snippet looks good; consider mentioning system trust store.

If root_ca is omitted, clarify that system CAs are used; helps reduce config friction.

Proposed addition below the block:

  • “If root_ca is not provided, the system trust store is used.”

220-232: Close connections and use time‑bounded contexts in examples.

Prevents resource leaks in copy‑pasted samples.

-conn, err := amqp.Dial(ctx, addr, &amqp.ConnOptions{
+ctx, cancel := context.WithTimeout(context.Background(), 30*time.Second)
+defer cancel()
+
+conn, err := amqp.Dial(ctx, addr, &amqp.ConnOptions{
     ContainerID: conf.ContainerID,
     TLSConfig:   tlsConfig,
 })
+defer conn.Close()

236-240: Clarify/allow override for “automatic broker detection”.

Briefly document how detection works and how to override it if misidentified.

📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between a646a7e and c5fdff9.

📒 Files selected for processing (3)
  • SUMMARY.md (1 hunks)
  • community-plugins/amqp1.md (1 hunks)
  • community-plugins/intro.md (1 hunks)
🧰 Additional context used
📓 Path-based instructions (2)
**/*.md

📄 CodeRabbit inference engine (AGENTS.md)

**/*.md: Prefer HTTPS links and stable permalinks for external references in Markdown
Run markdownlint (configured by .markdownlint.json) on Markdown files and fix reported issues
Use sentence case for page titles; keep sections concise and avoid heading levels deeper than ###
Always add language tags to code fences (e.g., php, go, yaml, bash, json) and prefer minimal, runnable snippets
Use 2 spaces for list indentation; wrap naturally (MD013 disabled) and keep paragraphs short
Use relative links for intra-repo references; use absolute HTTPS URLs for external resources; avoid bare URLs when anchor text is clearer
Validate code/config samples in docs by running or syntax-checking where feasible (e.g., php -l, yamllint)
Ensure images referenced in docs render in GitBook
Only modify Markdown content files as part of docs changes (no build tooling introduced without justification)

Files:

  • community-plugins/intro.md
  • SUMMARY.md
  • community-plugins/amqp1.md
SUMMARY.md

📄 CodeRabbit inference engine (AGENTS.md)

SUMMARY.md: Keep navigation in sync by updating SUMMARY.md when adding or moving pages
Only modify SUMMARY.md to adjust navigation as needed; do not restructure the project without justification
When adding pages, register them in SUMMARY.md so they appear in navigation

Files:

  • SUMMARY.md
🔇 Additional comments (3)
SUMMARY.md (1)

51-51: Nav entry added correctly; LGTM.

AMQP1 doc is registered under Community Plugins and matches the target path.

community-plugins/amqp1.md (2)

108-111: Avoid plaintext credentials in examples; show env‑var pattern.

 amqp1:
-  addr: "amqp://username:password@rabbitmq:5672/"
+  # Use env vars; consider TLS (amqps) in production
+  addr: "amqps://${RABBIT_USER}:${RABBIT_PASS}@${RABBIT_HOST:-rabbitmq}:5671/"

Also add a sentence: “For development you may use amqp:// on 5672; prefer amqps:// with TLS in production.”


11-11: Update or remove pinned go-amqp version in docs

community-plugins/amqp1.md:11 — currently:

* **Pure AMQP 1.0 Implementation**: Uses `github.com/Azure/go-amqp` v1.4.0 for standardized protocol support

Latest release is v1.5.0 (released Sep 4, 2025); drop the exact version from the narrative or update it to v1.5.0.

Comment on lines +161 to +183
jobs:
pipelines:
# Azure Service Bus optimized pipeline
priority-orders:
driver: amqp1
config:
queue: "priority-orders"
prefetch: 50
priority: 5

# RabbitMQ with topic exchange
events-pipeline:
driver: amqp1
config:
queue: "events-queue"
exchange: "events-exchange"
exchange_type: "topic"
routing_key: "events.#"
prefetch: 25
priority: 3
durable: true
exclusive: false
```
Copy link

Choose a reason for hiding this comment

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

🛠️ Refactor suggestion

🧩 Analysis chain

YAML validity: fields look plausible; please lint to be safe.

Run markdownlint and a YAML linter on the added snippets per repo guidelines.


🏁 Script executed:

#!/bin/bash
# Lint Markdown (markdownlint config assumed in repo)
npx markdownlint-cli2 '**/*.md'

# Quick YAML syntax checks (prints offending snippet/line on error)
python - <<'PY'
from ruamel.yaml import YAML
import sys, re
yaml = YAML(typ='safe')
doc, buf = None, []
capture=False
import pathlib
for p in pathlib.Path('community-plugins').glob('amqp1.md'):
    for ln in p.read_text().splitlines():
        if ln.strip().startswith('```yaml'):
            capture=True; buf=[]; continue
        if capture and ln.strip().startswith('```'):
            try:
                yaml.load('\n'.join(buf))
            except Exception as e:
                print(f'YAML block failed in {p}: {e}')
            capture=False; continue
        if capture: buf.append(re.sub(r'^\s{0,3}', '', ln))
PY

Length of output: 56502


Fix markdownlint violations in community-plugins/amqp1.md; YAML fences validate.

markdownlint reported MD004, MD032, MD022, MD059 and MD047 in community-plugins/amqp1.md (unordered list style, missing blank lines around lists/headings, non‑descriptive link text, missing single trailing newline). The YAML fenced blocks parsed successfully with ruamel.yaml. Fix the markdownlint issues and re-run markdownlint-cli2 (and the YAML check).

🤖 Prompt for AI Agents
In community-plugins/amqp1.md around lines 161 to 183, fix the markdownlint
violations: normalize unordered list markers (use a single style, e.g.,
hyphens), add required blank lines above and below lists and headings, replace
non‑descriptive link text with meaningful text, and ensure the file ends with a
single trailing newline; keep the existing YAML fenced blocks intact (they
validate with ruamel.yaml). After making these edits, run markdownlint-cli2 and
the YAML checker to confirm MD004, MD032, MD022, MD059 and MD047 are resolved.

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