Catch NULL values in messaging protocol · Issue #134 · SmartGridready/SGrJava · GitHub
Skip to content

Catch NULL values in messaging protocol #134

Description

@mkrebs81

Situation

A messaging (MQTT) device receives data on a subscribed data point.

When the message transformation results in a string value of "null", e.g. when the requested JSON key has no value or actually has null as value, the data point value cannot be updated due to conversion error.

The error message is For input string: "null", indicating that it could not be converted to a float, int or whatever.

Options

What to do about it?

a) keep exception
b) check for NULL value in SGrMessagingDevice and do not execute callback/consumer in case of a NULL value

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions