Open ahsanakram786 opened 3 months ago
I'm testing this here and everything seems to work. This is what I've tested:
I modified app.py
from the examples/server/asgi
directory to use the Redis client manager. Diff:
diff --git a/examples/server/asgi/app.py b/examples/server/asgi/app.py
index 36af85f..0e27387 100644
--- a/examples/server/asgi/app.py
+++ b/examples/server/asgi/app.py
@@ -11,8 +11,10 @@ admin_login = {
import uvicorn
import socketio
+mgr = socketio.AsyncRedisManager()
sio = socketio.AsyncServer(
async_mode='asgi',
+ client_manager=mgr,
cors_allowed_origins=None if not instrument else [
'http://localhost:5000',
'https://admin.socket.io', # edit the allowed origins if necessary
I started a Redis service on localhost:6379 and then started app.py. Once running, I connected to localhost:5000
with a web browser and verified that the server was running.
Then I started an async Python console with python -m asyncio
and sent a message to the browser with:
>>> import socketio
>>> mgr = socketio.AsyncRedisManager(write_only=True)
>>> await mgr.emit('my_response', {'data': 'Sent from external process'})
This is all working, so now it would be useful to know what's different in your application.
I was using python-socketio==5.8 server configured with django asgi server backend. Every thing was working before upgrading package to python-socketio==5.11.0. And then the event emitting from external Django process stops working,
i m using Redis for message broker with socketio
Here is my code:
And here is my python package versions:
And here is my redis-server version in linux