Skip to content

RabbitMQ Configuration

RabbitMQ enables asynchronous, event-driven workflow invocation and outbound messaging.

Roles in MeshFlows

  • Broker for domain events and integration messages.
  • Trigger source for dedicated RabbitMQ subscriber runtime (ingress adapter).
  • Target transport for egress-rabbitmq publishing steps.

RabbitMQ Subscriber Trigger Settings

RabbitMQ-triggered workflow starts are handled by a dedicated subscriber deployment that consumes messages and calls Orchestrator POST /invoke/scheduled.

Key settings:

  • RABBITMQ_TRIGGER_ENABLED
  • RABBITMQ_TRIGGER_URL
  • RABBITMQ_TRIGGER_EXCHANGE
  • RABBITMQ_TRIGGER_EXCHANGE_TYPE
  • RABBITMQ_TRIGGER_QUEUE
  • RABBITMQ_TRIGGER_BINDING_KEY
  • RABBITMQ_TRIGGER_WORKFLOW
  • RABBITMQ_TRIGGER_STORAGE_CHANGED_WORKFLOW
  • RABBITMQ_TRIGGER_REQUEUE_ON_ERROR
  • ORCHESTRATOR_URL
  • ORCHESTRATOR_SCHEDULE_PATH
  • SCHEDULE_INVOCATION_TOKEN

Message Size Limits

MeshFlows configures RabbitMQ broker message size via rabbitmq.conf:

  • max_message_size = $(RABBITMQ_MAX_MESSAGE_SIZE_BYTES)

Default value:

  • RABBITMQ_MAX_MESSAGE_SIZE_BYTES=16777216 (16 MiB)

Important:

  • Keep application-level limits at or below this broker limit.
  • Increase broker limit before increasing service limits beyond 16 MiB.

Workflow Resolution

When consuming a message, workflow selection can happen through:

  1. Explicit header (Workflow).
  2. Dedicated storage changed routing rule.
  3. Static fallback workflow from configuration.
  4. Header mapping using Domain, Service, Action, Version.

Operational Guidance

  • Use durable queues for trigger consumption.
  • Keep routing keys explicit per domain where possible.
  • Apply dead-letter or requeue strategy based on failure semantics.
  • Monitor queue depth, consumer lag, and nack/requeue behavior.

Security Guidance

  • Use non-default credentials and TLS where possible.
  • Restrict broker network exposure to trusted services.
  • Separate vhosts or exchanges for environment isolation.

Internal Auth (Dashboard + Broker)

For cluster-internal management API access, MeshFlows uses the Kubernetes secret meshflows-rabbitmq-auth in the target namespace.

Expected secret keys:

  • username
  • password
  • token (recommended stable internal token)
  • amqp_url

Recommended setup:

  1. Set RABBITMQ_INTERNAL_TOKEN in Actions Secrets.
  2. Run deploy workflow (deploy.yml).
  3. Deploy reconciles secret values and synchronizes broker credentials with rabbitmqctl.

This prevents credential drift when RabbitMQ data persists on PVC between redeploys.

Troubleshooting 401 on RabbitMQ Dashboard APIs

Symptom:

  • Dashboard shows: Failed to load RabbitMQ data: API /api/rabbitmq/overview: 401

Typical cause:

  • Secret credentials differ from users currently configured inside RabbitMQ.

Checks:

  • kubectl get secret meshflows-rabbitmq-auth -n <namespace> -o yaml
  • kubectl exec -n <namespace> deployment/rabbitmq -- rabbitmqctl list_users
  • kubectl exec -n <namespace> deployment/rabbitmq -- rabbitmqctl authenticate_user <user> <password>

Fix:

  • Re-run deploy workflow on latest main so RabbitMQ credentials are reconciled.

Troubleshooting ACCESS_REFUSED on workflow publish

Symptom:

  • Workflow step rabbitmq_publish / egress.rabbitmq.publish fails with ACCESS_REFUSED - Login was refused using authentication mechanism PLAIN.

Typical cause:

  • The broker user/password in meshflows-rabbitmq-auth was reconciled, but the Storage runtime secrets used by connections (rabbitmq-user, rabbitmq-password in connection rabbitmq_events) still hold an older value.

Checks:

  • kubectl exec -n meshflows-dev deployment/rabbitmq -- rabbitmqctl authenticate_user <user> <password> using values from meshflows-rabbitmq-auth.
  • Dashboard → Secrets: compare rabbitmq-password with the cluster secret.
  • Dashboard → Connectionsrabbitmq_events: URL should reference $secret:rabbitmq-user and $secret:rabbitmq-password.

Fix:

  • Re-run Deploy Engine (syncs broker + Storage secrets), or update Storage secrets manually to match meshflows-rabbitmq-auth.