def receiver_thread
        Thread.start {
          log_info { "start receiver thread" }
          loop do
            begin