You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello, I don't typically submit issues however for a project I am working on, we are leveraging socketio with redis sentinel as the broker and happened to have difficulties getting this working.
My setup:
python-socketio (3.1.2)
redis-sentinel v4.0.9
The issue: When using standard redis as the broker, the setup seems to work fine. Multiple nodes can connect to the broker and all is well.
In my QA/Prod we are using Redis Sentinel and it seems the socketio does not handle sentinel natively and passes the buck to Kombu to manage/setup. Kombu appears to support redis sentinel however it will need the redis sentinel master_name in order to leverage the broker, per the _connection method in socketio/kombu_manager.py, however there isn't a hook into that currently.
I was able to get this working by passing the master_name to Kombu via the transport_options below and get Redis Sentinel working, however I would like to pass this via the SocketIO setup options.
My hacky patch to get working:
file - socketio/kombu_manager.py
line - 67 def _connection(self): transport_options = {'master_name' : 'OUR_MASTER_NAME_HERE'} return kombu.Connection(self.url, transport_options=transport_options)
Please let me know if any additional information is required and I'd be happy to provide what I can.
Thanks!
The text was updated successfully, but these errors were encountered:
Hello, I don't typically submit issues however for a project I am working on, we are leveraging socketio with redis sentinel as the broker and happened to have difficulties getting this working.
My setup:
python-socketio (3.1.2)
redis-sentinel v4.0.9
The issue: When using standard redis as the broker, the setup seems to work fine. Multiple nodes can connect to the broker and all is well.
In my QA/Prod we are using Redis Sentinel and it seems the socketio does not handle sentinel natively and passes the buck to Kombu to manage/setup. Kombu appears to support redis sentinel however it will need the redis sentinel master_name in order to leverage the broker, per the _connection method in socketio/kombu_manager.py, however there isn't a hook into that currently.
I was able to get this working by passing the master_name to Kombu via the transport_options below and get Redis Sentinel working, however I would like to pass this via the SocketIO setup options.
My hacky patch to get working:
file - socketio/kombu_manager.py
line - 67
def _connection(self): transport_options = {'master_name' : 'OUR_MASTER_NAME_HERE'} return kombu.Connection(self.url, transport_options=transport_options)
Please let me know if any additional information is required and I'd be happy to provide what I can.
Thanks!
The text was updated successfully, but these errors were encountered: