Problem with BroadcastHub.sink dropping items

Hi all,

In the example code below, printing out the byteStrings source works as expected, but when I use BroadcastHub.sink and try the same, I get no output, at least for small streams. Larger streams seem to work as expected. Is there some type of buffering going on that could cause that?

      val byteStrings: Source[ByteString, Any]) = ...

      // Prints out as expected (but would drain the stream)
//    byteStrings.runForeach(bs => log.info(s"size = ${bs.size}"))

    val producer = byteStrings.toMat(BroadcastHub.sink(bufferSize = 256))(Keep.right).run()

    // Sometimes prints out nothing...
    producer.runForeach(bs => log.info(s"size = ${bs.size}"))

Thanks,
Allan