![JAR search and dependency download from the Maven repository](/logo.png)
io.leonard.amqp.RPCClient.scala Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of amqp-scala-client_2.12 Show documentation
Show all versions of amqp-scala-client_2.12 Show documentation
Scala wrapper for rabbitmq-java-client
The newest version!
package io.leonard.amqp
import io.leonard.amqp.concurrent.ScheduledExecutor
import io.leonard.amqp.rpc.client.{ RPCTimeout, RPCClientImpl, ResponseDispatcher }
import scala.concurrent.Future
import scala.concurrent.duration.FiniteDuration
object RPCClient {
def apply(channel: ChannelOwner): RPCClient =
new RPCClientImpl(publishChannel = channel, new ResponseDispatcher(listenChannel = channel, new ScheduledExecutor(1)))
}
trait RPCClient {
def newMethod(routingDescriptor: RoutingDescriptor, timeout: FiniteDuration): RPCMethod
}
/**
* RPC method over AMQP.
*
* The future either completes with the correlating response message, an RPCTimeout or UndeliveredException
*/
@throws[RPCTimeout]("if no reply comes before the method timeout")
@throws[UndeliveredException]("if the request is returned undelivered by the broker")
trait RPCMethod extends (Message ⇒ Future[Message])
© 2015 - 2025 Weber Informatics LLC | Privacy Policy