Skip to content

Herald: Implement RabbitMQ Message Bus #14

@jorisvilardell

Description

@jorisvilardell

Priority: High
Dependencies: None

Description:
Implement the MessageBusRepository trait using RabbitMQ via AMQP protocol to publish action events.

Acceptance Criteria:

  • Create RabbitMqMessageBus in infrastructure/messagebus/ module
  • Implement publish() to send ActionEvent to RabbitMQ
  • Use routing key from ActionEvent (format: {resource}.{kind})
  • Handle connection failures and implement retry logic
  • Map AMQP errors to HeraldError::MessageBus
  • Add configuration for RabbitMQ connection (host, port, credentials, exchange)
  • Integration tests with testcontainers

Technical Notes:

  • Use lapin or amqprs crate for RabbitMQ
  • Serialize ActionEvent to JSON for message body
  • Use topic exchange for routing flexibility
  • Ensure idempotent publications (include action_id in message)

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions