Class RpcClientParams

    • Constructor Detail

      • RpcClientParams

        public RpcClientParams()
    • Method Detail

      • getChannel

        public Channel getChannel()
        Set the channel to use for communication.
        Returns:
      • getExchange

        public String getExchange()
        Set the exchange to send requests to.
        Returns:
      • getRoutingKey

        public String getRoutingKey()
      • routingKey

        public RpcClientParams routingKey​(String routingKey)
        Set the routing key to use for requests.
        Parameters:
        routingKey -
        Returns:
      • getReplyTo

        public String getReplyTo()
      • replyTo

        public RpcClientParams replyTo​(String replyTo)
        Set the queue where the server should put replies on.

        The default is to use Direct Reply-to. Using another value will cause the creation of a temporary private auto-delete queue.

        The default shouldn't be changed for performance reasons.

        Parameters:
        replyTo -
        Returns:
      • getTimeout

        public int getTimeout()
      • timeout

        public RpcClientParams timeout​(int timeout)
        Set the timeout in milliseconds to use on call responses.
        Parameters:
        timeout -
        Returns:
      • useMandatory

        public RpcClientParams useMandatory​(boolean useMandatory)
        Whether to publish RPC requests with the mandatory flag or not.

        Default is to not publish requests with the mandatory flag set to true.

        When set to true, unroutable requests will result in UnroutableRpcRequestException exceptions thrown. Use a custom reply handler to change this behavior.

        Parameters:
        useMandatory -
        Returns:
        See Also:
        replyHandler(Function)
      • shouldUseMandatory

        public boolean shouldUseMandatory()
      • correlationIdSupplier

        public RpcClientParams correlationIdSupplier​(Supplier<String> correlationIdGenerator)
        Logic to generate correlation IDs.
        Parameters:
        correlationIdGenerator -
        Returns:
        Since:
        5.9.0
      • getCorrelationIdSupplier

        public Supplier<String> getCorrelationIdSupplier()