Azure/azure-event-hubs-node

Fix broken samples for Event Hub.

ShivangiReja opened this issue · 1 comments

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)

Done with #194