Apache CloudStack extension for hybrid event bus

logo
Today we would like to share a new plug-in event bus module – a hybrid event bus that combines two buses: inMemory Event Bus – to handle events inside CloudStack, and Kafka or RabbitMQ Event Bus – to interact with external handlers.

We use Kafka Event Bus in our CloudStack installations. Recently, after testing a new plug-in in the product environment, we found that this bus does not have event subscription functionality: internal event receivers can not subscribe to events, as there is simply no implementation.

This is a nasty thing, because it limits the CloudStack API. It is almost impossible to predict who would like to subscribe to events even inside the CloudStack core, for example, to implement deferred processing. Using the standard Kafka Event Bus, some of the event bus capabilities are no longer available, and troubleshooting this regression is very difficult. To overcome this, we implemented a “hybrid” bus that uses the inMemory bus for internal purposes and the Kafka or RabbitMQ bus for external communications.

You can find the extension on GitHub published under Apache 2 License.