Interface HibernateSearchOutboxPollingRuntimeConfigPersistenceUnit.EventProcessorConfig
- Enclosing interface:
HibernateSearchOutboxPollingRuntimeConfigPersistenceUnit
public static interface HibernateSearchOutboxPollingRuntimeConfigPersistenceUnit.EventProcessorConfig
-
Method Summary
Modifier and TypeMethodDescriptionintHow many outbox events, at most, are processed in a single transaction.booleanenabled()Whether the event processor is enabled, i.e. whether events will be processed to perform automatic reindexing on this instance of the application.How long to wait for another query to the outbox events table after a query didn’t return any event.How long an event processor "pulse" remains valid before considering the processor disconnected and forcibly removing it from the cluster.How long the event processor can poll for events before it must perform a "pulse", updating and checking registrations in the agents table.How long the event processor must wait before re-processing an event after its previous processing failed.shards()Configuration related to shards.The timeout for transactions processing outbox events.
-
Method Details
-
enabled
@WithDefault("true") boolean enabled()Whether the event processor is enabled, i.e. whether events will be processed to perform automatic reindexing on this instance of the application. This can be set to `false` to disable event processing on some application nodes, for example to dedicate some nodes to HTTP request processing and other nodes to event processing. See link:{hibernate-search-docs-url}#coordination-outbox-polling-event-processor[this section of the reference documentation] for more information. -
shards
Configuration related to shards. -
pollingInterval
How long to wait for another query to the outbox events table after a query didn’t return any event. Lower values will reduce the time it takes for a change to be reflected in the index, but will increase the stress on the database when there are no new events. See link:{hibernate-search-docs-url}#coordination-outbox-polling-event-processor[this section of the reference documentation] for more information. -
pulseInterval
How long the event processor can poll for events before it must perform a "pulse", updating and checking registrations in the agents table. The pulse interval must be set to a value between the polling interval and one third (1/3) of the expiration interval. Low values (closer to the polling interval) mean less time wasted not processing events when a node joins or leaves the cluster, and reduced risk of wasting time not processing events because an event processor is incorrectly considered disconnected, but more stress on the database because of more frequent checks of the list of agents. High values (closer to the expiration interval) mean more time wasted not processing events when a node joins or leaves the cluster, and increased risk of wasting time not processing events because an event processor is incorrectly considered disconnected, but less stress on the database because of less frequent checks of the list of agents. See link:{hibernate-search-docs-url}#coordination-outbox-polling-event-processor[this section of the reference documentation] for more information. -
pulseExpiration
How long an event processor "pulse" remains valid before considering the processor disconnected and forcibly removing it from the cluster. The expiration interval must be set to a value at least 3 times larger than the pulse interval. Low values (closer to the pulse interval) mean less time wasted not processing events when a node abruptly leaves the cluster due to a crash or network failure, but increased risk of wasting time not processing events because an event processor is incorrectly considered disconnected. High values (much larger than the pulse interval) mean more time wasted not processing events when a node abruptly leaves the cluster due to a crash or network failure, but reduced risk of wasting time not processing events because an event processor is incorrectly considered disconnected. See link:{hibernate-search-docs-url}#coordination-outbox-polling-event-processor[this section of the reference documentation] for more information. -
batchSize
@WithDefault("50") int batchSize()How many outbox events, at most, are processed in a single transaction. Higher values will reduce the number of transactions opened by the background process and may increase performance thanks to the first-level cache (persistence context), but will increase memory usage and in extreme cases may lead to ``OutOfMemoryError``s. See link:{hibernate-search-docs-url}#coordination-outbox-polling-event-processor[this section of the reference documentation] for more information. -
transactionTimeout
The timeout for transactions processing outbox events. When this property is not set, Hibernate Search will use whatever default transaction timeout is configured in the JTA transaction manager, which may be too low for batch processing and lead to transaction timeouts when processing batches of events. If this happens, set a higher transaction timeout for event processing using this property. See link:{hibernate-search-docs-url}#coordination-outbox-polling-event-processor[this section of the reference documentation] for more information. -
retryDelay
How long the event processor must wait before re-processing an event after its previous processing failed. Use the value `0S` to reprocess failed events as soon as possible, with no delay. See link:{hibernate-search-docs-url}#coordination-outbox-polling-event-processor[this section of the reference documentation] for more information.
-