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

Implementing Event Hubs SDK over AMQP 1.0 #1260

Closed
wants to merge 219 commits into from

Conversation

minghuaw
Copy link

@minghuaw minghuaw commented Apr 9, 2023

This is the initial attempt at implementing the EventHubs sdk over AMQP 1.0 protocol in rust. The overall approach is very similar to the Service Bus over AMQP PR (#1185), which essentially follow what the dotnet SDK does. There is one minor distinction though, which is that all public methods that returns a Result try to use azure_core::Error instead of custom enums. This minor distinction will be adopted by #1185 later.

Scope

What has been implemented in this PR

Not all features are implemented. Below is a list of the features that are included in this PR.

Feature checklist (this will be updated over time):

  • EventHubConnection
    • Get Event Hub properties
    • Get partition properties
    • Automatic recovery
  • EventHubProducerClient
    • create from connection string
    • (won't implement) send_idempotent
      This is NOT implemented because (1) the underlying AMQP 1.0 sender already takes care of keeping track of unsettled deliveries (2) the current design take the ownership of event/message, making storing things like pending_sequence_no useless
    • create and send EventBatch
    • Get Event Hub properties
    • Get partition properties
    • Automatic recovery
  • EventHubConsumerClient
    • create from connection string
    • receive from partition
    • receive from all partition
      Closing the AMQP receivers currently uses a temporary workaround which simply drops all receivers and their sessions. The workaround is acceptable because the internal states of AMQP Sender and Session (not Sender itself but its inner state) implements the Drop trait which performs proper exchange of Detach/End frames upon dropping.
    • auto-recovery
    • impl Stream
  • PartitionReceiver

What will be implemented in future PRs?

  • EventHubBufferedProducerClient
  • EventHubProcessor
  • CheckpointStore and BlobCheckpointStore
  • Support for wasm32 targets

@minghuaw minghuaw marked this pull request as draft September 18, 2023 18:08
@cataggar
Copy link
Member

Hi @minghuaw,

Those of us volunteering on this project really like seeing this work. However, for now, I think it is best suited in an another repository.

https://crates.io/crates/azeventhubs

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.

None yet

3 participants