在mqtt上发布gerrit流

germqtt的Python项目详细描述


germqtt,顾名思义,是发布gerrit事件流的工具 进入MQTT。它将发布gerrit事件流中的所有捕获事件 并将它们发布到mqtt,按项目和事件类型划分主题。为了 示例添加到项目名foo的注释将作为事件发布 关于主题:添加基本主题/foo/评论

默认情况下,germqtt设置为守护进程,但是如果需要运行它 以交互方式,您可以使用–foreground选项来执行此操作。

配置

要使germqtt正常工作,需要一些信息。 这些设置在配置文件中指定。

格瑞特

您需要提供连接到的凭据和连接信息 gerrit获取事件流。germqtt使用gerritlib库建立 通过ssh连接gerrit并监听事件流。所有这些 选项位于[gerrit]部分。gerrit需要的3个选项是:

  • username - The username to login with
  • hostname - The hostname for your gerrit server
  • key - The path to your ssh key to use for connecting to gerrit

还有一个可选的配置选项port,用于指定 连接Gerrit的端口。默认设置为29418,即 格瑞特违约。如果gerrit服务器使用非默认端口,则需要设置 这个选项。

mqtt

与gerrit一样,与mqtt交谈有几个必需的选项,其中 是GeMQTT中的另一个通信轴。配置mqtt的选项 通信进入[mqtt]部分。两个必需的选项是:

  • hostname - The hostname for the MQTT broker
  • topic - The base topic name to use for the gerrit events

还有一些用于与mqtt通信的可选设置 可设置:

  • port - The port to communicate to the MQTT broker on. By default this
    is set to 1883, the default MQTT port. This only needs to be set if your broker uses a non-default port.
  • keepalive - Used to set the keepalive time for connections to the MQTT
    broker. By default this is set to 60 seconds.
  • username - Used to set the auth username to connect to the MQTT broker
    with.
  • password - Used to set the auth password to connect to the MQTT broker
    with. A username must be set for this option to be used.

其他设置

默认情况下,germqtt将对其pid文件使用/var/run/germqtt.pid,如果 您想使用不同的文件来存储pid,可以使用pid file 配置文件的[默认值]部分中的选项。

欢迎加入QQ群-->: 979659372 Python中文网_新手群

推荐PyPI第三方库


热门话题
如何在java中调用Paint组件方法   多层次POM中的java覆盖依赖项/插件管理   java模式识别   JavaSpringMVC+Log4j2定义了Log4j2。未标识非类路径位置中的属性文件   java我们如何将IntelliJ IDEA中的maven和gradle项目与源代码浏览支持集成?   Maven mvn exec:java在Windows上工作,但不是Ubuntu 20   java在Jaxb2Marshaller上使用带有packagesToScan属性的JAXBElement时没有端点适配器   java删除方法和节点   java如何为某些场景创建正则表达式模式   java如何通过gridView中的intent()传递ArrayList数据。setOnItemClickListener()   java UnsupportedClassVersionError 1.7/1.5   java为什么JVM参数是http。tomcat servlet没有使用proxyHost?   java将ArrayList从字母顺序排序到最频繁/最不频繁   java动态字段列表迭代   java如何将字节转换为位?   hadoop java。mapreduce作业中的lang.NullPointerException   javasocketIO无法与Android中的LocationListener一起使用   java在卸载时清除内部存储   java池回收错误2个精灵同时碰撞到一个精灵