简体   繁体   中英

How to use vert.x eventbus to communicate between openfaas functions

I am using Vert.x in my openfaas function and I want to communicate between them using vert.x event bus but I am not sure how to use event bus for out side of a function. It works in same function. I didn't find any documentation or resource about this. Currently I am using vertx java11 template for openfaas function but I also want to use python version for ml model and want to communicate between them using event bus. Is it possible in openfaas?

If you need to use the eventbus across multiple machines then you need to use a clustered eventbus using any one of the many cluster managers that vert.x supports. When the function comes up it will register it self with the cluster and will be able to communicate with it.

Using the eventbus in a lambda type application will work but seems like a weird pattern. You may want to consider other options such as

  1. http request
  2. Redis pub sub

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM