Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    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] Mon, 19 June 2017 03:42 Go to next message
David Graeff is currently offline David GraeffFriend
Messages: 17
Registered: April 2016
Junior Member
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: Mon, 19 June 2017 03:46]

Report message to a moderator

Re: The io.transport.mqtt implementation is too restrictive [message #1766342 is a reply to message #1766231] Tue, 20 June 2017 12:04 Go to previous message
Henning Treu is currently offline Henning TreuFriend
Messages: 44
Registered: April 2017
Member
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 Dec 14 07:11:03 GMT 2024

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

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

Back to the top