List of usage examples for com.rabbitmq.client RpcClient close
public void close() throws IOException
From source file:reactor.rabbitmq.docs.ApiGuideSender.java
License:Open Source License
void rpc() { // tag::rpc[] String queue = "rpc.server.queue"; Sender sender = RabbitFlux.createSender(); RpcClient rpcClient = sender.rpcClient("", queue); // <1> Mono<Delivery> reply = rpcClient.rpc(Mono.just(new RpcClient.RpcRequest("hello".getBytes()) // <2> ));/*from ww w .j av a 2 s . co m*/ rpcClient.close(); // <3> // end::rpc[] }
From source file:reactor.rabbitmq.docs.ApiGuideSender.java
License:Open Source License
void rpcCorrelationIdProvider() { // tag::rpc-supplier[] String queue = "rpc.server.queue"; Supplier<String> correlationIdSupplier = () -> UUID.randomUUID().toString(); // <1> Sender sender = RabbitFlux.createSender(); RpcClient rpcClient = sender.rpcClient("", queue, correlationIdSupplier // <2> );//from w ww . j a v a 2 s. c o m Mono<Delivery> reply = rpcClient.rpc(Mono.just(new RpcClient.RpcRequest("hello".getBytes()))); rpcClient.close(); // end::rpc-supplier[] }