I'm trying to use op-rabbit https://github.com/SpinGo/op-rabbit to connect my Scala App to RabbitMq. The example code https://github.com/SpinGo/op-rabbit/blob/master/demo/src/main/scala/demo/Main.scala works perfectly fine.
I want to work on it with the Intellij-idea. The IDE makes problems on the consume code:
channel(qos=3) {
consume(demoQueue) {
body(as[Data]) { data =>
println(s"received ${data}")
ack
}
}
}
I get an error on data => ... it says its a type mismatch
Type mismatch, expected: ::[Data, HNil] => op_rabbit.Handler, actual: Data => op_rabbit.Handler
I would be absolutly fine with annotating the data variable manually if this solves the problem i tried to annotated data as HList from shapeless.
channel(qos=3) {
consume(demoQueue) {
body(as[Data]) { data: HList =>
println(s"received ${data}")
ack
}
}
}
The IDE was happy with it... unlucky the compiler not really :D :( . Like this the code doesnt compile anymore.
Any idea?
Intellij and the Scala Plugin are updated to the newest version.