Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

No userProperty info back to client in publish ack message. #588

Open
fighting300 opened this issue Apr 30, 2024 · 1 comment
Open

No userProperty info back to client in publish ack message. #588

fighting300 opened this issue Apr 30, 2024 · 1 comment
Labels

Comments

@fighting300
Copy link

fighting300 commented Apr 30, 2024

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

@JaylinYu
Copy link
Member

Broker's job not sdk.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants