Skip to content

feat(rabbitmq): add RabbitMQ integration - #6700

Merged
waleedlatif1 merged 4 commits into
stagingfrom
feat/rabbitmq-integration
Aug 14, 2026
Merged

feat(rabbitmq): add RabbitMQ integration#6700
waleedlatif1 merged 4 commits into
stagingfrom
feat/rabbitmq-integration

Conversation

@waleedlatif1

Copy link
Copy Markdown
Collaborator

Summary

  • Add a RabbitMQ integration with 25 operations over the Management HTTP API (basic auth, no AMQP client needed)
  • Messaging: publish to an exchange, read messages off a queue
  • Topology: create/read/delete queues and exchanges, purge, create/delete bindings (queue and exchange destinations), list bindings from either side
  • Operations: broker overview, health checks, cluster nodes, virtual hosts, connections, channels, consumers
  • Policies: list, create, and delete — how dead-lettering, TTLs, and length limits get applied
  • Every response shape was verified against live brokers rather than inferred; the API reference documents request bodies only and shows no GET response JSON

Notes on behavior worth reviewing

  • A failing health check answers 503 with a meaningful body. That is reported as a successful call with healthy: false, not a tool error — only non-200/503 is an error.
  • Publish returns HTTP 200 with routed: false when no binding matched and the broker dropped the message, so routed is a first-class output.
  • Queue statistics (messages, consumers, memory) are absent until the broker's stats interval ticks, so they are nullable rather than defaulted to 0 — reporting 0 would read as "empty" when the truth is "unknown".
  • GET /api/vhosts answers 500 if given pagination parameters, so that one call deliberately sends none.
  • count on message retrieval has no server-side cap and payloads are unbounded, so both are bounded: count is clamped, and truncate is always sent so oversized payloads are cut broker-side and flagged via truncated.
  • List calls request only the columns they project; a full queue record carries stats and GC blobs that would otherwise be parsed and thrown away.
  • Page size is clamped to the 1–500 range the broker accepts instead of forwarding a value it rejects with a 400.

Not included

Users, permissions, and virtual-host lifecycle are left out — that surface is normally managed as infrastructure-as-code rather than from an agent workflow. Happy to add it if wanted.

Type of Change

  • New feature (non-breaking change which adds functionality)

Testing

All 25 operations exercised end-to-end against live RabbitMQ 4.3 and 3.13 brokers (including a real AMQP consumer for the connection/channel/consumer shapes), covering success and failure paths. 29 unit tests, each verified to fail without its fix.

Checklist

  • Code follows project style guidelines
  • Self-reviewed my changes
  • Tests added/updated and passing
  • No new warnings introduced
  • I confirm that I have read and agree to the terms outlined in the Contributor License Agreement (CLA)

@vercel

vercel Bot commented Aug 14, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
docs Ready Ready Preview Aug 14, 2026 7:03pm

Request Review

@cursor

cursor Bot commented Aug 14, 2026

Copy link
Copy Markdown

PR Summary

Medium Risk
New integration with destructive broker operations (delete/purge/policy changes) and credential handling over HTTP; mitigations include HTTPS checks, redirect auth stripping, and bounded message retrieval, but misconfigured workflows could still affect production brokers.

Overview
Adds a RabbitMQ integration so workflows and agents can talk to a broker through the Management HTTP API (management URL + basic auth), not AMQP.

The new rabbitmq block exposes 25 operations: publish and peek/consume messages; declare and manage queues, exchanges, bindings, and policies; plus broker overview, health checks, nodes, vhosts, connections, channels, and consumers. UI wiring includes operation-specific sub-blocks, canvas copy, agent skills, and workflow templates. Docs (rabbitmq.mdx), catalog metadata (integrations.json), and RabbitmqIcon mappings complete the surface.

Supporting tool behavior (from the PR description and tests) includes treating failed health checks as healthy: false rather than tool errors, surfacing routed on publish, nullable queue stats until the broker samples them, no pagination on list vhosts, response-size limits on get-messages (count/truncate), column projection on list calls, HTTPS enforcement for remote hosts, and stripAuthOnRedirect on all RabbitMQ tools.

Reviewed by Cursor Bugbot for commit 2b15905. Configure here.

@greptile-apps

greptile-apps Bot commented Aug 14, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

The PR adds a RabbitMQ Management HTTP API integration with 25 operations, corresponding block configuration, generated tool metadata, documentation, icons, and tests.

  • Supports messaging, topology management, broker inspection, health checks, and policy management.
  • Applies HTTPS/loopback endpoint validation and strips Basic credentials when following redirects.
  • Bounds message retrieval count and payload truncation while documenting RabbitMQ’s unbounded metadata limitation.

Confidence Score: 5/5

The PR appears safe to merge.

No blocking failure remains.

Important Files Changed

Filename Overview
apps/sim/tools/rabbitmq/utils.ts Centralizes host normalization, URL construction, authentication, pagination, parsing, and RabbitMQ response projection; the previously reported redirect and remote-HTTP behaviors are addressed.
apps/sim/tools/rabbitmq/get_messages.ts Implements bounded message retrieval with count-aware payload truncation and a metadata reserve; the unavoidable oversized-header limitation is explicitly documented.
apps/sim/tools/rabbitmq/rabbitmq.test.ts Covers operation behavior and verifies redirect-auth stripping across all exported RabbitMQ tools.
apps/sim/blocks/blocks/rabbitmq.ts Defines the RabbitMQ block’s operations, inputs, output mappings, and tool dispatch configuration.
apps/docs/content/docs/en/integrations/rabbitmq.mdx Documents setup requirements, supported operations, HTTPS restrictions, and message-retrieval limits.

Sequence Diagram

sequenceDiagram
  participant Workflow as Sim Workflow
  participant Tool as RabbitMQ Tool
  participant Transport as Secure HTTP Transport
  participant Broker as RabbitMQ Management API
  Workflow->>Tool: Execute selected operation
  Tool->>Tool: Normalize host and build Basic auth
  Tool->>Transport: Request with redirect auth stripping
  Transport->>Broker: Validated HTTPS request
  Broker-->>Transport: Management API response
  Transport-->>Tool: Size-bounded response
  Tool-->>Workflow: Projected operation output
Loading

Reviews (3): Last reviewed commit: "fix(rabbitmq): reserve message metadata ..." | Re-trigger Greptile

Comment thread apps/sim/tools/rabbitmq/utils.ts Outdated
Comment thread apps/sim/tools/rabbitmq/utils.ts
Comment thread apps/sim/tools/rabbitmq/get_messages.ts Outdated
@waleedlatif1

Copy link
Copy Markdown
Collaborator Author

@greptile

@waleedlatif1

Copy link
Copy Markdown
Collaborator Author

@cursor review

Comment thread apps/sim/tools/rabbitmq/get_messages.ts Outdated

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

✅ Bugbot reviewed your changes and found no new issues!

Comment @cursor review or bugbot run to trigger another review on this PR

Reviewed by Cursor Bugbot for commit 384d21b. Configure here.

@waleedlatif1

Copy link
Copy Markdown
Collaborator Author

@greptile

@waleedlatif1

Copy link
Copy Markdown
Collaborator Author

@cursor review

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

✅ Bugbot reviewed your changes and found no new issues!

Comment @cursor review or bugbot run to trigger another review on this PR

Reviewed by Cursor Bugbot for commit 2b15905. Configure here.

@waleedlatif1
waleedlatif1 merged commit 1d34272 into staging Aug 14, 2026
30 checks passed
@waleedlatif1
waleedlatif1 deleted the feat/rabbitmq-integration branch August 14, 2026 19:05
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