Git Product home page Git Product logo

Comments (2)

terry-xiaoyu avatar terry-xiaoyu commented on September 12, 2024

Hi, you could update the app.config directly.

The app.config is the config file that is converted from the emq.conf and the configs of your plugins. The app.config is then used by EMQ directly.

For example in my Mac there is a running emq, and following is the process info:

$ ps -ef | grep beam

501  4422  4420   0  8:41δΈ‹εˆ ttys002    0:01.41 /Users/emqer/code/emq-relx/_rel/emqttd/erts-9.3/bin/beam.smp -W w -e 256000 -Q 65536 -P 256000 -A 32 -K true -zdbbl 8192 -- -root /Users/emqer/code/emq-relx/_rel/emqttd -progname Users/emqer/code/emq-relx/_rel/emqttd/bin/emqttd -- -home /Users/emqer -- -boot /Users/emqer/code/emq-relx/_rel/emqttd/releases/2.3.5/emqttd -mode embedded -boot_var ERTS_LIB_DIR /Users/emqer/code/emq-relx/_rel/emqttd/erts-9.3/../lib -mnesia dir "/Users/emqer/code/emq-relx/_rel/emqttd/data/mnesia/[email protected]" -config /Users/emqer/code/emq-relx/_rel/emqttd/data/configs/app.2018.04.14.20.41.16.config -kernel net_ticktime 60 -smp auto -setcookie emqsecretcookie -proto_dist inet_tcp -name [email protected] -vm_args /Users/emqer/code/emq-relx/_rel/emqttd/data/configs/vm.2018.04.14.20.41.16.args -- console

You would notice the -config /Users/emqer/code/emq-relx/_rel/emqttd/data/configs/app.2018.04.14.20.41.16.config argument of the command line, which shows which config file it uses. Let's check the content of this file, jump the emq_auth_http section:

$ cat /Users/emqer/code/emq-relx/_rel/emqttd/data/configs/app.2018.04.14.20.41.16.config

...
{emq_auth_http,
     [{auth_req,
          [{url,"http://127.0.0.1:8080/mqtt/auth"},
           {method,post},
           {params,[{"clientid","%c"},{"username","%u"},{"password","%P"}]}]},
      {super_req,
          [{url,"http://127.0.0.1:8080/mqtt/superuser"},
           {method,post},
           {params,[{"clientid","%c"},{"username","%u"}]}]},
      {acl_req,
          [{url,"http://127.0.0.1:8080/mqtt/acl"},
           {method,get},
           {params,
               [{"access","%A"},
                {"username","%u"},
                {"clientid","%c"},
                {"ipaddr","%a"},
                {"topic","%t"}]}]}]}
...

Now you can update this section and reload your emq-auth-http plugin again. In this method it is not necessary to restart you entire emq.

Reload the configs at the runtime is still possible, but this feature is not planned in the coming versions.

from emqx-auth-http.

turtleDeng avatar turtleDeng commented on September 12, 2024

The plugin configuration has been modified in emqx-3.1-beta.1, and the reload plugin takes effect.

$ ./bin/emqx_ctl plugins reload emqx_auth_http

from emqx-auth-http.

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.