Skip to main content



      Home
Home » Archived » Eclipse SmartHome » The io.transport.mqtt implementation is too restrictive(The bundle does not export much useful functionality. The MqttBrokerConnection would need to be exported. Add/remove/enumerate brokers in MqttService would be helpful.)
The io.transport.mqtt implementation is too restrictive [message #1766231] Sun, 18 June 2017 23:42 Go to next message
Eclipse UserFriend
The io.transport.mqtt bundle is very restrictive in what functionality it exports. At the moment it allows:

  • (un)registerConnectionObserver: Notification about dis/connection to a known broker.
  • (un)registerMessageConsumer: Subscribe to a topic on a known broker.
  • (un)registerMessageProducer: Send data to a known broker.


It does not allow to alter or enumerate the brokers, only known ones can be accessed. It does not allow to access the underlying MqttBrokerConnection. But access would be necessary for the following exemplaric reasons:


I'd like to make the following changes to the bundle and would like to collect some feedback first:


  1. Make the getConnection method of MqttService public. Export the MqttBrokerConnection class.
  2. Allow to replace the X509TrustManager in a MqttBrokerConnection.
  3. Add means, to add/remove a MqttBrokerConnection to MqttService. This way a broker discovery binding could be written, which adds/removes brokers to the MqttService.
  4. Add a way to enumerate the brokers in MqttService and get notified of added/removed ones. This way binding writers can write discovery services for ESH things, that represent a specific topic on a matching broker.
  5. Remove MqttBrokerConnection::setAsync. Use IMqttActionListener to be asynchronously notified of success/fail of a MqttDeliveryToken and notify the producer asynchronously in return, instead of block / waiting for a response (https://github.com/eclipse/smarthome/blob/master/bundles/io/org.eclipse.smarthome.io.transport.mqtt/src/main/java/org/eclipse/smarthome/io/transport/mqtt/internal/MqttBrokerConnection.java#L467)


Issue on github: https://github.com/eclipse/smarthome/issues/3695

Cheers, David

[Updated on: Sun, 18 June 2017 23:46] by Moderator

Re: The io.transport.mqtt implementation is too restrictive [message #1766342 is a reply to message #1766231] Tue, 20 June 2017 08:04 Go to previous message
Eclipse UserFriend
Please see the github link for the ongoing discussion.
Previous Topic:Eclipse Smart Home and org.slf4j
Next Topic:NoClassDefFoundError when using ManagedItemProvider.add in custom binding
Goto Forum:
  


Current Time: Sat May 24 23:06:57 EDT 2025

Powered by FUDForum. Page generated in 0.02626 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top