Thanks Guowei. Another question I have is, what is the use of a broadcast
state when I can update a map state or value state inside of the process
broadcast element method and use that state to do a lookup in the process
element method like this example
https://stackoverflow.com/questions/58307154/initialize-the-content-of-a-mapstate


Best,
Nick
On Sun, Jan 24, 2021 at 9:23 PM Guowei Ma <guowei....@gmail.com> wrote:

> Hi, Nick
>   You might need to handle it yourself If you have to process an element
> only after you get the broadcast state.
>   For example, you could “cache” the element to the state and handle it
> when the element from the broadcast side elements are arrived. Specially if
> you are using the `KeyedBroadcastProcessFunction` you could use the
> `applyToKeyedState` to access the element you cache before.
>
> Best,
> Guowei
>
>
> On Mon, Jan 25, 2021 at 10:24 AM Nick Bendtner <buggi...@gmail.com> wrote:
>
>> Hi guys,
>> What is the way to initialize broadcast state(say with default values)
>> before the first element shows up in the broadcasting stream? I do a lookup
>> on the broadcast state to process transactions which come from another
>> stream. The problem is the broadcast state is empty until the first element
>> shows up.
>>
>>
>> Best,
>> Nick.
>>
>

Reply via email to