Description
openedon Oct 24, 2023
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?