Skip to content

v1.1.0

Latest

Choose a tag to compare

@Swofty-Developments Swofty-Developments released this 06 Feb 00:48

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 backends
  • DistributedEventBus constructor now takes PubSubHandler instead of JedisPool
  • DataAPIImpl no 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))
);