I have created a pretty simple stream here:
val source = Source.queue[(Int,Int,Int,Int,Int)](0, OverflowStrategy.dropHead).conflate((_,newest) => newest) val planeFlow = Flow.fromGraph(new PlaneFlow(file)) source.viaMat(planeFlow)(Keep.left).toMat(new ImageSink(xDimension,yDimension,view))(Keep.left)
PlaneFlow is a graphStage that accesses a file and gives some intensity values from it. It can be very slow depending on its inputs. What I hope to have happen in this code is that if PlaneFlow is taking a long time, the most recent element given to the source queue is what it handles next. Nothing in between. What actually happens is that even though planeflow is taking a second or two to do its work, the inputs received during that time are being queued so instead of seeing 2 updates at most, I see 7. Can anyone help with this?