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

IClientPublishOptions miss the definition for 'properties' #77

Closed
lisanlai opened this issue Mar 23, 2020 · 3 comments
Closed

IClientPublishOptions miss the definition for 'properties' #77

lisanlai opened this issue Mar 23, 2020 · 3 comments

Comments

@lisanlai
Copy link

`mqtt.Client#publish(topic, message, [options], [callback])
Publish a message to a topic

topic is the topic to publish to, String
message is the message to publish, Buffer or String
options is the options to publish with, including:
qos QoS level, Number, default 0
retain retain flag, Boolean, default false
dup mark as duplicate flag, Boolean, default false
properties: MQTT 5.0 properties object
payloadFormatIndicator: Payload is UTF-8 Encoded Character Data or not boolean,
messageExpiryInterval: the lifetime of the Application Message in seconds number,
topicAlias: value that is used to identify the Topic instead of using the Topic Name number,
responseTopic: String which is used as the Topic Name for a response message string,
correlationData: used by the sender of the Request Message to identify which request the Response Message is for when it is received binary,
userProperties: The User Property is allowed to appear multiple times to represent multiple name, value pairs object,
subscriptionIdentifier: representing the identifier of the subscription number,
contentType: String describing the content of the Application Message string
cbStorePut - function (), fired when message is put into outgoingStore if QoS is 1 or 2.
callback - function (err), fired when the QoS handling completes, or at the next tick if QoS 0. An error occurs if client is disconnecting.`

In fact there is no definition for 'properties' in source code

`export interface IClientPublishOptions {
/**

  • the QoS
    /
    qos: QoS
    /
    *
  • the retain flag
    /
    retain?: boolean
    /
    *
  • whether or not mark a message as duplicate
    /
    dup?: boolean
    /
    *
  • callback called when message is put into outgoingStore
    */
    cbStorePut?: StorePutCallback
    }`
@mcollina
Copy link
Member

Would you like to send a PR?

@anissen
Copy link

anissen commented Mar 26, 2020

I also need this in order to configure a "response topic".

@bkp7
Copy link
Contributor

bkp7 commented Feb 11, 2021

This was fixed by mqttjs/MQTT.js#1103 and can be closed.

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

No branches or pull requests

5 participants