Meduse Integration
Meduse is the internal operations system that provides warehouse data, product information, and queue-based processing to Logidav. It complements Magento by supplying operational data that the e-commerce platform does not manage.
Role
- Product data: Meduse provides enriched product attributes and warehouse-specific information
- Warehouse operations: stock locations, bin assignments, and inventory movements
- Queue processing: asynchronous data exchange through RabbitMQ queues
Components
| Component | Location | Role |
|---|---|---|
MeduseBundle | src/MeduseBundle/ | Bundle containing all Meduse integration logic |
ProductMeduseDataUpdateProcessor | src/MeduseBundle/ | Processes product data updates from Meduse |
| Queue consumer | RabbitMQ | Listens on logidav.api.product.put.queue |
Data Flow
Inbound Data
- Product updates: product attributes, descriptions, dimensions, and weights arrive through the
logidav.api.product.put.queueRabbitMQ queue - Warehouse info: bin locations, stock levels per warehouse, and movement history
- Operational flags: product availability, shipping restrictions, and handling instructions
Outbound Data
- Order status: Logidav sends fulfillment status updates back to Meduse
- Stock adjustments: inventory corrections are synchronized bidirectionally
Configuration
Meduse connection parameters are defined in parameters.yml:
meduse:
api_url: "https://..."
api_key: "..."
rabbitmq:
host: "..."
port: 5672
user: "..."
password: "..."
Queue Architecture
The primary queue is logidav.api.product.put.queue. Messages are consumed by ProductMeduseDataUpdateProcessor, which:
- Deserializes the incoming JSON payload
- Validates required fields
- Maps Meduse fields to Logidav product attributes
- Persists changes to the database
:::warning Queue monitoring If the queue consumer stops, product data updates from Meduse will accumulate in RabbitMQ. Monitor queue depth to detect processing failures early. :::
Error Handling
| Scenario | Behavior |
|---|---|
| Malformed message | Logged and rejected (dead-letter queue) |
| Database conflict | Retry with latest data |
| Queue consumer crash | Supervisor restarts the consumer process |
| API timeout (outbound) | Retry on next cycle |