Content-Length: 254080 | pFad | http://github.com/eclipse-paho/paho.mqtt.python/issues/885

EF will_set should make it clear when it's not effective · Issue #885 · eclipse-paho/paho.mqtt.python · GitHub
Skip to content

will_set should make it clear when it's not effective #885

Open
@dannystaple

Description

@dannystaple

Prerequisites

Note: You may remove this section prior to submitting your report.

A small team of volunteers monitors issues, so it's important that we can quickly understand what you are requesting, and
why it would be of benefit. Prior to requesting a feature, please:

  • Search existing issues (the feature may have been requested previously).
  • Read the relevant documentation.
  • Consider the impact your feature/idea might have on other users of the library (both positive and negative).
  • Decide if you are able to implement the feature yourself (please do raise an issue before submitting a pull request).

Feature Description

Please provide a clear and concise description of the feature you are requesting. Include details of the benefits you
believe the feature will deliver (i.e. problems it will solve, user groups it will help etc).

The client will_set method (and similarly will_clear) has no effect if called after connect. This is documented in the documentation at https://eclipse.dev/paho/files/paho.mqtt.python/html/client.html#paho.mqtt.client.Client.will_set, but not in the documentation at https://pypi.org/project/paho-mqtt/. While this may also be understood by frequent users of MQTT, it isn't so clear to those new to it.

The result is that calling this results in a "silent failure" where the will is never enacted because it's only sent to the broker during connection.

Requested Solution

Describe how you would like this feature delivered (for example, if adding functionality, show mock code using the new
feature)

  • Update the PyPi documentation (or remove it if it's better that the eclipse.dev domain should be the source of truth).
  • Consider raising an exception if the will_set or will_clear methods are called on a connected client. While the new exception may be frustrating to those updating and now seeing the error, this is less problematic than a will never sent.

Alternatives

Have you considered alternative ways of accomplishing your goal? If so please provide details.

Additional Information

Is there any other information you can provide that would help us understand your idea?

https://stackoverflow.com/questions/28612283/problems-with-mosquitto-and-last-will-testament

Metadata

Metadata

Assignees

No one assigned

    Labels

    Status: AvailableNo one has claimed responsibility for resolving this issue.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions









      ApplySandwichStrip

      pFad - (p)hone/(F)rame/(a)nonymizer/(d)eclutterfier!      Saves Data!


      --- a PPN by Garber Painting Akron. With Image Size Reduction included!

      Fetched URL: http://github.com/eclipse-paho/paho.mqtt.python/issues/885

      Alternative Proxies:

      Alternative Proxy

      pFad Proxy

      pFad v3 Proxy

      pFad v4 Proxy