mirror of
https://github.com/apache/rocketmq.git
synced 2026-09-24 16:04:00 +08:00
[ISSUE #3949] code refactor
This commit is contained in:
@@ -18,6 +18,4 @@ package org.apache.rocketmq.proxy.common.utils;
|
||||
|
||||
public class ProxyUtils {
|
||||
public static final int MAX_MSG_NUMS_FOR_POP_REQUEST = 32;
|
||||
|
||||
public static final long MAX_CONSUMER_TIMEOUT_MILLIS = Duration.ofSeconds(20).toMillis();
|
||||
}
|
||||
|
||||
@@ -23,6 +23,7 @@ import org.apache.rocketmq.proxy.common.StartAndShutdown;
|
||||
import org.apache.rocketmq.proxy.connector.factory.ForwardClientManager;
|
||||
|
||||
public abstract class AbstractForwardClient implements StartAndShutdown {
|
||||
public static final long MAX_CONSUMER_TIMEOUT_MILLIS = Duration.ofSeconds(20).toMillis();
|
||||
public static final long DEFAULT_MQ_CLIENT_TIMEOUT = Duration.ofSeconds(3).toMillis();
|
||||
|
||||
private final ForwardClientManager clientFactory;
|
||||
|
||||
@@ -61,7 +61,7 @@ public class ForwardReadConsumer extends AbstractForwardClient {
|
||||
}
|
||||
|
||||
public CompletableFuture<PullResult> pullMessage(String address, PullMessageRequestHeader requestHeader) {
|
||||
return this.pullMessage(address, requestHeader, ProxyUtils.MAX_CONSUMER_TIMEOUT_MILLIS);
|
||||
return this.pullMessage(address, requestHeader, MAX_CONSUMER_TIMEOUT_MILLIS);
|
||||
}
|
||||
|
||||
public CompletableFuture<PullResult> pullMessage(String address, PullMessageRequestHeader requestHeader,
|
||||
|
||||
Reference in New Issue
Block a user