Table of Contents

Interface IRequesterBuilder

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

IRequesterBuilder is the interface for creating an RPC client. See also IRequester and IResponderBuilder

public interface IRequesterBuilder

Methods

BuildAsync()

Build and return the RPC client.

Task<IRequester> BuildAsync()

Returns

Task<IRequester>

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.

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

Parameters

correlationIdExtractor Func<IMessage, object>

Returns

IRequesterBuilder

CorrelationIdSupplier(Func<object>?)

Client and Server must agree on the correlation id. The client will provide the correlation id to send to the server. If the default correlation id is not suitable, you can provide a custom correlation id supplier. Be careful to provide a unique correlation id for each request.

IRequesterBuilder CorrelationIdSupplier(Func<object>? correlationIdSupplier)

Parameters

correlationIdSupplier Func<object>

Returns

IRequesterBuilder

ReplyToQueue(IQueueSpecification)

IRequesterBuilder ReplyToQueue(IQueueSpecification replyToQueue)

Parameters

replyToQueue IQueueSpecification

Returns

IRequesterBuilder

ReplyToQueue(string)

The queue from which requests are consumed. if not set the client will create a temporary queue.

IRequesterBuilder ReplyToQueue(string replyToQueueName)

Parameters

replyToQueueName string

The queue name

Returns

IRequesterBuilder

RequestAddress()

Request address where the client sends requests. The server consumes requests from this address.

IRequesterAddressBuilder RequestAddress()

Returns

IRequesterAddressBuilder

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

Post processes the reply message before sending it to the server. 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.

IRequesterBuilder RequestPostProcessor(Func<IMessage, object, IMessage>? requestPostProcessor)

Parameters

requestPostProcessor Func<IMessage, object, IMessage>

Returns

IRequesterBuilder

Timeout(TimeSpan)

The time to wait for a reply from the server.

IRequesterBuilder Timeout(TimeSpan timeout)

Parameters

timeout TimeSpan

Returns

IRequesterBuilder