Can WeChat Mini Programs communicate with the backend through kafka?

the backend considers using kafka to handle message queues, and hopes to communicate directly with the front end instead of socket.io , but the kafka protocol is customized, and it is uncertain whether Mini Program supports

.

because it is under investigation, it is inevitable to have biased understandings. If you have the ability and willingness to guide, thank you very much

.

this has nothing to do with Mini Program, as long as your back-end development comments support it.


first, you need to know what kafka does. Otherwise, you may also ask

  • can Mini Program access Java
  • can Mini Program access NodeJs
  • .

learned something about kafka. At present, it is generally understood that it is a strategy used by the back end to deal with message queues. Its consumer and customer are both roles in this strategy, and the front end is not one of its roles. Secondly, kafka is available in many languages, such as kafka-node, kafka-ruby, kafka-php, which are all backend language versions. Unlike the address specified by socket.io, Mini Program to connect to the backend, long-term continuous communication can be established. It seems that kafka cannot replace the role of socket.io .

attach some articles:

kafaka background and architecture introduction: http://www.infoq.com/cn/artic.

kafka's communication protocol: https://blog.csdn.net/jewes/a.

introduction to kafka Classic tutorial: https://blog.csdn.net/HMSIWTV.

What is Kafka: https://dzone.com/articles/wh.

kafka-node: https://github.com/SOHU-Co/ka.

https://cwiki.apache.org/conf.

Menu