At a weighbridge, every ticket is money: freight is billed on weight. When weights are typed by hand into the ERP, errors and delays follow. For Kenya Railways the task was to move weighbridge readings into SAP S/4HANA automatically, starting with a pilot at the Changamwe weighbridge.
The problem in one sentence
Two different weighbridge systems — Libra WeighPro and WMV8 Sirius — record weights in their own formats and databases, and SAP needs one clean, reliable feed.
The architecture
1. A source adapter per weighbridge system. Libra WeighPro keeps its tickets in SQL Server, so the adapter reads completed tickets from the database rather than scraping screens. Each adapter knows one source system and nothing about SAP.
2. One canonical payload. Every adapter converts its tickets into the same message shape — ticket number, site, vehicle/wagon, gross, tare, net, timestamps and operator. SAP integration is written once, against that shape, no matter how many weighbridge brands are added later.
3. A message queue in the middle: RabbitMQ. Adapters publish messages to RabbitMQ; a consumer posts them to SAP. The queue is what makes the system dependable:
- Durable queues — messages survive restarts
- Retries with back-off when SAP or the network is unavailable
- A dead-letter queue for messages that keep failing, so one bad ticket never blocks the rest
- Idempotency on the ticket number — if a message is delivered twice, SAP still records it once
4. Monitoring dashboards. Operations teams can see queue depth, throughput, failures and the age of the oldest unprocessed ticket. If a weighbridge goes quiet or messages pile up, it shows on a screen before anyone notices missing invoices.
Why a pilot site first
Changamwe let us prove the full chain — weighbridge → adapter → RabbitMQ → SAP — under real traffic, measure it, and fix edge cases (re-weighs, cancelled tickets, clock drift between systems) before rolling out further.
Lessons for any ERP integration
- Don’t connect systems point-to-point. A queue between them absorbs outages and spikes.
- Design the canonical message first. It is the contract every future system will follow.
- Make every message safe to process twice. Networks will deliver duplicates.
- Monitor the business signal, not just the server. “Tickets waiting” matters more than CPU.
- Pilot on one site with real data before scaling.
The same pattern works for mobile money reconciliation, eTIMS tax invoicing, bank feeds and POS-to-ERP sync — anywhere data must move between systems without being lost or duplicated.
See API & Systems Integration, the Kenya Railways case study, or book a free consultation.