Giter VIP home page Giter VIP logo

Comments (8)

didier-wenzek avatar didier-wenzek commented on June 19, 2024

I have a mix feeling here.

  • On one side, I understand your need and it would be a small change to the config and the mapper.
  • On the other side, this has side effects on the tedge connect command that will have to act on a remote host.
  • Somehow this parameter is only required by the mapper.

So I don't see that as a long term solution.

  • We need first to decouple thin-edge from systemd,
  • and then, to ease how thin-edge can be deployed over containers or inter-connected devices.

from thin-edge.io.

mbay-ODW avatar mbay-ODW commented on June 19, 2024

The reason for the request ist that some of the customers already do have and use their own MQTT Broker. In terms of management its thus easier to use the existing one instead of needing another one just for thin-edge.

I do agree that in terms of security and e.g. credential handling some design effort is needed. However this scenario does happen out in the field.

from thin-edge.io.

didier-wenzek avatar didier-wenzek commented on June 19, 2024

Connecting to an MQTT broker deployed independently is definitely something that should be feasible.

from thin-edge.io.

mbay-ODW avatar mbay-ODW commented on June 19, 2024

Is the function tedge config set mqtt.external.bind_address meant for that?

from thin-edge.io.

didier-wenzek avatar didier-wenzek commented on June 19, 2024

The mqtt.external.bind_address is related but not what you expect.

  • This setting creates a second listener so the MQTT bus will accept both local and remote connections. However the tedge-mapper will still try to connect to the local bus.
  • In the multi-container use-case, the MQTT broker could be started with such a setting, but the mapper would require a parameter to connect its neighbor container. Something that cannot currently be done.

from thin-edge.io.

mbay-ODW avatar mbay-ODW commented on June 19, 2024

Could you point us to the files where this needs to be added, we would fork here probably. We searched for "mqtt.port" and did find out that these settings seems to be done in several rust files such that it was not clear to us where to add that function in detail.

@didier-wenzek:
Would it be here:

Link

mqtt_options.broker_address("IP");

Would that do the trick?

from thin-edge.io.

didier-wenzek avatar didier-wenzek commented on June 19, 2024

If you wish to add this feature, I see two approaches.

Add a --host parameter to the tedge_mapper daemon.

  • This is done with a new field of the MapperOpt struct
  • This parameter will have to be passed to the start function of all the mappers implementation.
  • And used in the create_mapper function.

The second step might be a bit tedious.

Add a mqtt.host parameter in tedge config.

  • Add a new setting in the tedge_config along the lines of what has been done for mqtt.port.
  • Use that setting in the mqtt_config function of the mapper.

The first step impacts numerous files but is not difficult.

from thin-edge.io.

reubenmiller avatar reubenmiller commented on June 19, 2024

Good news, this is solved by #1773. The feature has been merged into main already, and is under official verification.

from thin-edge.io.

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.