Azure / azure-event-hubs-node

Node client library for Azure Event Hubs https://azure.microsoft.com/services/event-hubs
MIT License
50 stars 46 forks source link

Fix broken samples for Event Hub. #189

Closed ShivangiReja closed 5 years ago

ShivangiReja commented 5 years ago

Describe the bug Improve and Fix all the samples that are not currently working.

Example: https://github.com/Azure/azure-event-hubs-node/blob/master/client/examples/batchReceive.ts#L16 In batchReceive sample we are trying to receive data for partition id : "2", but we don't know if event hub has 3 partition.

Fix We can call await client.getPartitionIds() method which will return all the partition ids of the event hub and then, we can pass any of the parititon Id. (Deafult is 1st partition, so use id for 1st partition)

ramya-rao-a commented 5 years ago

Done with #194