Nishanth Mathew Joy
09/26/2025, 12:16 PMAsk Inkeep
09/26/2025, 12:16 PMAsk Inkeep
09/26/2025, 12:16 PMOPAL_DATA_UPDATER_CONN_RETRY configuration (1) .
The configuration accepts a JSON object that specifies retry options when connecting to data sources :
{
"wait_strategy": "random_exponential",
"max_wait": 10,
"attempts": 5,
"wait_time": 1
}
This configuration controls retry behavior when the OPAL Client connects to base data sources (such as external API servers that return data snapshots) .
Additionally, when using the HTTPX client provider (OPAL_HTTP_FETCHER_PROVIDER_CLIENT=httpx) , there's now support for specifying HTTP timeouts via environment variables, which was added in OPAL v0.8.2 (2) . Previously, the default timeout of 5 seconds was always used .Ask Inkeep
09/26/2025, 12:16 PMThomas
09/26/2025, 12:57 PMNishanth Mathew Joy
09/26/2025, 1:59 PMAsk Inkeep
09/26/2025, 1:59 PMAlon Boshi
09/26/2025, 2:04 PMAsk Inkeep
09/26/2025, 2:04 PMAsk Inkeep
09/26/2025, 2:04 PM__aenter__ method where you initialize connections . For example, when using asyncio-ready libraries like asyncpg for database connections, you can specify connection parameters including timeouts :
async def __aenter__(self) :
# initializing parameters from the event/config
self._event: PostgresFetchEvent
dsn: str = self._event.url
connection_params: dict = {} if self._event.config.connection_params is None else self._event.config.connection_params.dict(exclude_none=True)
# connect to the postgres database
self._connection: asyncpg.Connection = await asyncpg.connect(dsn, **connection_params)
# start a readonly transaction (we don't want OPAL client writing data due to security!)
self._transaction: Transaction = self._connection.transaction(readonly=True)
await self._transaction.__aenter__()
return self
Since custom fetch providers should use asyncio-ready libraries instead of blocking libraries , you can configure timeouts directly in whatever async library you're using for your specific data source.Ask Inkeep
09/26/2025, 2:04 PMAsk Inkeep
09/26/2025, 3:30 PM