File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ Fixed the mqtt sink's certificate handling.
2+
3+ authors: mr-
Original file line number Diff line number Diff line change @@ -148,7 +148,7 @@ impl MqttSourceConfig {
148148
149149 if let Some ( tls) = tls. tls ( ) {
150150 let ca = tls. authorities_pem ( ) . flatten ( ) . collect ( ) ;
151- let client_auth = None ;
151+ let client_auth = tls . identity_pem ( ) ;
152152 let alpn = Some ( vec ! [ "mqtt" . into( ) ] ) ;
153153 options. set_transport ( Transport :: Tls ( TlsConfiguration :: Simple {
154154 ca,
Original file line number Diff line number Diff line change @@ -47,7 +47,9 @@ impl MqttSource {
4747 client
4848 . subscribe ( topic, QoS :: AtLeastOnce )
4949 . await
50- . map_err ( |_| ( ) ) ?;
50+ . map_err ( |e| {
51+ tracing:: error!( error = ?e, "Failed to send MQTT subscribe command" ) ;
52+ } ) ?;
5153 }
5254 OneOrMany :: Many ( topics) => {
5355 client
@@ -58,7 +60,9 @@ impl MqttSource {
5860 . map ( |topic| SubscribeFilter :: new ( topic, QoS :: AtLeastOnce ) ) ,
5961 )
6062 . await
61- . map_err ( |_| ( ) ) ?;
63+ . map_err ( |e| {
64+ tracing:: error!( error = ?e, "Failed to send MQTT subscribe command" ) ;
65+ } ) ?;
6266 }
6367 }
6468
@@ -80,6 +84,10 @@ impl MqttSource {
8084 ) ) => {
8185 // TODO Handle acknowledgement - https://github.com/vectordotdev/vector/issues/21967
8286 }
87+ Err ( e) => {
88+ tracing:: error!( "Error = {e:?}" ) ;
89+ return Ok ( ( ) ) ;
90+ }
8391 _ => { }
8492 }
8593 }
You can’t perform that action at this time.
0 commit comments