Skip to content

Add history TTL configuration validation during message publishing - #498

Open
yinheli wants to merge 1 commit into
centrifugal:masterfrom
yinheli:feature/history-ttl-validation
Open

Add history TTL configuration validation during message publishing #498
yinheli wants to merge 1 commit into
centrifugal:masterfrom
yinheli:feature/history-ttl-validation

Conversation

@yinheli

@yinheli yinheli commented Jul 25, 2025

Copy link
Copy Markdown

Summary

This PR implements history TTL configuration validation during message publishing to prevent runtime errors caused by incorrect TTL configurations.

Background

This addresses #367, which was created in response to the Redis XADD errors reported in centrifugal/centrifugo#768

Users encountered the following error when history_ttl was configured to be greater than history_meta_ttl:

…vent runtime errors caused by incorrect TTL configurations
@yinheli
yinheli force-pushed the feature/history-ttl-validation branch from 7caef5e to fe1d4a8 Compare July 25, 2025 15:26
@FZambia

FZambia commented May 10, 2026

Copy link
Copy Markdown
Member

Just realized I forgot to comment here - sorry @yinheli for that.

I think the error here should not be part of client protocol (i.e. be an *Error) – it's more like an internal server error for clients. Some typed internal error is enough in the beginning I suppose.

It's not very handy for Centrifuge maybe to return such an error in runtime, but this is how library structured and the nature of ephemeral channels. In Centrifugo it's possible to validate configuration of retention policies on startup, so users won't hit such error in runtime.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants