Open fighting300 opened 2 months ago
Hello, there, when i publish a message with userProperty, I didnot get the userProperty from message ack body. why? I use mqtt protocal 5.0, and the code is blow
` _pubProp = [[MqttPublishProperties alloc] initWithContentType:@"JSON"]; [_pubProp setUserProperty:@{@"uuid": uuid}]; [_mqtt5 publish:@"dragonTopic/3" withString:@"test" qos:CocoaMQTTQoSQos1 DUP:YES retained:YES properties:_pubProp];
func didReceive(_ reader: CocoaMQTTReader, puback: FramePubAck) { printDebug("RECV: \(puback) test2 \(String(describing: puback.pubAckProperties?.userProperty)) test1 \(String(describing: puback.userProperties))") deliver.ack(by: puback) delegate?.mqtt5(self, didPublishAck: puback.msgid, pubAckData: puback.pubAckProperties ?? nil) didPublishAck(self, puback.msgid, puback.pubAckProperties ?? nil) }
` I want get the same user property what i send, how can i get to this result。 thanks for giving help to me
Broker's job not sdk.
Hello, there, when i publish a message with userProperty, I didnot get the userProperty from message ack body. why? I use mqtt protocal 5.0, and the code is blow
` _pubProp = [[MqttPublishProperties alloc] initWithContentType:@"JSON"]; [_pubProp setUserProperty:@{@"uuid": uuid}]; [_mqtt5 publish:@"dragonTopic/3" withString:@"test" qos:CocoaMQTTQoSQos1 DUP:YES retained:YES properties:_pubProp];
` I want get the same user property what i send, how can i get to this result。 thanks for giving help to me