pynenc_rabbitmq.builder

RabbitMQ plugin builder extensions for Pynenc.

This module contains the RabbitMQ-specific builder methods for the pynenc-rabbitmq plugin.

Key components:

  • RabbitMqBuilderPlugin: Plugin class that registers RabbitMQ methods

  • rabbitmq(): Main method for RabbitMQ stack configuration

Module Contents

Classes

RabbitMqBuilderPlugin

RabbitMQ plugin that provides builder methods for RabbitMQ backend configuration.

Functions

rabbitmq_broker

Configure RabbitMQ components for the Pynenc application.

validate_rabbitmq_config

Validate RabbitMQ plugin configuration.

API

class pynenc_rabbitmq.builder.RabbitMqBuilderPlugin[source]

RabbitMQ plugin that provides builder methods for RabbitMQ backend configuration.

static register_builder_methods(builder_class: type[pynenc.builder.PynencBuilder]) None[source]

Register RabbitMQ builder methods with PynencBuilder.

Parameters:

builder_class (type[“PynencBuilder”]) – The PynencBuilder class to extend

pynenc_rabbitmq.builder.rabbitmq_broker(builder: pynenc.builder.PynencBuilder, host: str | None = None, port: int | None = None, username: str | None = None, password: str | None = None, virtual_host: str | None = None, queue_prefix: str | None = None, exchange_name: str | None = None, exchange_type: str | None = None) pynenc.builder.PynencBuilder[source]

Configure RabbitMQ components for the Pynenc application.

Sets up RabbitMQ as the backend for broker and related components. Only explicitly provided parameters are set; defaults are handled in ConfigRabbitMq.

Parameters:
  • builder – The PynencBuilder instance

  • host – RabbitMQ host

  • port – RabbitMQ port

  • username – RabbitMQ username

  • password – RabbitMQ password

  • virtual_host – RabbitMQ virtual host

  • queue_prefix – Prefix for RabbitMQ queues

  • exchange_name – Name of the RabbitMQ exchange

  • exchange_type – Type of the RabbitMQ exchange

Returns:

The builder instance for method chaining

pynenc_rabbitmq.builder.validate_rabbitmq_config(config: dict[str, Any]) None[source]

Validate RabbitMQ plugin configuration.

Ensures that RabbitMQ broker has required connection settings.

Parameters:

config – Configuration dictionary to validate

Raises:

ValueError – If RabbitMQ broker is configured without host