Hi guys I have a problem with KStreams. I have a KTable T1 on which I perform a left join on a KTable T2.
The result is converted to a KStream.
I would like for each update in table T2 the left-join to publish a message. But this does not always happen.
Sometimes I am forced to do a dummy update of T1, then later I can update T2 as much as I want and get the behavior I want.
Is it basically wrong to expect a join update when only the aggregate table is changed?
I also attach a piece of code to make the problem clearer.
ProductFacility is the table I would like to update.
kStream = productKTable.getKTable()
.joiner()
.leftJoin(
productFacilityKTable.getKTable(),
(product, productFacilities) -> {
if(productFacilities != null){
var facilities = new HashMap<String, ErpProductFacility>();
for (var productFacility : productFacilities) {
facilities.put(productFacility.facility, productFacility);
}
product.facilities = facilities;
}
return product;
},
ElMat.ephemeral()
)
.toStream()
Any help will be appreciated. Thanks in advance.