Open vporton opened 6 years ago
Please note that your software is largely useless without proper documentation.
This is an open source library written in my own spare time, it's marked as beta and of unfortunately it lacks proper documentation.
You can just have a look at the code, as the library is very small to figure out things.
You are welcome to contribute opening pull requests to improve the docs
The issue is solved by using pika
in the way described at https://github.com/vporton/pushpull
In some reason I cannot create a pull request (there is no "Create pull request" button) for this documentation change. Maybe I need to wait when my previous pull request is accepted.
How is it determined to which WebSockets a message send to RabbitMQ is delivered?
Reversely, how is it determined to which channels (or what?) of RabbitMQ a frame delivered through WebSocket is delivered?
Docs are silent on this important issue. Please note that your software is largely useless without proper documentation.
I have created the following authenticator:
I run it as:
pushpull-client authenticate_amqp amqp://localhost/ ws_app.django_session:main
In my JavaScript code I pass the Django Session ID in
http-authorization
URL parameter of thews://
connection.And after this I do not receive WS messages in my JavaScript code.
Before writing and testing this my code I thought that I pass the Session ID as
http-authorization
URL parameter, my auth code converts it to Django user ID and this user ID can be used as the user ID for RabbitMQ. In some reason this does not work. It seems I misunderstand something.I also use:
Now my problem:
I need to communicate with a WebSocket client identified by a secret hash (such as Django Session ID). I do not understand how to send a message to only one user (that one which we have Session ID of).
I thought that Session ID is the
user_token
(as in your docs) and User ID can be used asuser_id
(as in your docs).Also: How to send a message to a particular WS user using
pika
Python library?