threefoldtech / rmb-rs

RMB implementation in rust
Apache License 2.0
3 stars 1 forks source link

Message expiration value should have an upper limit #164

Closed sameh-farouk closed 9 months ago

sameh-farouk commented 9 months ago

The max for Redis Expire command is 9223372036854775807 (about 2924712086 century). Therefore, We should not allow messages to have unrealistic expiration period.

We should either have a validation on message expiration value to make sure it not exceeded certain threshold, or adjust it in postman layer as we do when we set a default TTL for messages without one.

muhamadazmy commented 9 months ago

Since relay does not care about expiration time on the message, the expiration should be capped on the peer sides