Overview
The messaging microservice for MEXAR international remittance system. Provides both direct SMS sending and a VerifyNow API for OTP verification. Integrated with multiple SMS providers for automatic failover and cost optimization across different countries. Communicates with the core backend via Webhook and Kafka.
Tech Stack
- Backend â Python/FastAPI
- Message Queue â Kafka, RabbitMQ
- Inter-service Communication â Webhook, Kafka
Key Capabilities
- Direct SMS â Transactional SMS delivery for notifications and status updates
- VerifyNow API â OTP generation, delivery, and verification via reference ID; consumer services never handle raw OTP codes, reducing security exposure
- Multi-provider Failover â Automatic provider switching when a provider is down, ensuring delivery reliability
- Cost Optimization â Multi-provider routing to leverage the lowest cost per country/region
Design Principles
- Extensibility â Provider-agnostic abstraction layer allowing SMS gateway changes without core logic modifications
- Security â OTP codes isolated within the messaging service; consumer services only interact via reference IDs
- Idempotency â Guaranteed exactly-once message delivery through idempotent processing
- Scalability â Asynchronous message processing via Kafka for high-throughput scenarios
