Integrated Apache Camel and RabbitMQ message broker into highly complex product tech stack, consisting of hundreds (300+) of OSGi bundles and thousands of 3rd party dependencies, to enable development of new event driven features.

Some of the problems included:

  • Company’s product highly complex tech stack, consisting of hundreds (300+) of OSGi bundles and thousands of 3rd party dependencies, required integration of Apache Camel and RabbitMQ message broker to enable development of new event driven features
  • ActiveMQ message broker used in Company’s product lacked support for event driven capabilities required for new features
  • Apache Camel AMQP component through which Camel could be integrated with RabbitMQ without requiring upgrade of large number other other 3rd party dependencies could not be used due to AMQP protocol version required
  • Apache Camel RabbitMQ component was only available in newer version of Apache Camel, requiring upgrade of large number of other 3rd party dependencies due to its dependency on newer version of Spring
  • Integration of Apache Camel with RabbitMQ required upgrade of large number 3rd party dependencies comprising Company’s product tech stack as a prerequisite step
  • Spring Dynamic Modules used for dependency injection within OSGi container in Company’s product was no longer maintained, which prevented upgrade of related 3rd party dependencies
  • It was not known if and how framework, which is to be used as a replacement for Spring Dynamic Modules, can be integrated with Camel and RabbitMQ
  • Some 3rd party dependencies were not packaged for use in OSGi container
  • Exceptions were thrown when using custom types for messages sent and received via Apache Camel
  • Some services retrieved from dependency injection container failed method invocation

Some of the solutions applied included:

  • Researching and prototyping to understand how RabbitMQ message broker can be integrated with Apache Camel in Company’s product
  • Developing proof of concept of Apache Camel / RabbitMQ integration via Aries Blueprint in OSGi container to understand steps needed for integration of these new technologies into Company’s product
  • Identifying 3rd party dependencies which need to be upgraded to support integration of Apache Camel with RabbitMQ
  • OSGifying any 3rd party dependencies not packaged for use in OSGi container
  • Upgrading any required 3rd party dependencies comprising Company’s product tech stack to support integration of Camel with RabbitMQ
  • Migrating Company’s product tech stack dependency injection within OSGi container framework from Spring Dynamic Modules to Apache Aries Blueprint
  • Migrating Company’s product message broker from ActiveMQ to RabbitMQ
  • Creating new fragment bundle attached to Camel RabbitMQ bundle and importing packages where custom types reside thus adding them to classloader
  • Switching those services which fail method invocation after being retrieved from dependency injection container to use CGLIB proxying
  • Migrating all components in Company’s product from embedded ActiveMQ message broker to use external RabbitMQ message broker
  • Updating build scripts, target definition and product definition files to reflect changes applied
  • Automating installation of Erlang and RabbitMQ as well as initial configuration of RabbitMQ (exchanges, queues, management console) via self-contained Bash script

Technology stack

  • Java
  • Spring
  • Spring Dynamic Modules
  • OSGi
  • Apache Aries Blueprint
  • Apache Camel
  • RabbitMQ
  • ActiveMQ

Industry

IT