FoundatioFx / Foundatio.Redis

Foundatio Redis
Apache License 2.0
97 stars 31 forks source link

Documentation for usage #72

Closed Telavian closed 3 years ago

Telavian commented 3 years ago

The code is obviously opensource and I likely could figure it all out with some trouble. However I was wondering what is the "path" a message follows from beginning to end? For instance if there was stuck messages or a problem then how would I go about diagnosing this?

What does each general key pattern mean?

Also does it matter if every connection and every queue has maintenance turned on? When can it be turned off? What does it even do?

niemyjski commented 3 years ago

Thanks for reaching out. Can you please provide a little more context for your first two questions. Are you referring about queues, cache client, or storage.

For your last question about queues, We try and take out a maintenance lock using the CacheLockProvider. Although we'd recommend only running the maintenance on background jobs (so your web processes are also not fighting for locks and doing extra work). The maintenance loop (https://github.com/FoundatioFx/Foundatio.Redis/blob/master/src/Foundatio.Redis/Queues/RedisQueue.cs#L537) Handles auto abandoning items, moving retry items in the wait list back to be processed and trimming dead letter.

Telavian commented 3 years ago

Thanks. I am lastly wondering about the keys.

For instance if I publish a message to queue "TestQueue" then what keys should I expect before publish, after publish, and after consume.

niemyjski commented 3 years ago

I'm not sure off the top of my head without digging into the code again but you could debug one of our simple unit tests and then run keys * from the redis cli after each breakpoint. There would be at least one list prefixed with something like q:TestQueue: with items in it. This would give you a full list of keys.

Telavian commented 3 years ago

ok. Thanks.