Skip to content

Servicebus/Eventhubs: Support receiver clients with handler parameter #21822

Open

Description

Hi everyone,

in the past I have used the azure-sdk-for-go/azservicebus and the old azure-event-hubs-go libraries. I checked out the new azure-sdk-for-go/azeventhubs library as well. I noticed, that azure-event-hubs-go used this nice pattern where a developer just adds his handler function as a parameter to the receiver client and is ready to go. In azservicebus and apparently also in the new azeventhubs I have to write code for polling, parallel processing, shutdown, synchronization etc. myself which feels very error prone. As a developer I much prefer the old library's approach, that also google takes in their pubsub lib.

func (s *QueueClient) Receive(ctx context.Context, f func(context.Context, *Message)) error

vs.

func (pc *PartitionClient) ReceiveEvents(ctx context.Context, count int, options *ReceiveEventsOptions) ([]*ReceivedEventData, error)

Was there a conscious decision not to include this pattern in the azure sdk? Can you include the option I mentioned into the sdk in the future?

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

Metadata

Labels

Event Hubscustomer-reportedIssues that are reported by GitHub users external to the Azure organization.feature-requestThis issue requires a new behavior in the product in order be resolved.needs-team-attentionWorkflow: This issue needs attention from Azure service team or SDK team

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions