How bad-microservices/amqp_helper works
Main Components
a. Core Components (Central Layer):
• AMQPConfig (Configuration Management)
• AMQPClient (Client Implementation)
• AMQPService (Server Implementation)
• AMQPFunction (RPC Function Wrapper)
• AMQPLogHandler (Logging Integration)
b. External Dependencies (Top Layer):
• aio-pika (Main AMQP Library)
• Python's asyncio (Async Runtime)
• Python's logging (for Log Handler)
c. Message Broker (Bottom Layer):
• AMQP Broker (e.g., RabbitMQ)
• Exchange
• Queues
Component Relationships
• AMQPConfig → All other components (provides configuration)
• AMQPClient → AMQP Broker (sends requests)
• AMQPService → AMQP Broker (handles requests)
• AMQPLogHandler → AMQP Broker (sends logs)
• External Applications → AMQPClient/AMQPService (usage points)
Interaction Flows
a. RPC Flow:
• Client → AMQPClient → Broker → AMQPService → Function Execution → Response
b. Logging Flow:
• Application → AMQPLogHandler → Broker → Log Consumers
c. Configuration Flow:
• AMQPConfig → Components → Broker Connection
Implementation Details
• Connection parameters flow
• Exception handling paths
• Message routing patterns
• Queue and exchange creation points
Notes Section
Notes about:
• Async operation requirements
• Configuration options
• Error handling strategies
• Logging levels and routing