# How to define an event?

  1. Open the respective .kstream file

  2. Define the event using keyword event.

    For example to define an event LotteryCreated with lotteryName & amount as the event data, define the following in LotteryStream.kstream file

    event LotteryCreated(lotteryName:String,amount:Int)
    

Note: Event names are generally in past-tense