public class DefaultMessageConsumer extends Service implements MessageConsumer
Service.Election, Service.ElectionListenerActivity.ServiceState| 限定符和类型 | 字段和说明 |
|---|---|
protected static org.slf4j.Logger |
logger |
| 构造器和说明 |
|---|
DefaultMessageConsumer(ConsumerConfig config,
NameServerConfig nameServerConfig,
ClusterManager clusterManager,
ClusterClientManager clusterClientManager,
ConsumerClientManager consumerClientManager) |
| 限定符和类型 | 方法和说明 |
|---|---|
void |
addInterceptor(ConsumerInterceptor interceptor) |
protected void |
checkState() |
protected void |
checkSubscribe() |
protected void |
checkUnsubscribe() |
org.joyqueue.exception.JoyQueueCode |
commitIndex(short partition,
long index) |
org.joyqueue.exception.JoyQueueCode |
commitMaxIndex() |
org.joyqueue.exception.JoyQueueCode |
commitMaxIndex(short partition) |
org.joyqueue.exception.JoyQueueCode |
commitMinIndex() |
org.joyqueue.exception.JoyQueueCode |
commitMinIndex(short partition) |
protected void |
doStart() |
protected void |
doStop() |
protected void |
doSubscribeListener(String topic,
BaseMessageListener messageListener) |
FetchIndexData |
fetchIndex(short partition) |
TopicMetadata |
getTopicMetadata(String topic) |
boolean |
isListenSuspended() |
boolean |
isSubscribed() |
protected TopicMessageConsumer |
newTopicMessageConsumer(String topic) |
List<ConsumeMessage> |
poll() |
List<ConsumeMessage> |
poll(long timeout,
TimeUnit timeoutUnit) |
CompletableFuture<List<ConsumeMessage>> |
pollAsync() |
CompletableFuture<List<ConsumeMessage>> |
pollAsync(long timeout,
TimeUnit timeoutUnit) |
ConsumeMessage |
pollOnce() |
ConsumeMessage |
pollOnce(long timeout,
TimeUnit timeoutUnit) |
List<ConsumeMessage> |
pollPartition(short partition) |
List<ConsumeMessage> |
pollPartition(short partition,
long index) |
List<ConsumeMessage> |
pollPartition(short partition,
long index,
long timeout,
TimeUnit timeoutUnit) |
List<ConsumeMessage> |
pollPartition(short partition,
long timeout,
TimeUnit timeoutUnit) |
CompletableFuture<List<ConsumeMessage>> |
pollPartitionAsync(short partition) |
CompletableFuture<List<ConsumeMessage>> |
pollPartitionAsync(short partition,
long index) |
CompletableFuture<List<ConsumeMessage>> |
pollPartitionAsync(short partition,
long index,
long timeout,
TimeUnit timeoutUnit) |
CompletableFuture<List<ConsumeMessage>> |
pollPartitionAsync(short partition,
long timeout,
TimeUnit timeoutUnit) |
ConsumeMessage |
pollPartitionOnce(short partition) |
ConsumeMessage |
pollPartitionOnce(short partition,
long index) |
ConsumeMessage |
pollPartitionOnce(short partition,
long index,
long timeout,
TimeUnit timeoutUnit) |
ConsumeMessage |
pollPartitionOnce(short partition,
long timeout,
TimeUnit timeoutUnit) |
void |
removeInterceptor(ConsumerInterceptor interceptor) |
org.joyqueue.exception.JoyQueueCode |
reply(List<ConsumeReply> replyList) |
org.joyqueue.exception.JoyQueueCode |
replyOnce(ConsumeReply reply) |
void |
resumeListen() |
void |
subscribe(String topic) |
void |
subscribe(String topic,
MessageListener messageListener) |
void |
subscribeBatch(String topic,
BatchMessageListener batchMessageListener) |
String |
subscription() |
void |
suspendListen() |
void |
unsubscribe() |
getServiceState, isReady, isStarted, isStopped, start, stop, stop, validate, willStopafterStart, afterStop, await, beforeStart, beforeStop, convert, getReadLock, getWriteLock, startErrorpublic DefaultMessageConsumer(ConsumerConfig config, NameServerConfig nameServerConfig, ClusterManager clusterManager, ClusterClientManager clusterClientManager, ConsumerClientManager consumerClientManager)
public void subscribe(String topic)
subscribe 在接口中 MessageConsumerpublic void unsubscribe()
unsubscribe 在接口中 MessageConsumerpublic String subscription()
subscription 在接口中 MessageConsumerpublic boolean isSubscribed()
isSubscribed 在接口中 MessageConsumerpublic void subscribe(String topic, MessageListener messageListener)
subscribe 在接口中 MessageConsumerpublic void subscribeBatch(String topic, BatchMessageListener batchMessageListener)
subscribeBatch 在接口中 MessageConsumerprotected void doSubscribeListener(String topic, BaseMessageListener messageListener)
protected TopicMessageConsumer newTopicMessageConsumer(String topic)
public void resumeListen()
resumeListen 在接口中 MessageConsumerpublic void suspendListen()
suspendListen 在接口中 MessageConsumerpublic boolean isListenSuspended()
isListenSuspended 在接口中 MessageConsumerpublic void addInterceptor(ConsumerInterceptor interceptor)
addInterceptor 在接口中 MessageConsumerpublic void removeInterceptor(ConsumerInterceptor interceptor)
removeInterceptor 在接口中 MessageConsumerpublic ConsumeMessage pollOnce()
pollOnce 在接口中 MessageConsumerpublic ConsumeMessage pollOnce(long timeout, TimeUnit timeoutUnit)
pollOnce 在接口中 MessageConsumerpublic List<ConsumeMessage> poll()
poll 在接口中 MessageConsumerpublic List<ConsumeMessage> poll(long timeout, TimeUnit timeoutUnit)
poll 在接口中 MessageConsumerpublic CompletableFuture<List<ConsumeMessage>> pollAsync()
pollAsync 在接口中 MessageConsumerpublic CompletableFuture<List<ConsumeMessage>> pollAsync(long timeout, TimeUnit timeoutUnit)
pollAsync 在接口中 MessageConsumerpublic ConsumeMessage pollPartitionOnce(short partition)
pollPartitionOnce 在接口中 MessageConsumerpublic ConsumeMessage pollPartitionOnce(short partition, long timeout, TimeUnit timeoutUnit)
pollPartitionOnce 在接口中 MessageConsumerpublic ConsumeMessage pollPartitionOnce(short partition, long index)
pollPartitionOnce 在接口中 MessageConsumerpublic ConsumeMessage pollPartitionOnce(short partition, long index, long timeout, TimeUnit timeoutUnit)
pollPartitionOnce 在接口中 MessageConsumerpublic List<ConsumeMessage> pollPartition(short partition)
pollPartition 在接口中 MessageConsumerpublic List<ConsumeMessage> pollPartition(short partition, long timeout, TimeUnit timeoutUnit)
pollPartition 在接口中 MessageConsumerpublic CompletableFuture<List<ConsumeMessage>> pollPartitionAsync(short partition)
pollPartitionAsync 在接口中 MessageConsumerpublic CompletableFuture<List<ConsumeMessage>> pollPartitionAsync(short partition, long timeout, TimeUnit timeoutUnit)
pollPartitionAsync 在接口中 MessageConsumerpublic List<ConsumeMessage> pollPartition(short partition, long index)
pollPartition 在接口中 MessageConsumerpublic List<ConsumeMessage> pollPartition(short partition, long index, long timeout, TimeUnit timeoutUnit)
pollPartition 在接口中 MessageConsumerpublic CompletableFuture<List<ConsumeMessage>> pollPartitionAsync(short partition, long index)
pollPartitionAsync 在接口中 MessageConsumerpublic CompletableFuture<List<ConsumeMessage>> pollPartitionAsync(short partition, long index, long timeout, TimeUnit timeoutUnit)
pollPartitionAsync 在接口中 MessageConsumerpublic org.joyqueue.exception.JoyQueueCode reply(List<ConsumeReply> replyList)
reply 在接口中 MessageConsumerpublic org.joyqueue.exception.JoyQueueCode replyOnce(ConsumeReply reply)
replyOnce 在接口中 MessageConsumerpublic org.joyqueue.exception.JoyQueueCode commitIndex(short partition,
long index)
commitIndex 在接口中 MessageConsumerpublic org.joyqueue.exception.JoyQueueCode commitMaxIndex()
commitMaxIndex 在接口中 MessageConsumerpublic org.joyqueue.exception.JoyQueueCode commitMaxIndex(short partition)
commitMaxIndex 在接口中 MessageConsumerpublic org.joyqueue.exception.JoyQueueCode commitMinIndex()
commitMinIndex 在接口中 MessageConsumerpublic org.joyqueue.exception.JoyQueueCode commitMinIndex(short partition)
commitMinIndex 在接口中 MessageConsumerpublic FetchIndexData fetchIndex(short partition)
fetchIndex 在接口中 MessageConsumerpublic TopicMetadata getTopicMetadata(String topic)
getTopicMetadata 在接口中 MessageConsumerprotected void checkState()
protected void checkSubscribe()
protected void checkUnsubscribe()
Copyright © 2020 Joyqueue Community. All rights reserved.