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

The MQTT service declaration cannot have the onComplete method #7272

Closed
TharmiganK opened this issue Oct 16, 2024 · 1 comment · Fixed by ballerina-platform/module-ballerina-mqtt#262
Assignees

Comments

@TharmiganK
Copy link
Contributor

Description:

$Subject

Even though this is support in the service object definition, the compiler plugin is throwing an error when it is used in the service declaration

Steps to reproduce:

Try to compile the following code:

service /api on new mqtt:Listener(mqtt:DEFAULT_URL, "", "") {

    remote function onMessage(mqtt:Message message, mqtt:Caller caller) returns error? {

    }

    remote function onError(mqtt:Error err) returns error? {

    }

    remote function onComplete(mqtt:DeliveryToken token) returns error? {
        // handle the delivery token
    }
}

Affected Versions:

Ballerina SwanLake Update 10(2201.10.x)

Copy link

This issue is NOT closed with a proper Reason/ label. Make sure to add proper reason label before closing. Please add or leave a comment with the proper reason label now.

      - Reason/EngineeringMistake - The issue occurred due to a mistake made in the past.
      - Reason/Regression - The issue has introduced a regression.
      - Reason/MultipleComponentInteraction - Issue occured due to interactions in multiple components.
      - Reason/Complex - Issue occurred due to complex scenario.
      - Reason/Invalid - Issue is invalid.
      - Reason/Other - None of the above cases.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

2 participants