skip to Main Content

Why Redis SCAN would return an empty result when the same pattern used with KEYS returns something?

The KEYS command returns some results: > keys Types/*/*BackgroundJob.json 1) "Types/Xyz.Data/Xyz.Data.BackgroundJobEngine.BackgroundJob.json" 2) "Types/Xyz.Web.SystemAdmin/Xyz.Web.SystemAdmin.Models.Encryption.EncryptionMethodByBackgroundJob.json" 3) "Types/BackgroundJobs/SharpTop.Engine.BackgroundJobs.AutofillBackgroundJob.json" 4) "Types/Quartz.Server/BJE.UDT.BackgroundJob.json" 5) "Types/DFControllersTest.Compensation/DFControllersTest.Compensation.SubmitCompensationPublishBackgroundJob.json" 6) "Types/SpecFlowTest.Architecture.Base/SpecFlowTest.Architecture.Base.Model.IntStudioConfigBackgroundJob.json" 7) "Types/SpecFlowTest.Benefits.UI/SpecFlowTest.Benefits.UI.Base.Services.BackgroundJobsService+BackgroundJob.json" 8) "Types/Xyz.WFM.ExpressionService.Client/Xyz.WFM.ExpressionService.Client.BackgroundJob.ExpressionManagerBackgroundJob.json" 9) "Types/DFControllersTest.Compensation/DFControllersTest.Compensation.SubmitGenerateBudgetWorksheetBackgroundJob.json" 10) "Types/DFControllersTest.Compensation/DFControllersTest.Compensation.SubmitCompensationUnPublishBackgroundJob.json" 11) "Types/IntegrationStudio/IntegrationStudio.DAL.Entities.IntStudioConfigBackgroundJob.json" 12) "Types/IntegrationStudio/IntegrationStudio.DAL.Entities.BackgroundJob.json" But the SCAN using the same pattern…

VIEW QUESTION

Redis – Fastify plugin usage

I'm studying Fastify and register plugin with @fastify/redis like this app.register(redisPlugin, { client: initRedis(app.config.REDIS_INTERNAL__HOST, app.config.REDIS_INTERNAL__PASS), closeClient: true, }); And register route: import { FastifyInstance, FastifyPluginAsync } from "fastify"; import v1Routes from "./v1/index.js"; const routes: FastifyPluginAsync = async (fastify: FastifyInstance): Promise<void>…

VIEW QUESTION

How to avoid duplicate notifications when subscribing multiple times to the same Redis channel?

I have an issue where, if I subscribe multiple times to the same Redis channel, my subscribers start receiving duplicate messages. Here is my subscription method: public void SubscribeToUserNotifications(string userId, Action<string?> onMessage) { _subscriber.Subscribe ( new RedisChannel($"orders:notifications:user:{userId}", RedisChannel.PatternMode.Literal), (channel, message)…

VIEW QUESTION
Back To Top
Search