Skip to content

Instantly share code, notes, and snippets.

View CoditCompany's full-sized avatar
👋
You can find us on @CoditEU

Codit CoditCompany

👋
You can find us on @CoditEU
View GitHub Profile
async void Main()
{
var mf = MessagingFactory.CreateFromConnectionString("your cnx string here");
var eventHubClient = mf.CreateEventHubClient("ehname");
Random rnd = new Random();
Parallel.For(1, 11, async (deviceId) =>
{
for(int cnt = 0; cnt < 50; cnt++)
{
Console.WriteLine ("Sending event nr {0} for device {1}", cnt, deviceId);