-
Notifications
You must be signed in to change notification settings - Fork 20
[Waiting for Velox 2025.2]: Community plugins: Add amqp1 driver for jobs to community plugins docs #64
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
- Add amqp1 driver for jobs to community plugins docs
There was a problem hiding this 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.
Co-authored-by: Copilot <[email protected]>
Note Other AI code review bot(s) detectedCodeRabbit 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. WalkthroughAdds AMQP1 plugin documentation and links it into the community plugins list and documentation summary/navigation. Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes Suggested labels
Suggested reviewers
Poem
Pre-merge checks and finishing touches✅ Passed checks (3 passed)
✨ Finishing touches🧪 Generate unit tests
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.
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. Comment |
Thank you @ammadfa 👍🏻 |
There was a problem hiding this 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
📒 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 docscommunity-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.
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 | ||
``` |
There was a problem hiding this comment.
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.
Community plugins
Summary by CodeRabbit