Stream slick over SSE

I have a lagom project with

  1. ServiceA that returns a stream of items read from slick:
    def getItems: ServiceCall[NotUsed, Source[Item, NotUsed]]
    ServiceA is implemented as followed:
override def getItems: Source[Item, NotUsed] = ServiceCall{_ => 
   // items.result are a from a slick table
  1. A play ServiceB that exposes an SSE:
myServiveA.getItems().map{ source =>

The issue i am having is that i am receiving a new source about every 4 second in the play controller which is repeating elements on the UI side.

1 Like