Skip to content
  • Phil Mitchell's avatar
    feat(bridge): support incoming mosquitto bridge connections (#584) · 7c70ab4f
    Phil Mitchell 创作于
    * feat(bridge): Support incoming mosquitto bridge connections
    
    The incoming mosquitto bridge connections add 128 to the protocol
    version to indicate ras=true and nl=true.
    
    Support for this was added in mqtt-packet with
    https://github.com/mqttjs/mqtt-packet/pull/106
    
    
    
    Subscriptions from these connections will have ras=true and nl=true
    
    When publishing to these connections, aedes will now
    copy the Packet and set retain to false only if ras is not true.
    
    * clarify that Bridge Protocol is supported only for incoming connections
    
    * Respond to some code review comments
    
    * Move the retain flag clearing into the publish function
    
    This allows all callers of subscribe to receive the retain flag
    set to false unless explicitly requested by passing rap=true
    
    * Revert previous behaviour change and adjust test
    
    Co-authored-by: default avatarDaniel Lando <daniel.sorridi@gmail.com>
    7c70ab4f