Is there a good lightweight framework for java that provides the publish/subscribe pattern?
Some ideal features
I know about JMS but that is overkill for my need. The publish/subscribed data are the result of scans of a file system, with scan results being fed to another component for processing, which are then processed before being fed to another and so on.
EDIT: All within the same process. PropertyChangeListener from beans doesn't quite cut it, since it's reporting changes on properties, rather than publishing specific items. I could shoehorn ProprtyChangeListener to work by having a "last published object" property, and so published objects. PropertyChangeListeners don't support generics, and are entrenched in property change semantics, rather than pure publish/subscribe. The java.util Observer/Observable pattern would be good, but Oberver is a concrete class.
It seems this fits the requirements:
EventBus from Google Guava Library - "Publish-subscribe-style communication between components without requiring the components to explicitly register with one another". It can also be an AsyncEventBus that will dispatch events on another thread.
Some extra options to consider:
If it's in same process it's possible the Observer pattern can be used. Subscribers can add listeners and receive event notifications. Observable is already part of the Java API.
FFMQ is a full Java, light-weight, Fast JMS 1.1 Queue implementation.