Code Monkey home page Code Monkey logo

Comments (5)

zmstone avatar zmstone commented on May 24, 2024 1

Hello,

It might be related to this PR #11032 @zhongwencool could you please take a look?

This pr was released in 5.1.

from emqx.

ieQu1 avatar ieQu1 commented on May 24, 2024

Hello,

It might be related to this PR #11032
@zhongwencool could you please take a look?

from emqx.

zmstone avatar zmstone commented on May 24, 2024

@KazW

It looks like a compatibility issue between 5.3.0 data integration schema and 5.4.1.
I noticed that you are trying to override the http integration url with environment variable EMQX_CONNECTORS__HTTP__MQTT_MESSAGE__URL
But there were no EMQX_BRIDGE__... in the 5.3.0 run?

Could you share your base config in 5.3 with regards to the http/webhook data integration?

from emqx.

KazW avatar KazW commented on May 24, 2024

@zmstone

The URL needed to be set in both places, otherwise the flow page said that the flow was connected to a deleted action.

The EMQX_BRIDGE__ settings make it into the config map, so they are part of the ENV when I did the 5.3.0 run, but there is no log line for them. However, the config breaks if it's missing.

Aside from authn/authz/listener sections, these are all the actions/bridges/connectors/rules in the config.

emqxConfig:
  EMQX_ACTIONS__HTTP__MQTT_MESSAGE__CONNECTOR: "mqtt_message"
  EMQX_BRIDGES__WEBHOOK__MQTT_MESSAGE__URL: "http://mqtt-api-host.mqtt-namespace/message"
  EMQX_CONNECTORS__HTTP__MQTT_MESSAGE__URL: "http://mqtt-api-host.mqtt-namespace/message"
  EMQX_ACTIONS__HTTP__MQTT_EVENT__CONNECTOR: "mqtt_event"
  EMQX_BRIDGES__WEBHOOK__MQTT_EVENT__URL: "http://mqtt-api-host.mqtt-namespace/event"
  EMQX_CONNECTORS__HTTP__MQTT_EVENT__URL: "http://mqtt-api-host.mqtt-namespace/event"
  EMQX_RULE_ENGINE__RULES__MQTT_MESSAGE__ACTIONS: '[\"webhook:mqtt_message\"]'
  EMQX_RULE_ENGINE__RULES__MQTT_MESSAGE__SQL: |-
    SELECT
        id,
        clientid,
        username,
        base64_encode(payload) AS payload,
        peerhost,
        topic,
        qos,
        flags,
        headers,
        pub_props,
        timestamp,
        publish_received_at,
        node
    FROM
        \"#\"
  EMQX_RULE_ENGINE__RULES__MQTT_EVENT__ACTIONS: '[\"webhook:mqtt_event\"]'
  EMQX_RULE_ENGINE__RULES__MQTT_EVENT__SQL: |-
    SELECT
      *
    FROM
      \"$events/message_delivered\",
      \"$events/message_acked\",
      \"$events/message_dropped\",
      \"$events/client_connected\",
      \"$events/client_disconnected\",
      \"$events/client_connack\",
      \"$events/client_check_authz_complete\",
      \"$events/session_subscribed\",
      \"$events/session_unsubscribed\",
      \"$events/delivery_dropped\"

from emqx.

zmstone avatar zmstone commented on May 24, 2024

Hi @KazW
Thank you for your reply.
The reason I'm asking is: it seems odd that you have EMQX_BRIDGES__ and EMQX_ACTIONS__ at the same time.

Since 5.3, bridges are being gradually refactored to action + connector.
For backward compatibility, if bridge is configured, EMQX splits it into two parts (action and connector) when loading the configs.

The behavior is undefined when both bridge and action + connector exist for the same webhook integration.
Maybe it worked in 5.3 by accident, then in 5.4 there is more strict schema check.
The error message provided in your original post #{kind => validation_error,path => "actions.http.mqtt_message.parameters",reason => required_field} hints that the parameters filed is not found: https://www.emqx.io/docs/en/v5.4.1/hocon/#V-actions-S-actions-http-S-http_action-parameters

If you want to keep using the bridge config,
you can follow the config schema here: bridges

If you wish to move to the new action + connector config style,
you can follow the config schema here:
actions
connectors

Note: eventually we will stop publishing documents for bridge, but keep only action and connector.

from emqx.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.