- java.lang.Object
-
- com.rabbitmq.http.client.ReactorNettyClient
-
public class ReactorNettyClient extends Object
Reactive client based on Reactor Netty. Use theReactorNettyClientOptions
constructors for advanced settings, e.g. TLS, authentication other than HTTP basic, etc. The default settings for this class are the following:HttpClient
: created with theHttpClient.baseUrl(String)
.-
ObjectMapper
:DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES
andMapperFeature.DEFAULT_VIEW_INCLUSION
are disabled.JsonUtils.CURRENT_USER_DETAILS_DESERIALIZER_INSTANCE
,JsonUtils.USER_INFO_DESERIALIZER_INSTANCE
,JsonUtils.VHOST_LIMITS_DESERIALIZER_INSTANCE
, andJsonUtils.CHANNEL_DETAILS_DESERIALIZER_INSTANCE
set up. Mono<String> token
: basic HTTP authentication used for theauthorization
header.BiConsumer<? super HttpRequest, ? super HttpResponse> responseCallback
: 4xx and 5xx responses on GET requests throwHttpClientException
andHttpServerException
respectively.
- Since:
- 2.1.0
- See Also:
ReactorNettyClientOptions
-
-
Constructor Summary
Constructors Constructor Description ReactorNettyClient(String url)
ReactorNettyClient(String url, ReactorNettyClientOptions options)
ReactorNettyClient(String url, String username, String password)
ReactorNettyClient(String url, String username, String password, ReactorNettyClientOptions options)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description reactor.core.publisher.Mono<AlivenessTestResult>
alivenessTest(String vhost)
protected Consumer<reactor.netty.http.client.HttpClientResponse>
applyResponseCallback()
protected Function<? super io.netty.handler.codec.http.HttpHeaders,reactor.core.publisher.Mono<? extends io.netty.handler.codec.http.HttpHeaders>>
authorizedHeader()
static String
basicAuthentication(String username, String password)
reactor.core.publisher.Mono<HttpResponse>
bindExchange(String vhost, String destination, String source, String routingKey)
reactor.core.publisher.Mono<HttpResponse>
bindExchange(String vhost, String destination, String source, String routingKey, Map<String,Object> args)
reactor.core.publisher.Mono<HttpResponse>
bindQueue(String vhost, String queue, String exchange, String routingKey)
reactor.core.publisher.Mono<HttpResponse>
bindQueue(String vhost, String queue, String exchange, String routingKey, Map<String,Object> args)
reactor.core.publisher.Mono<HttpResponse>
clearMaxConnectionsLimit(String vhost)
Clears the connection limit for a virtual host.reactor.core.publisher.Mono<HttpResponse>
clearMaxQueuesLimit(String vhost)
Clears the queue limit for a virtual host.reactor.core.publisher.Mono<HttpResponse>
clearPermissions(String vhost, String username)
reactor.core.publisher.Mono<HttpResponse>
clearTopicPermissions(String vhost, String username)
reactor.core.publisher.Mono<HttpResponse>
closeConnection(String name)
reactor.core.publisher.Mono<HttpResponse>
closeConnection(String name, String reason)
static reactor.core.publisher.Mono<String>
createBasicAuthenticationToken(String username, String password)
static com.fasterxml.jackson.databind.ObjectMapper
createDefaultObjectMapper()
reactor.core.publisher.Mono<HttpResponse>
createUser(String username, char[] password, List<String> tags)
reactor.core.publisher.Mono<HttpResponse>
createUserWithPasswordHash(String username, char[] passwordHash, List<String> tags)
reactor.core.publisher.Mono<HttpResponse>
createVhost(String name)
reactor.core.publisher.Mono<HttpResponse>
createVhost(String name, boolean tracing)
Create a virtual host with name and tracing flag.reactor.core.publisher.Mono<HttpResponse>
createVhost(String name, boolean tracing, String description, String... tags)
Create a virtual host with name, tracing flag, and metadata.reactor.core.publisher.Mono<HttpResponse>
createVhost(String name, String description, String... tags)
Create a virtual host with name and metadata.reactor.core.publisher.Mono<HttpResponse>
declareExchange(String vhost, String name, ExchangeInfo info)
reactor.core.publisher.Mono<HttpResponse>
declarePolicy(String vhost, String name, PolicyInfo info)
reactor.core.publisher.Mono<HttpResponse>
declareQueue(String vhost, String name, QueueInfo info)
reactor.core.publisher.Mono<HttpResponse>
declareShovel(String vhost, ShovelInfo info)
reactor.core.publisher.Mono<HttpResponse>
declareUpstream(String vhost, String name, UpstreamDetails details)
Declares an upstreamreactor.core.publisher.Mono<HttpResponse>
declareUpstreamSet(String vhost, String name, List<UpstreamSetDetails> details)
Declares an upstream set.protected <T> BiFunction<? super reactor.netty.http.client.HttpClientResponse,? super reactor.netty.ByteBufFlux,org.reactivestreams.Publisher<T>>
decode(Class<T> type)
reactor.core.publisher.Mono<HttpResponse>
deleteExchange(String vhost, String name)
reactor.core.publisher.Mono<HttpResponse>
deletePolicy(String vhost, String name)
reactor.core.publisher.Mono<HttpResponse>
deleteQueue(String vhost, String name)
reactor.core.publisher.Mono<HttpResponse>
deleteQueue(String vhost, String name, DeleteQueueParameters parameters)
reactor.core.publisher.Mono<HttpResponse>
deleteShovel(String vhost, String shovelName)
reactor.core.publisher.Mono<HttpResponse>
deleteUpstream(String vhost, String name)
Deletes an upstreamreactor.core.publisher.Mono<HttpResponse>
deleteUpstreamSet(String vhost, String name)
Deletes an upstream setreactor.core.publisher.Mono<HttpResponse>
deleteUser(String username)
reactor.core.publisher.Mono<HttpResponse>
deleteVhost(String name)
reactor.core.publisher.Mono<InboundMessage>
get(String vhost, String queue)
Get one message from a queue and requeue it.reactor.core.publisher.Flux<InboundMessage>
get(String vhost, String queue, int count, GetAckMode ackMode, GetEncoding encoding)
Get messages from a queue, with no limit for message payload truncation.reactor.core.publisher.Flux<InboundMessage>
get(String vhost, String queue, int count, GetAckMode ackMode, GetEncoding encoding, int truncate)
Get messages from a queue.reactor.core.publisher.Flux<BindingInfo>
getBindings()
reactor.core.publisher.Flux<BindingInfo>
getBindings(String vhost)
reactor.core.publisher.Mono<ChannelInfo>
getChannel(String name)
reactor.core.publisher.Flux<ChannelInfo>
getChannels()
reactor.core.publisher.Flux<ChannelInfo>
getChannels(String connectionName)
reactor.core.publisher.Mono<ClusterId>
getClusterName()
reactor.core.publisher.Mono<ConnectionInfo>
getConnection(String name)
reactor.core.publisher.Flux<ConnectionInfo>
getConnections()
reactor.core.publisher.Flux<ConsumerDetails>
getConsumers()
reactor.core.publisher.Flux<ConsumerDetails>
getConsumers(String vhost)
reactor.core.publisher.Mono<Definitions>
getDefinitions()
reactor.core.publisher.Mono<ExchangeInfo>
getExchange(String vhost, String name)
reactor.core.publisher.Flux<BindingInfo>
getExchangeBindingsBetween(String vhost, String source, String destination)
reactor.core.publisher.Flux<BindingInfo>
getExchangeBindingsByDestination(String vhost, String exchange)
reactor.core.publisher.Flux<BindingInfo>
getExchangeBindingsBySource(String vhost, String exchange)
reactor.core.publisher.Flux<ExchangeInfo>
getExchanges()
reactor.core.publisher.Flux<ExchangeInfo>
getExchanges(String vhost)
reactor.core.publisher.Flux<Map>
getExtensions()
reactor.core.publisher.Mono<NodeInfo>
getNode(String name)
reactor.core.publisher.Flux<NodeInfo>
getNodes()
reactor.core.publisher.Mono<OverviewResponse>
getOverview()
reactor.core.publisher.Flux<UserPermissions>
getPermissions()
reactor.core.publisher.Mono<UserPermissions>
getPermissions(String vhost, String username)
reactor.core.publisher.Flux<UserPermissions>
getPermissionsIn(String vhost)
reactor.core.publisher.Flux<UserPermissions>
getPermissionsOf(String username)
reactor.core.publisher.Flux<PolicyInfo>
getPolicies()
reactor.core.publisher.Flux<PolicyInfo>
getPolicies(String vhost)
reactor.core.publisher.Mono<QueueInfo>
getQueue(String vhost, String name)
reactor.core.publisher.Flux<BindingInfo>
getQueueBindings(String vhost, String queue)
reactor.core.publisher.Flux<BindingInfo>
getQueueBindingsBetween(String vhost, String exchange, String queue)
reactor.core.publisher.Flux<QueueInfo>
getQueues()
reactor.core.publisher.Flux<QueueInfo>
getQueues(String vhost)
reactor.core.publisher.Flux<ShovelInfo>
getShovels()
reactor.core.publisher.Flux<ShovelStatus>
getShovelsStatus()
reactor.core.publisher.Flux<TopicPermissions>
getTopicPermissions()
reactor.core.publisher.Flux<TopicPermissions>
getTopicPermissions(String vhost, String username)
reactor.core.publisher.Flux<TopicPermissions>
getTopicPermissionsIn(String vhost)
reactor.core.publisher.Flux<TopicPermissions>
getTopicPermissionsOf(String username)
reactor.core.publisher.Flux<UpstreamInfo>
getUpstreams()
Returns a list of upstreams for "/" virtual hostreactor.core.publisher.Flux<UpstreamInfo>
getUpstreams(String vhost)
Returns a list of upstreamsreactor.core.publisher.Flux<UpstreamSetInfo>
getUpstreamSets()
Returns a list of upstream sets for "/" virtual hostreactor.core.publisher.Flux<UpstreamSetInfo>
getUpstreamSets(String vhost)
Returns a list of upstream setsreactor.core.publisher.Mono<UserInfo>
getUser(String username)
reactor.core.publisher.Flux<UserInfo>
getUsers()
reactor.core.publisher.Mono<VhostInfo>
getVhost(String name)
reactor.core.publisher.Flux<VhostLimits>
getVhostLimits()
Returns the limits (max queues and connections) for all virtual hosts.reactor.core.publisher.Mono<VhostLimits>
getVhostLimits(String vhost)
Returns the limits (max queues and connections) for a given virtual host.reactor.core.publisher.Flux<VhostInfo>
getVhosts()
reactor.core.publisher.Mono<HttpResponse>
limitMaxNumberOfConnections(String vhost, int limit)
Sets the max number (limit) of connections for a virtual host.reactor.core.publisher.Mono<HttpResponse>
limitMaxNumberOfQueues(String vhost, int limit)
Sets the max number (limit) of queues for a virtual host.reactor.core.publisher.Mono<Boolean>
publish(String vhost, String exchange, String routingKey, OutboundMessage outboundMessage)
Publishes a message to an exchange.reactor.core.publisher.Mono<HttpResponse>
purgeQueue(String vhost, String name)
reactor.core.publisher.Mono<HttpResponse>
setClusterName(String name)
reactor.core.publisher.Mono<HttpResponse>
updatePermissions(String vhost, String username, UserPermissions permissions)
reactor.core.publisher.Mono<HttpResponse>
updateTopicPermissions(String vhost, String username, TopicPermissions permissions)
reactor.core.publisher.Mono<HttpResponse>
updateUser(String username, char[] password, List<String> tags)
reactor.core.publisher.Mono<CurrentUserDetails>
whoAmI()
-
-
-
Constructor Detail
-
ReactorNettyClient
public ReactorNettyClient(String url, ReactorNettyClientOptions options)
-
ReactorNettyClient
public ReactorNettyClient(String url)
-
ReactorNettyClient
public ReactorNettyClient(String url, String username, String password, ReactorNettyClientOptions options)
-
-
Method Detail
-
createDefaultObjectMapper
public static com.fasterxml.jackson.databind.ObjectMapper createDefaultObjectMapper()
-
createBasicAuthenticationToken
public static reactor.core.publisher.Mono<String> createBasicAuthenticationToken(String username, String password)
-
getOverview
public reactor.core.publisher.Mono<OverviewResponse> getOverview()
-
getNodes
public reactor.core.publisher.Flux<NodeInfo> getNodes()
-
getConnections
public reactor.core.publisher.Flux<ConnectionInfo> getConnections()
-
getConnection
public reactor.core.publisher.Mono<ConnectionInfo> getConnection(String name)
-
closeConnection
public reactor.core.publisher.Mono<HttpResponse> closeConnection(String name)
-
closeConnection
public reactor.core.publisher.Mono<HttpResponse> closeConnection(String name, String reason)
-
getConsumers
public reactor.core.publisher.Flux<ConsumerDetails> getConsumers()
-
getConsumers
public reactor.core.publisher.Flux<ConsumerDetails> getConsumers(String vhost)
-
declarePolicy
public reactor.core.publisher.Mono<HttpResponse> declarePolicy(String vhost, String name, PolicyInfo info)
-
getPolicies
public reactor.core.publisher.Flux<PolicyInfo> getPolicies()
-
getPolicies
public reactor.core.publisher.Flux<PolicyInfo> getPolicies(String vhost)
-
deletePolicy
public reactor.core.publisher.Mono<HttpResponse> deletePolicy(String vhost, String name)
-
getChannels
public reactor.core.publisher.Flux<ChannelInfo> getChannels()
-
getChannels
public reactor.core.publisher.Flux<ChannelInfo> getChannels(String connectionName)
-
getChannel
public reactor.core.publisher.Mono<ChannelInfo> getChannel(String name)
-
getVhosts
public reactor.core.publisher.Flux<VhostInfo> getVhosts()
-
createVhost
public reactor.core.publisher.Mono<HttpResponse> createVhost(String name, boolean tracing, String description, String... tags)
Create a virtual host with name, tracing flag, and metadata. Note metadata (description and tags) are supported as of RabbitMQ 3.8.- Parameters:
name
- name of the virtual hosttracing
- whether tracing is enabled or notdescription
- virtual host description (requires RabbitMQ 3.8 or more)tags
- virtual host tags (requires RabbitMQ 3.8 or more)- Returns:
- response wrapped in
Mono
- Since:
- 3.4.0
-
createVhost
public reactor.core.publisher.Mono<HttpResponse> createVhost(String name, String description, String... tags)
Create a virtual host with name and metadata. Note metadata (description and tags) are supported as of RabbitMQ 3.8.- Parameters:
name
- name of the virtual hostdescription
- virtual host description (requires RabbitMQ 3.8 or more)tags
- virtual host tags (requires RabbitMQ 3.8 or more)- Returns:
- response wrapped in
Mono
- Since:
- 3.4.0
-
createVhost
public reactor.core.publisher.Mono<HttpResponse> createVhost(String name, boolean tracing)
Create a virtual host with name and tracing flag.- Parameters:
name
- name of the virtual hosttracing
- whether tracing is enabled or not- Returns:
- response wrapped in
Mono
- Since:
- 3.4.0
-
createVhost
public reactor.core.publisher.Mono<HttpResponse> createVhost(String name)
-
deleteVhost
public reactor.core.publisher.Mono<HttpResponse> deleteVhost(String name)
-
getPermissionsIn
public reactor.core.publisher.Flux<UserPermissions> getPermissionsIn(String vhost)
-
updatePermissions
public reactor.core.publisher.Mono<HttpResponse> updatePermissions(String vhost, String username, UserPermissions permissions)
-
getTopicPermissionsIn
public reactor.core.publisher.Flux<TopicPermissions> getTopicPermissionsIn(String vhost)
-
updateTopicPermissions
public reactor.core.publisher.Mono<HttpResponse> updateTopicPermissions(String vhost, String username, TopicPermissions permissions)
-
getUsers
public reactor.core.publisher.Flux<UserInfo> getUsers()
-
deleteUser
public reactor.core.publisher.Mono<HttpResponse> deleteUser(String username)
-
createUser
public reactor.core.publisher.Mono<HttpResponse> createUser(String username, char[] password, List<String> tags)
-
updateUser
public reactor.core.publisher.Mono<HttpResponse> updateUser(String username, char[] password, List<String> tags)
-
getPermissionsOf
public reactor.core.publisher.Flux<UserPermissions> getPermissionsOf(String username)
-
getTopicPermissionsOf
public reactor.core.publisher.Flux<TopicPermissions> getTopicPermissionsOf(String username)
-
createUserWithPasswordHash
public reactor.core.publisher.Mono<HttpResponse> createUserWithPasswordHash(String username, char[] passwordHash, List<String> tags)
-
whoAmI
public reactor.core.publisher.Mono<CurrentUserDetails> whoAmI()
-
getPermissions
public reactor.core.publisher.Flux<UserPermissions> getPermissions()
-
getPermissions
public reactor.core.publisher.Mono<UserPermissions> getPermissions(String vhost, String username)
-
clearPermissions
public reactor.core.publisher.Mono<HttpResponse> clearPermissions(String vhost, String username)
-
getTopicPermissions
public reactor.core.publisher.Flux<TopicPermissions> getTopicPermissions()
-
getTopicPermissions
public reactor.core.publisher.Flux<TopicPermissions> getTopicPermissions(String vhost, String username)
-
clearTopicPermissions
public reactor.core.publisher.Mono<HttpResponse> clearTopicPermissions(String vhost, String username)
-
getExchanges
public reactor.core.publisher.Flux<ExchangeInfo> getExchanges()
-
getExchanges
public reactor.core.publisher.Flux<ExchangeInfo> getExchanges(String vhost)
-
getExchange
public reactor.core.publisher.Mono<ExchangeInfo> getExchange(String vhost, String name)
-
declareExchange
public reactor.core.publisher.Mono<HttpResponse> declareExchange(String vhost, String name, ExchangeInfo info)
-
deleteExchange
public reactor.core.publisher.Mono<HttpResponse> deleteExchange(String vhost, String name)
-
publish
public reactor.core.publisher.Mono<Boolean> publish(String vhost, String exchange, String routingKey, OutboundMessage outboundMessage)
Publishes a message to an exchange.DO NOT USE THIS METHOD IN PRODUCTION. The HTTP API has to create a new TCP connection for each message published, which is highly suboptimal.
Use this method for test or development code only. In production, use AMQP 0-9-1 or any other messaging protocol that uses a long-lived connection.
- Parameters:
vhost
- the virtual host to useexchange
- the target exchangeroutingKey
- the routing key to useoutboundMessage
- the message to publish- Returns:
- true if message has been routed to at least a queue, false otherwise
- Since:
- 3.4.0
-
alivenessTest
public reactor.core.publisher.Mono<AlivenessTestResult> alivenessTest(String vhost)
-
getClusterName
public reactor.core.publisher.Mono<ClusterId> getClusterName()
-
setClusterName
public reactor.core.publisher.Mono<HttpResponse> setClusterName(String name)
-
getExtensions
public reactor.core.publisher.Flux<Map> getExtensions()
-
getDefinitions
public reactor.core.publisher.Mono<Definitions> getDefinitions()
-
getQueues
public reactor.core.publisher.Flux<QueueInfo> getQueues()
-
declareQueue
public reactor.core.publisher.Mono<HttpResponse> declareQueue(String vhost, String name, QueueInfo info)
-
purgeQueue
public reactor.core.publisher.Mono<HttpResponse> purgeQueue(String vhost, String name)
-
deleteQueue
public reactor.core.publisher.Mono<HttpResponse> deleteQueue(String vhost, String name)
-
deleteQueue
public reactor.core.publisher.Mono<HttpResponse> deleteQueue(String vhost, String name, DeleteQueueParameters parameters)
-
get
public reactor.core.publisher.Flux<InboundMessage> get(String vhost, String queue, int count, GetAckMode ackMode, GetEncoding encoding, int truncate)
Get messages from a queue. DO NOT USE THIS METHOD IN PRODUCTION. Getting messages with the HTTP API is intended for diagnostics or tests. It does not implement reliable delivery and so should be treated as a sysadmin's tool rather than a general API for messaging.- Parameters:
vhost
- the virtual host the target queue is inqueue
- the queue to consume fromcount
- the maximum number of messages to getackMode
- determines whether the messages will be removed from the queueencoding
- the expected encoding of the message payloadtruncate
- to truncate the message payload if it is larger than the size given (in bytes), -1 means no truncation- Returns:
- the messages wrapped in a
Flux
- Since:
- 3.4.0
- See Also:
GetAckMode
,GetEncoding
-
get
public reactor.core.publisher.Flux<InboundMessage> get(String vhost, String queue, int count, GetAckMode ackMode, GetEncoding encoding)
Get messages from a queue, with no limit for message payload truncation. DO NOT USE THIS METHOD IN PRODUCTION. Getting messages with the HTTP API is intended for diagnostics or tests. It does not implement reliable delivery and so should be treated as a sysadmin's tool rather than a general API for messaging.- Parameters:
vhost
- the virtual host the target queue is inqueue
- the queue to consume fromcount
- the maximum number of messages to getackMode
- determines whether the messages will be removed from the queueencoding
- the expected encoding of the message payload- Returns:
- the messages wrapped in a
Flux
- Since:
- 3.4.0
- See Also:
GetAckMode
,GetEncoding
-
get
public reactor.core.publisher.Mono<InboundMessage> get(String vhost, String queue)
Get one message from a queue and requeue it. DO NOT USE THIS METHOD IN PRODUCTION. Getting messages with the HTTP API is intended for diagnostics or tests. It does not implement reliable delivery and so should be treated as a sysadmin's tool rather than a general API for messaging.- Parameters:
vhost
- the virtual host the target queue is inqueue
- the queue to consume from- Returns:
- the message wrapped in a
Mono
- Since:
- 3.4.0
- See Also:
GetAckMode
,GetEncoding
-
getBindings
public reactor.core.publisher.Flux<BindingInfo> getBindings()
-
getBindings
public reactor.core.publisher.Flux<BindingInfo> getBindings(String vhost)
-
getExchangeBindingsBySource
public reactor.core.publisher.Flux<BindingInfo> getExchangeBindingsBySource(String vhost, String exchange)
-
getExchangeBindingsByDestination
public reactor.core.publisher.Flux<BindingInfo> getExchangeBindingsByDestination(String vhost, String exchange)
-
getQueueBindings
public reactor.core.publisher.Flux<BindingInfo> getQueueBindings(String vhost, String queue)
-
getQueueBindingsBetween
public reactor.core.publisher.Flux<BindingInfo> getQueueBindingsBetween(String vhost, String exchange, String queue)
-
getExchangeBindingsBetween
public reactor.core.publisher.Flux<BindingInfo> getExchangeBindingsBetween(String vhost, String source, String destination)
-
bindExchange
public reactor.core.publisher.Mono<HttpResponse> bindExchange(String vhost, String destination, String source, String routingKey)
-
bindExchange
public reactor.core.publisher.Mono<HttpResponse> bindExchange(String vhost, String destination, String source, String routingKey, Map<String,Object> args)
-
bindQueue
public reactor.core.publisher.Mono<HttpResponse> bindQueue(String vhost, String queue, String exchange, String routingKey)
-
bindQueue
public reactor.core.publisher.Mono<HttpResponse> bindQueue(String vhost, String queue, String exchange, String routingKey, Map<String,Object> args)
-
declareShovel
public reactor.core.publisher.Mono<HttpResponse> declareShovel(String vhost, ShovelInfo info)
-
getShovels
public reactor.core.publisher.Flux<ShovelInfo> getShovels()
-
getShovelsStatus
public reactor.core.publisher.Flux<ShovelStatus> getShovelsStatus()
-
deleteShovel
public reactor.core.publisher.Mono<HttpResponse> deleteShovel(String vhost, String shovelName)
-
declareUpstream
public reactor.core.publisher.Mono<HttpResponse> declareUpstream(String vhost, String name, UpstreamDetails details)
Declares an upstream- Parameters:
vhost
- virtual host for which to declare the upstreamname
- name of the upstream to declaredetails
- upstream arguments- Returns:
- HTTP response in a mono
-
deleteUpstream
public reactor.core.publisher.Mono<HttpResponse> deleteUpstream(String vhost, String name)
Deletes an upstream- Parameters:
vhost
- virtual host for which to delete the upstreamname
- name of the upstream to delete- Returns:
- HTTP response in a mono
-
getUpstreams
public reactor.core.publisher.Flux<UpstreamInfo> getUpstreams()
Returns a list of upstreams for "/" virtual host- Returns:
- flux of upstream info
-
getUpstreams
public reactor.core.publisher.Flux<UpstreamInfo> getUpstreams(String vhost)
Returns a list of upstreams- Parameters:
vhost
- virtual host the upstreams are in.- Returns:
- flux of upstream info
-
declareUpstreamSet
public reactor.core.publisher.Mono<HttpResponse> declareUpstreamSet(String vhost, String name, List<UpstreamSetDetails> details)
Declares an upstream set.- Parameters:
vhost
- virtual host for which to declare the upstream setname
- name of the upstream set to declaredetails
- upstream set arguments- Returns:
- HTTP response in a mono
-
deleteUpstreamSet
public reactor.core.publisher.Mono<HttpResponse> deleteUpstreamSet(String vhost, String name)
Deletes an upstream set- Parameters:
vhost
- virtual host for which to delete the upstream setname
- name of the upstream set to delete- Returns:
- HTTP response in a mono
-
getUpstreamSets
public reactor.core.publisher.Flux<UpstreamSetInfo> getUpstreamSets()
Returns a list of upstream sets for "/" virtual host- Returns:
- flux of upstream set info
-
getUpstreamSets
public reactor.core.publisher.Flux<UpstreamSetInfo> getUpstreamSets(String vhost)
Returns a list of upstream sets- Parameters:
vhost
- Virtual host from where to get upstreams.- Returns:
- flux of upstream set info
-
getVhostLimits
public reactor.core.publisher.Flux<VhostLimits> getVhostLimits()
Returns the limits (max queues and connections) for all virtual hosts.- Returns:
- flux of the limits
- Since:
- 3.7.0
-
getVhostLimits
public reactor.core.publisher.Mono<VhostLimits> getVhostLimits(String vhost)
Returns the limits (max queues and connections) for a given virtual host.- Parameters:
vhost
- the virtual host- Returns:
- flux of the limits for this virtual host
- Since:
- 3.7.0
-
limitMaxNumberOfConnections
public reactor.core.publisher.Mono<HttpResponse> limitMaxNumberOfConnections(String vhost, int limit)
Sets the max number (limit) of connections for a virtual host.- Parameters:
vhost
- the virtual hostlimit
- the max number of connections allowed- Returns:
- HTTP response in a mono
- Since:
- 3.7.0
-
limitMaxNumberOfQueues
public reactor.core.publisher.Mono<HttpResponse> limitMaxNumberOfQueues(String vhost, int limit)
Sets the max number (limit) of queues for a virtual host.- Parameters:
vhost
- the virtual hostlimit
- the max number of queues allowed- Returns:
- HTTP response in a mono
- Since:
- 3.7.0
-
clearMaxConnectionsLimit
public reactor.core.publisher.Mono<HttpResponse> clearMaxConnectionsLimit(String vhost)
Clears the connection limit for a virtual host.- Parameters:
vhost
- the virtual host- Returns:
- HTTP response in a mono
- Since:
- 3.7.0
-
clearMaxQueuesLimit
public reactor.core.publisher.Mono<HttpResponse> clearMaxQueuesLimit(String vhost)
Clears the queue limit for a virtual host.- Parameters:
vhost
- the virtual host- Returns:
- HTTP response in a mono
- Since:
- 3.7.0
-
decode
protected <T> BiFunction<? super reactor.netty.http.client.HttpClientResponse,? super reactor.netty.ByteBufFlux,org.reactivestreams.Publisher<T>> decode(Class<T> type)
-
authorizedHeader
protected Function<? super io.netty.handler.codec.http.HttpHeaders,reactor.core.publisher.Mono<? extends io.netty.handler.codec.http.HttpHeaders>> authorizedHeader()
-
applyResponseCallback
protected Consumer<reactor.netty.http.client.HttpClientResponse> applyResponseCallback()
-
-