redis-smq
Version:
A high-performance, reliable, and scalable message queue for Node.js.
38 lines • 1.28 kB
JavaScript
import { key } from '../builder.js';
const mainPath = ['main'];
export const main = {
getMainKeys() {
return {
keyConfiguration: key(...mainPath, 'cfg'),
keyQueues: key(...mainPath, 'q'),
keyExchanges: key(...mainPath, 'exs'),
keyNamespaces: key(...mainPath, 'ns'),
keyPurgeJobs: key(...mainPath, 'pg-jobs'),
keyPurgeJobsPending: key(...mainPath, 'pg-jobs', 'pend'),
keyPurgeJobsProcessing: key(...mainPath, 'pg-jobs', 'proc'),
};
},
getJobKeys(jobId) {
return {
keyJobWorker: key(...mainPath, 'jobs', jobId, 'wrk'),
};
},
getWorkerKeys(workerId) {
return {
keyWorkerHeartbeat: key(...mainPath, 'wrk', workerId, 'hb'),
};
},
getConsumerKeys(consumerId) {
return {
keyConsumerQueues: key(...mainPath, 'cons', consumerId, 'q'),
keyConsumerHeartbeat: key(...mainPath, 'cons', consumerId, 'hb'),
};
},
getMessageKeys(messageId) {
return {
keyMessage: key(...mainPath, 'msg', messageId),
keyMessageUnacknowledgementHistory: key(...mainPath, 'msg', messageId, 'uh'),
};
},
};
//# sourceMappingURL=main.js.map