Using EventAdmin for interprocess-communication

One of the tricks to really loosely coupling components in Eclipse is using an event broker to publish events and subscribe to events. You can roll your own which is easy enough (lets face it – it’s a listener interface and a list keeping track of listeners) but it adds a constraint among plug-ins. Another solution is to use the OSGi EventAdmin service.

EventAdmin uses a concept of hierarchical topics much like a messaging system (JMS) and is available from all plugins. You simply add a dependency on and you’re laughing.

This “Event Admin Service specification explained by Example” post has all the info you need to get started and if you ask nicely and there’s enough interest I might even share my EventAdmin test plugin with you… 🙂

4 thoughts on “Using EventAdmin for interprocess-communication”

  1. Nice Mikkel!

    I actually have an Event Admin to Property Broker bridge.  Haven’t heard a lot of requests for it but here is what it does in a nutshell:

    You can add the bridge component to a page, define what properties it has and tie them to an Event Admin topic.  The component then generates output properties and Set actions for each of those properties.  This allows for a full circle communication between Event Admin topics and the declarative wiring of the property broker.


Comments are closed.