Interface HibernateSearchOutboxPollingRuntimeConfigPersistenceUnit.EventProcessorShardsConfig

Enclosing interface:
HibernateSearchOutboxPollingRuntimeConfigPersistenceUnit

public static interface HibernateSearchOutboxPollingRuntimeConfigPersistenceUnit.EventProcessorShardsConfig
  • Method Summary

    Modifier and Type
    Method
    Description
    Among shards that will form a partition of the entity change events, the shards that will be processed by this application instance.
    The total number of shards that will form a partition of the entity change events to process.
  • Method Details

    • totalCount

      OptionalInt totalCount()
      The total number of shards that will form a partition of the entity change events to process. By default, sharding is dynamic and setting this property is not necessary. If you want to control explicitly the number and assignment of shards, you must configure static sharding and then setting this property as well as the assigned shards (see `shards.assigned`) is necessary. See link:{hibernate-search-docs-url}#coordination-outbox-polling-event-processor-sharding[this section of the reference documentation] for more information about event processor sharding.
    • assigned

      Optional<List<Integer>> assigned()
      Among shards that will form a partition of the entity change events, the shards that will be processed by this application instance. By default, sharding is dynamic and setting this property is not necessary. If you want to control explicitly the number and assignment of shards, you must configure static sharding and then setting this property as well as the total shard count is necessary. Shards are referred to by an index in the range `[0, total_count - 1]` (see `shards.total-count`). A given application node must be assigned at least one shard but may be assigned multiple shards by setting `shards.assigned` to a comma-separated list, e.g. `0,3`. See link:{hibernate-search-docs-url}#coordination-outbox-polling-event-processor-sharding[this section of the reference documentation] for more information about event processor sharding.