Closed arihant-confluent closed 1 year ago
Hi @arihant-confluent - a few points & questions:
Message ID
The MQTT specification doesn't have a message ID although there is a protocol packet identifier. Is this what you are looking for?
Currently we don't expose the packet identifiers as they're protocol related (e.g. for QoS >0 negotiation) and generally not useful to app level code.
Let me know what you're looking for here.
Timestamp
Along the same lines, the MQTT doesn't contain timestamps. Published messages do have an optional "Message Expiry Interval" with the note:
The PUBLISH packet sent to a Client by the Server MUST contain a Message Expiry Interval set to the received value minus the time that the Application Message has been waiting in the Server
The Java client could throw a new Timestamp(System.currentTimeMillis())
into received messages but that's generally better for message handling code IMO.
Headers
The closest equivalent in MQTT are User Properties which can be fetched with Mqtt5Publish.getUserProperties()
.
I hope some of the above helps out. If you're having issues, please let us know so we can help out.
Hi @arihant-confluent have you had a chance to look at this yet? Let me know if the above is useful.
I'm going to close out this issue but if any questions remain, feel free to open another issue. We'd be happy to help.
Problem or use case
Message ID, Timestamp, etc headers are not present in Publish message received after subscribing.
Preferred solution or suggestions
Add Message ID, Timestamp etc, fields.