CatalogElasticsearch

@Configuration(proxyBeanMethods = false)
class CatalogElasticsearch

The response timeout of the client Spring Boot builds of spring.elasticsearch.*, which the catalog's Elasticsearch store writes and reads through (its search and search-only profiles), as Operate › Elasticsearch tells an operator to set it ("A server that stops answering"). Boot's client has none, and its socket timeout does not end an exchange on a connection the pool reuses: a paused Elasticsearch would hold the client's connections until it answered, while the store's operation-timeout fails only the callers. With it, a request with no answer within the response timeout fails and frees its connection. The timeout is RESPONSE_TIMEOUT, which the search and search-only profiles set (application.yaml), 30 seconds by default: the store's operation-timeout, so a request is never ended while its caller still waits for it, and none outlives its caller by more. Keep it at or above the store's operation-timeout, and above the longest request the store makes (a search, the event index's access stamp).

Constructors

Link copied to clipboard
constructor()

Types

Link copied to clipboard
object Companion

Functions

Link copied to clipboard
@Bean
fun elasticsearchResponseTimeout(@Value(value = "${eshop.catalog.elasticsearch.response-timeout:30s}") responseTimeout: Duration): Rest5ClientBuilderCustomizer