| Constructor and Description |
|---|
ReceiverOptions() |
| Modifier and Type | Method and Description |
|---|---|
ReceiverOptions |
connectionClosingTimeout(java.time.Duration connectionClosingTimeout)
Timeout for closing the
Receiver connection. |
ReceiverOptions |
connectionFactory(com.rabbitmq.client.ConnectionFactory connectionFactory) |
ReceiverOptions |
connectionMono(Mono<? extends com.rabbitmq.client.Connection> connectionMono)
|
ReceiverOptions |
connectionMonoConfigurator(java.util.function.Function<Mono<? extends com.rabbitmq.client.Connection>,Mono<? extends com.rabbitmq.client.Connection>> connectionMonoConfigurator)
|
ReceiverOptions |
connectionSubscriptionScheduler(Scheduler connectionSubscriptionScheduler)
Scheduler used on connection creation subscription.
|
ReceiverOptions |
connectionSupplier(com.rabbitmq.client.ConnectionFactory connectionFactory,
Utils.ExceptionFunction<com.rabbitmq.client.ConnectionFactory,? extends com.rabbitmq.client.Connection> function)
Set a callback that will be passed in the given
ConnectionFactory to create a Connection. |
ReceiverOptions |
connectionSupplier(Utils.ExceptionFunction<com.rabbitmq.client.ConnectionFactory,? extends com.rabbitmq.client.Connection> function)
Set a callback that will be passed in the
ConnectionFactory of this ReceiverOptions instance to create a Connection. |
java.time.Duration |
getConnectionClosingTimeout() |
com.rabbitmq.client.ConnectionFactory |
getConnectionFactory() |
Mono<? extends com.rabbitmq.client.Connection> |
getConnectionMono() |
java.util.function.Function<Mono<? extends com.rabbitmq.client.Connection>,Mono<? extends com.rabbitmq.client.Connection>> |
getConnectionMonoConfigurator() |
Scheduler |
getConnectionSubscriptionScheduler() |
Utils.ExceptionFunction<com.rabbitmq.client.ConnectionFactory,? extends com.rabbitmq.client.Connection> |
getConnectionSupplier() |
public com.rabbitmq.client.ConnectionFactory getConnectionFactory()
public ReceiverOptions connectionFactory(com.rabbitmq.client.ConnectionFactory connectionFactory)
public ReceiverOptions connectionSubscriptionScheduler(@Nullable Scheduler connectionSubscriptionScheduler)
connectionSubscriptionScheduler - ReceiverOptions instancepublic ReceiverOptions connectionSupplier(Utils.ExceptionFunction<com.rabbitmq.client.ConnectionFactory,? extends com.rabbitmq.client.Connection> function)
ConnectionFactory of this ReceiverOptions instance to create a Connection.
Note the created connection will be used by a Receiver instance, which will cache it for re-use in its operations
and close it when Receiver.close() is called.
function - callback to create a ConnectionReceiverOptions instancepublic ReceiverOptions connectionSupplier(com.rabbitmq.client.ConnectionFactory connectionFactory, Utils.ExceptionFunction<com.rabbitmq.client.ConnectionFactory,? extends com.rabbitmq.client.Connection> function)
ConnectionFactory to create a Connection.
Note the created connection will be used by a Receiver instance, which will cache it for re-use in its operations
and close it when Receiver.close() is called.
connectionFactory - the ConnectionFactory passed-in to the creation functionfunction - callback to create a ConnectionReceiverOptionspublic ReceiverOptions connectionMono(@Nullable Mono<? extends com.rabbitmq.client.Connection> connectionMono)
Mono that the created Receiver will use for its operations.
A Receiver created from this ReceiverOptions instance will not cache for re-use, nor close
on Receiver.close() the underlying connection. It is recommended that the passed-in Mono handles
caching of some sort to avoid a new connection to be created every time the Receiver does an operation.
It is the developer's responsibility to close the underlying Connection once the Receiver is closed
and no longer needs it.
connectionMono - ReceiverOptionspublic ReceiverOptions connectionMonoConfigurator(java.util.function.Function<Mono<? extends com.rabbitmq.client.Connection>,Mono<? extends com.rabbitmq.client.Connection>> connectionMonoConfigurator)
Function to customize the connection Mono used in the created Receiver instance.
This function can be used to configure retry when obtaining the Connection.
This function is not applied if a custom connectionMono is provided. It is applied
when a connectionSupplier is provided though.
connectionMonoConfigurator - the function to configure the passed-in connection mono@Nullable public Mono<? extends com.rabbitmq.client.Connection> getConnectionMono()
@Nullable public Utils.ExceptionFunction<com.rabbitmq.client.ConnectionFactory,? extends com.rabbitmq.client.Connection> getConnectionSupplier()
public java.util.function.Function<Mono<? extends com.rabbitmq.client.Connection>,Mono<? extends com.rabbitmq.client.Connection>> getConnectionMonoConfigurator()
public ReceiverOptions connectionClosingTimeout(@Nullable java.time.Duration connectionClosingTimeout)
Receiver connection.
Default is 30 seconds. Use Duration.ZERO for no timeout.
connectionClosingTimeout - timeout for connection closingReceiverOptions instance@Nullable public java.time.Duration getConnectionClosingTimeout()