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

eventhubs: Can we combine try_add_event_data() and try_add_amqp_message()? #2127

Open
richardpark-msft opened this issue Feb 12, 2025 · 0 comments
Labels
needs-triage Workflow: This is a new issue that needs to be triaged to the appropriate team.

Comments

@richardpark-msft
Copy link
Member

Today, there are two methods to add an event, but for different types:

let ed = EventData::from("Hello");
let ed2 = EventData::from("Hello");

let added1 = batch.try_add_event_data(ed, None)?;

if !added1 {
    panic!("well, dang")
}

let added2 = batch.try_add_amqp_message(ed2, None)?;

if !added2 {
    panic!("well, dang")
}

It looks like I can pass EventData to both the AMQP and Event Data specific functions, so merging these into a single function would simplify the API surface, while not compromising on functionality.

@github-project-automation github-project-automation bot moved this to Untriaged in Azure SDK Rust Feb 12, 2025
@github-actions github-actions bot added the needs-triage Workflow: This is a new issue that needs to be triaged to the appropriate team. label Feb 12, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs-triage Workflow: This is a new issue that needs to be triaged to the appropriate team.
Projects
Status: Untriaged
Development

No branches or pull requests

1 participant