asgi_rabbitmq | RabbitMQ backend for ASGI | Websocket library
kandi X-RAY | asgi_rabbitmq Summary
kandi X-RAY | asgi_rabbitmq Summary
RabbitMQ backend for ASGI
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of asgi_rabbitmq
asgi_rabbitmq Key Features
asgi_rabbitmq Examples and Code Snippets
Community Discussions
Trending Discussions on asgi_rabbitmq
QUESTION
Let me preface this by saying: I am a beginner at RabbitMQ and the concepts around it. I think I am starting to understand though.
I currently have a problem with Django Channels. I had a setup where I was using the 'asgiref.inmemory.ChannelLayer' and I am currently switching to 'asgi_rabbitmq.RabbitmqChannelLayer' This all seems to work fine until I try to connect to the websocket from the browser. Nothing happens for a while (7 or 8 seconds) and then all of a sudden the websocket.receive gets triggered and the websocket disconnects.
I think it is because the reply channel is not receiving my accept message.(or perhaps too late).
routing:
...ANSWER
Answered 2018-Feb-01 at 17:37Turns out, it is propably because RabbitMQ is not meant for creating queues on the fly like that. So it is too slow causing the websocket to time out. I switched to a Redis channel layer and now it seems to be working perfectly!
QUESTION
I am a bit new to django channels and message queues in general.
My requirement is as follows:
Web page makes a websocket connection to django server django server needs to subscribe to channels (based on username) on a rabbitMQ server When a message arrives on subscribed channels, route it to the appropriate user web socket, and the web page updates UI I got a basic websocket sample app working as per http://channels.readthedocs.io/en/stable/
Now I'm trying to handle messages that come from a rabbitmq channel
I have the following routing:
...ANSWER
Answered 2017-Nov-09 at 08:55The problem is that the message being sent needs to be packed using msgpack
(and mirror the structure of the Message in django channels), like this:
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install asgi_rabbitmq
You can use asgi_rabbitmq like any standard Python library. You will need to make sure that you have a development environment consisting of a Python distribution including header files, a compiler, pip, and git installed. Make sure that your pip, setuptools, and wheel are up to date. When using pip it is generally recommended to install packages in a virtual environment to avoid changes to the system.
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page