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

Revamp asb:Listener/asb:Service based implementation #220

Merged
merged 39 commits into from
May 20, 2024

Conversation

ayeshLK
Copy link
Member

@ayeshLK ayeshLK commented May 10, 2024

Purpose

$subject

Fixes: #6495

Proposal: ballerina-platform/ballerina-library#6508

Examples

With this PR listener-service based async-message consuming functionality will be revamped.

import ballerinax/asb;

listener asb:Listener asbListener = check new (
    connectionString = "<connection-string>",
    entityConfig = {
        queueName: "<queue-name>"
    },
    autoComplete = false
);

service asb:Service on asbListener {

    isolated remote function onMessage(asb:Message message, asb:Caller caller) returns error? {
        // implement the message processing logic here
    }

    isolated remote function onError(asb:MessageRetrievalError 'error) returns error? {
        // implement error handling logic here
    }
}

Checklist

  • Linked to an issue
  • Updated the specification
  • Updated the changelog
  • Added tests
  • Checked native-image compatibility

@ayeshLK ayeshLK removed the request for review from niveathika May 10, 2024 13:03
@ayeshLK ayeshLK requested review from daneshk and removed request for RDPerera May 10, 2024 13:03
ballerina/errors.bal Outdated Show resolved Hide resolved
ballerina/tests/asb_listner_test.bal Outdated Show resolved Hide resolved
ballerina/tests/asb_listner_test.bal Outdated Show resolved Hide resolved
ballerina/tests/asb_listner_test.bal Outdated Show resolved Hide resolved
changelog.md Outdated Show resolved Hide resolved
Copy link
Contributor

@NipunaRanasinghe NipunaRanasinghe left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

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

Successfully merging this pull request may close these issues.

Add the listener-service implementation of the Azure service-bus connector
2 participants