We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Here is my case: nodejs server receives messages from AMQP, then push those messages to UI through socket.io-redis.
AMQP
socket.io-redis
I try to call emit() function in the callback of AMQP, it works well. However, I can NOT find data in redis server?
emit()
redis
Codes
var redisPort = 6379, redisHost = 'localhost'; var app = require('express')(), http = require('http').Server(app), io = require('socket.io')(http), redisAdapter = require('socket.io-redis'), redis = require('redis'); var pub = redis.createClient(redisPort, redisHost), sub = redis.createClient(redisPort, redisHost, {detect_buffers: true}); // io.adapter( redisAdapter({pubClient: pub, subClient: sub}) ); app.get('/', function(req, res){ res.sendFile('index.html'); }); io.on('connection', function(socket){ console.log("web socket connection ..."); socket.join('room'); socket.on('disconnect', function(){ console.log("socketio diconnect..."); }); });
callback function in AMQP
function response(msg){ io.to('room').emit('online', msg); } ... ch.consume(queue, response, {noAck: true});
Am I right to use this API emit()? or any other API?
The text was updated successfully, but these errors were encountered:
Closed due to inactivity.
Sorry, something went wrong.
No branches or pull requests
Here is my case: nodejs server receives messages from
AMQP
, then push those messages to UI throughsocket.io-redis
.I try to call
emit()
function in the callback ofAMQP
, it works well. However, I can NOT find data inredis
server?Codes
callback function in AMQP
Am I right to use this API
emit()
? or any other API?The text was updated successfully, but these errors were encountered: