Open argestes opened 7 years ago
val lolExchange = Exchange("book.lol.lol", Direct, durable = true) val lolSubscriber: Subscriber[Message] = connection.publish(lolExchange.name, "") class MessageBroadcasterActor(sub : Subscriber[Message]) extends Actor { import com.google.common.net.MediaType implicit def toMsg(rl : RelatedProduct) : Message = { new Message( body = rl.productId.toString.getBytes(StandardCharsets.UTF_8), contentType = Some(MediaType.PLAIN_TEXT_UTF_8), mode = Persistent ) } override def receive: Receive = { case x : RelatedProduct => { sub.onNext(toMsg(x)) } } }
I'm using the code above but I can only see the first message on rabbit. Am I doing something wrong or is it a bug?
What is sub?
sub
It's a message exchange val lolSubscriber: Subscriber[Message] = connection.publish(lolExchange.name, "")
val lolSubscriber: Subscriber[Message] = connection.publish(lolExchange.name, "")
I'm using the code above but I can only see the first message on rabbit. Am I doing something wrong or is it a bug?