Hi Vishal, Actually, you could provide multiple MapStateDescriptors for the `broadcast()` method and then use them, separately.
Best, Xingcan > On Sep 18, 2018, at 9:29 PM, Vishal Santoshi <vishal.santo...@gmail.com> > wrote: > > I could do that, but I was under the impression that 2 or more disparate > broadcast states could be provided to a keyed stream, referenced through a > key in the Map State...That would be cleaner as in the fact that 2 different > set of rules are to be applied are explictely declared rather then carries > inside the datums of a unioned stream...... I will look at second option... > > On Tue, Sep 18, 2018, 9:15 AM Xingcan Cui <xingc...@gmail.com > <mailto:xingc...@gmail.com>> wrote: > Hi Vishal, > > You could try 1) merging these two rule streams first with the `union` method > if they get the same type or 2) connecting them and encapsulate the records > from both sides to a unified type (e.g., scala Either). > > Best, > Xingcan > > > On Sep 18, 2018, at 8:59 PM, Vishal Santoshi <vishal.santo...@gmail.com > > <mailto:vishal.santo...@gmail.com>> wrote: > > > > I have 2 broadcast streams that carry rules to be applied to a third keyed > > stream. The connect method of the keyed stream only takes a single > > broadcast stream. How do I connect the 2 broadcast stream to that single > > keyed stream. > > > > Do I have 2 connects and thus 2 instances of BroadcastConnextedStream, > > union them and then apply process through a single > > SingleOutpitStreamOperator ? The issue I see there are 2 keyBy calls and an > > additional shuffle before connect is called. > > > > To be precise, is there a simple example of applying 2 dissimilar rules > > through 2 broadcast streams, thus 2 different MapStateDiscriptors, to a > > single keyed stream without any unnecessary overhead... > > > > > > >