What's New
Decoupled PubSub from DataHandler
Storage and pub/sub are now independently configurable. You can mix and match any storage backend with any pub/sub handler.
New PubSubHandler interface — pass it explicitly to DataAPIImpl:
DataAPIImpl api = new DataAPIImpl(storage, pubSubHandler);New Storage Backends
- MongoDataStorage — MongoDB support via
mongodb-driver-sync
New PubSub Handlers
- RedisPubSubHandler — extracted from the old
DistributedEventBus - KeyDBPubSubHandler — KeyDB support (wire-compatible with Redis)
Breaking Changes
DataStorage.supportsListeners()removed — local events now work with all storage backendsDistributedEventBusconstructor now takesPubSubHandlerinstead ofJedisPoolDataAPIImplno longer auto-detects pub/sub from storage type
Example: MongoDB + KeyDB
DataAPIImpl api = new DataAPIImpl(
new MongoDataStorage(mongoClient, "mydb"),
new KeyDBPubSubHandler(new JedisPool("keydb-host", 6379))
);