You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+34-1Lines changed: 34 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,6 +1,36 @@
1
1
# RabbitMQ Web OCPP plugin
2
2
3
-
This plugin provides a thin translator layer for OCPP-over-WebSockets to RabbitMQ AMQP protocol. Both version `1.6J` and `2.x` should be supported as the base JSON format array was kept backwards compatible, even tho many of the action names and payload are changed.
3
+
A RabbitMQ plugin that turns the broker into a [highly-scalable](https://www.rabbitmq.com/blog/2023/03/21/native-mqtt#1-million-mqtt-connections), memory-efficient and low-latency gateway for EV charge stations. This plugin provides a native thin translator layer for OCPP-over-WebSockets to RabbitMQ AMQP protocol. Both version `1.6J` and `2.x` should be supported as the base JSON format array was kept backwards compatible, even tho many of the action names and payloads are changed.
4
+
5
+
## Motivation
6
+
7
+
Doing research for our CSMS platform, we found [IoT and WebSockets in K8s: Operating and Scaling an EV Charging Station Network - Saadi Myftija](https://www.youtube.com/watch?v=CuiY1Vj-A5E) and [Building an OCPP-compliant electric vehicle charge point operator solution using AWS IoT Core](https://aws.amazon.com/blogs/iot/building-an-ocpp-compliant-electric-vehicle-charge-point-operator-solution-using-aws-iot-core/), both ilustrating a rather complex and costly cloud architecture for this use-case. CPOs frequently need to fan-in **tens of thousands of charge points (CPs)** over the public (LTE) Internet while keeping stateful request/response semantics (RPC), durable command queues and enterprise-grade HA.
8
+
RabbitMQ already excels at message durability and routing, but traditionally the OCPP world still relies on proprietary gateways or heavyweight HTTP stacks.
9
+
10
+
`rabbitmq_web_ocpp` closes that gap:
11
+
12
+
***Zero external proxy** – The native Erlang HTTP server included in RabbitMQ, Cowboy, terminates `wss://` connections on the broker node, allowing even mTLS peer verification.
13
+
***Native AMQP routing** – every OCPP frame is stored as a RabbitMQ *message container*; you fan-out, DLX, or mirror it; OCPP backend can be written in any programming language as queue workers.
14
+
***One Erlang process per charger** – the same footprint as the native MQTT rewrite.
15
+
***Reconnection storms resilience** - handled by RabbitMQ HA cluster, backend scalling is decopled.
16
+
17
+
## Why “one Erlang process per charger” actually scales
18
+
19
+
***Low memory usage per process** – a BEAM process starts with a 256-word heap; even
20
+
with the pending-map and a few binaries a live Web-OCPP handler + channel
21
+
stays < few KiB.
22
+
***No kernel threads** – the BEAM scheduler multiplexes hundreds of
23
+
thousands of lightweight processes onto a fixed pool of OS threads.
24
+
Context switches are micro-seconds and never hit the kernel.
25
+
***Per-process garbage collection** – pauses are micro-scopic and local;
26
+
one slow charger cannot block the others.
27
+
***Built-in crash isolation & supervision** – the classic *let it crash*
28
+
idiom restarts a misbehaving charger process without touching neighbours,
29
+
something a monolithic Java or Go gateway must re-implement.
30
+
***Direct in-VM routing** – by skipping TCP and AMQP frames the path from
31
+
WebSocket frame → queue deliver → WebSocket send is one message copy
32
+
inside the VM—not four kernel crossings like a side-car proxy.
33
+
4
34
5
35
## Installation
6
36
@@ -25,6 +55,9 @@ For all configuration options, please refer to the nearly identical plugin, [Rab
25
55
Note that release branches (`stable` vs. `master`) and target RabbitMQ version need to be taken into account
26
56
when building plugins from source.
27
57
58
+
## Enterprise-Grade Hosting & SLA Support
59
+
60
+
For CPOs or platform operators that need to onboard fleets of tens of thousands of chargers, our team offers cloud-native RabbitMQ HA deployments in AWS, Azure or GCP, complete with 24/7 monitoring, incident response, rolling upgrades, and expert assistance for PKI, Prometheus dashboards and OCPP-specific queue policies; we can also deliver custom feature work; we tailor service levels and cluster topologies so you can scale from pilot projects to nationwide networks without re-architecting.
0 commit comments