Package com.rabbitmq.client.amqp
Interface RpcClient
- All Superinterfaces:
AutoCloseable
Client support class for RPC.
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionvoid
close()
Close the RPC client and its resources.message()
Create a message meant to be published by the underlying publisher instance.message
(byte[] body) Create a message meant to be published by the underlying publisher instance.Publish a request message and expect a response.
-
Method Details
-
message
Message message()Create a message meant to be published by the underlying publisher instance.Once published with the
publish(Message)
the message instance should be not be modified or even reused.- Returns:
- a message
-
message
Create a message meant to be published by the underlying publisher instance.Once published with the
publish(Message)
the message instance should be not be modified or even reused.- Parameters:
body
- message body- Returns:
- a message with the provided body
-
publish
Publish a request message and expect a response.- Parameters:
message
- message request- Returns:
- the response as
CompletableFuture
-
close
void close()Close the RPC client and its resources.- Specified by:
close
in interfaceAutoCloseable
-