Bridge data to Pulsar

    Create Pulsar Topics:

      Create a rule:

      Go to EMQX Dashboard (opens new window), select the “rule” tab on the menu to the left.

      Select “message.publish”, then type in the following SQL:

      image

      Bind an action:

      Click on the “+ Add” button under “Action Handler”, and then select “Data bridge to Pulsar” in the pop-up dialog window.

      Two parameters is required by action “Data bridge to Pulsar”:

      1). Pulsar Topic

      2). Bind a resource to the action. Since the dropdown list “Resource” is empty for now, we create a new resource by clicking on the “New Resource” to the top right, and then select “Pulsar”:

      image

      Configure the resource:

      1. Set the "Pulsar Server" to "pulsar://pulsar-broker1:6650" (multiple servers should be comma-separated), and keep the default values for all other configurations. Click the "Test" button to make sure the connection can be created successfully, and then click the "Create" button.

      Back to the “Actions” dialog, and then click on the “Confirm” button.

      image

      We have finished, testing the rule by sending an MQTT message to emqx:

      Then inspect the Pulsar by consume the topic, verify a new record has been produced:

        And from the rule list, verify that the “Matched” column has increased to 1:

        image

        Starting at EMQX Enterprise 4.3.10 and 4.4.4, we support basic and authentication when connecting to Pulsar.

        For example, to enable token authentication, select token from the dropdown-box:

        image