We left Russia. We are against aggression and war with Ukraine. It is a tragedy for our nations, it is a nightmare

How to target one server for a specific job

I have a webhook process where I want to limit the number of duplicate POSTs. To this end in my Http call I instituted a 1 minute cache. This prevents the exact same payload from being sent multiple times. It works well but because I have 3 servers running and the memory cache is distinct to each server it misses some. Is there any way I can decorate a method, so that it only runs on one server or do I need to move my memory cache to a distributed cache?

didn’t fully understand your use case, but if you’re looking for a way to process specific job on a specific server, just configure different queues on the two servers, than enqueue the job you want on the specific server with the appropriate queue.