1. .NET
  2. Tutorial

Produce Messages

The dotnet command is used to build and run the .NET project.

In order to run the producer, use the dotnet run command from the producer directory:

cd producer
dotnet run

You should see output resembling this:

Produced event to topic purchases: key = sgarcia    value = alarm clock
Produced event to topic purchases: key = jsmith     value = alarm clock
Produced event to topic purchases: key = sgarcia    value = book
Produced event to topic purchases: key = htanaka    value = batteries
Produced event to topic purchases: key = htanaka    value = book
Produced event to topic purchases: key = eabara     value = batteries
Produced event to topic purchases: key = jbernard   value = batteries
Produced event to topic purchases: key = eabara     value = t-shirts
Produced event to topic purchases: key = jbernard   value = t-shirts
Produced event to topic purchases: key = eabara     value = t-shirts
10 messages were produced to topic purchases
Previous
Build Consumer