3 ms·
RQ uses Python's Pickle and it doesn't have any serialization protocol so it stays Python only.
by thangngoc89 2y ago
RQ uses Python's Pickle and it doesn't have any serialization protocol so it stays Python only.
- justinclift 2y agoYeah, it's a right pain. :(
- SideburnsOfDoom 2y agoMost queuing systems that I have used, you can send text or bytes, so the most common denominator is DTOs encoded as json, encoded as UTF-8 text. You could do likewise, (i.e. send text containing a representation of what you want) and this would allow other languages to consume? But that's an edge case (sending text) of an edge case (RQ).
- thangngoc89 2y agoRQ never publishes a real protocol for sending and receiving jobs. Also the `data` field could be anything because it's pickled so you could send a whole Python's object there. See [1] for efforts to make RQ cross language compatible [1] https://github.com/rq/rq/issues/1808 https://github.com/rq/rq/issues/1808
- SideburnsOfDoom 2y ago> RQ never publishes a real protocol for sending and receiving jobs. Then, RQ sounds substandard. > Also the `data` field could be anything "the sender could send anything" is true in theory, but in practice it is both useless and false. If you want to make it work, sender and receiver need to agree on a lot. JSON could take any forms too, but the sender and receiver have to typically agree, implicitly or explicitly, on many of the details of the message. Like, what fields are needed, what the allowable values are, etc.