Interface PersistenceConfig

All Superinterfaces:
Config

public interface PersistenceConfig extends Config
Configuration for the topic persistence service.

By default the persistence service is not enabled. Enabling persistence will cause all topics and updates to those topics to be persisted to files enabling the topics to be restored when the server is restarted.

When a server is started and persistence is on, the topic tree will be restored from existing persistence files. This will happen concurrently with connecting client sessions, replication, remote servers and fan-out and the persistence system will resolve any conflicts.

Topic events (such as the creation of topics, updates to topics and removal of topics) are written to 'append only' files as they occur. To manage the size of these files they are periodically switched out of service so that they can be made available for 'compaction'.

The process of 'compaction' involves reading existing files, removing redundant information (for example, removed topics and anything but the last update to each topic) and then writing back a single 'compacted' file.

Since:
6.0
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    Indicates whether the persistence service is enabled.
    void
    setEnabled(boolean enabled)
    Enable or disable the persistence service.

    Methods inherited from interface com.pushtechnology.diffusion.api.config.Config

    isLocked
  • Method Details

    • setEnabled

      void setEnabled(boolean enabled) throws ConfigException
      Enable or disable the persistence service.

      The service is disabled by default.

      Parameters:
      enabled - true to enable the persistence service
      Throws:
      ConfigException - if the configuration is locked
    • isEnabled

      boolean isEnabled()
      Indicates whether the persistence service is enabled.
      Returns:
      true if enabled
      See Also: