key column length (256 chars) makes problem in long key rate limitation in postgres
The key column in the generated table by RateLimiterPostgres is defined in this way:
character varying (256)
So when the length of selected key is bigger than 256 characters, it fails, without any log and just returns 429!!!
I've used SHA-256 hash function to create 256 characters-key to make sure that it never fails
@KeyvanArj Hey, that's interesting case, thank you for reporting.
While SHA-256 solution is good, there is another one I could suggest. Database table can be created separately from RateLimiterPostgres with any scheme you wish. There is tableCreated option, which should be set to true during rate limiter creation.
Anyway, it shouldn't throw 429. Could you share your code, which processes rejected consume call?
Closing this, since it is not a bug and there are at least two ways to solve this edge case.