Thanks @warped adder and @fallen lantern
I have installed Redis on Railway and the subscriber is working fine with the redis on my local machine. It was working fine without the Redis as well.
However, on production the subscriber completely stopped working. Earlier the subscriber was working 50-60% of the time without Redis. I can see the order.placed event created in Redis but in the log I don't see any subscriber triggered.
Here is my medusja-config.js
const modules = {
eventBus: {
resolve: "@medusajs/event-bus-redis",
options: {
redisUrl: REDIS_URL
}
},
/*
cacheService: {
resolve: "@medusajs/cache-redis",
options: {
redisUrl: REDIS_URL
}
},*/
};
/** @type {import('@medusajs/medusa').ConfigModule["projectConfig"]} */
const projectConfig = {
jwtSecret: process.env.JWT_SECRET,
cookieSecret: process.env.COOKIE_SECRET,
store_cors: STORE_CORS,
database_url: DATABASE_URL,
admin_cors: ADMIN_CORS,
// Uncomment the following lines to enable REDIS
redis_url: REDIS_URL
};
/** @type {import('@medusajs/medusa').ConfigModule} */
module.exports = {
projectConfig,
plugins,
modules,
};
Any suggestion how to get this work on Railway?
We are blocked on this. I thought it would be simple to setup order.placed subscriber notification on medusa.
Thank you so much
Som