Table of Contents

Interface IRpcServerBuilder

Namespace
RabbitMQ.AMQP.Client
Assembly
RabbitMQ.AMQP.Client.dll

IRpcServerBuilder is the interface for creating an RPC server. The RPC server consumes requests from a queue and sends replies to a reply queue. See also IRpcServer and IRpcClientBuilder

public interface IRpcServerBuilder

Methods

BuildAsync()

Build and return the RPC server.

Task<IRpcServer> BuildAsync()

Returns

Task<IRpcServer>

CorrelationIdExtractor(Func<IMessage, object>?)

Extracts the correlation id from the request message. each message has a correlation id that is used to match the request with the response. There are default implementations for the correlation id extractor. With this method, you can provide a custom implementation.

IRpcServerBuilder CorrelationIdExtractor(Func<IMessage, object>? correlationIdExtractor)

Parameters

correlationIdExtractor Func<IMessage, object>

Returns

IRpcServerBuilder

Handler(RpcHandler)

Handle the request message and return the reply message.

IRpcServerBuilder Handler(RpcHandler handler)

Parameters

handler RpcHandler

Returns

IRpcServerBuilder

ReplyPostProcessor(Func<IMessage, object, IMessage>?)

Post processes the reply message before sending it to the client. The object parameter is the correlation id extracted from the request message. There are default implementations for the reply post processor that use the correlationId() field to set the correlation id of the reply message. With this method, you can provide a custom implementation.

IRpcServerBuilder ReplyPostProcessor(Func<IMessage, object, IMessage>? replyPostProcessor)

Parameters

replyPostProcessor Func<IMessage, object, IMessage>

Returns

IRpcServerBuilder

RequestQueue(IQueueSpecification)

IRpcServerBuilder RequestQueue(IQueueSpecification requestQueue)

Parameters

requestQueue IQueueSpecification

Returns

IRpcServerBuilder

RequestQueue(string)

The queue from which requests are consumed. The client sends requests to this queue and the server consumes them.

IRpcServerBuilder RequestQueue(string requestQueue)

Parameters

requestQueue string

Returns

IRpcServerBuilder