bytebeamio / rumqtt

The MQTT ecosystem in rust
Apache License 2.0
1.65k stars 255 forks source link

rumqttc: log `Outgoing::Connect` #873

Open de-sh opened 5 months ago

de-sh commented 5 months ago

Expected Behavior

If we log all successful events on poll after connecting to the broker, we should see Outgoing::Connect in it

Event = Outgoing(Connect)
Event = Incoming(ConnAck(ConnAck { session_present: false, code: Success, properties: Some(ConnAckProperties { session_expiry_interval: None, receive_max: Some(32), max_qos: None, retain_available: Some(1), max_packet_size: Some(1048576), assigned_client_identifier: None, topic_alias_max: Some(65535), reason_string: None, user_properties: [], wildcard_subscription_available: Some(1), subscription_identifiers_available: Some(1), shared_subscription_available: Some(1), server_keep_alive: None, response_information: None, server_reference: None, authentication_method: None, authentication_data: None }) }))
Event = Outgoing(Subscribe(1))
Event = Outgoing(Publish(2))

Current Behavior

poll eventlog starts post CONNACK only

Event = Incoming(ConnAck(ConnAck { session_present: false, code: Success, properties: Some(ConnAckProperties { session_expiry_interval: None, receive_max: Some(32), max_qos: None, retain_available: Some(1), max_packet_size: Some(1048576), assigned_client_identifier: None, topic_alias_max: Some(65535), reason_string: None, user_properties: [], wildcard_subscription_available: Some(1), subscription_identifiers_available: Some(1), shared_subscription_available: Some(1), server_keep_alive: None, response_information: None, server_reference: None, authentication_method: None, authentication_data: None }) }))
Event = Outgoing(Subscribe(1))
Event = Outgoing(Publish(2))
de-sh commented 5 months ago

This was initiated by https://github.com/bytebeamio/rumqtt/pull/852#discussion_r1619065293, any inputs @swanandx?

fixed by: https://github.com/bytebeamio/rumqtt/compare/split-connect?expand=1