public class Consumer extends ClientConfig
SIGN_METHOD_SHA1, SIGN_METHOD_SHA256| 构造器和说明 |
|---|
Consumer() |
buildMQClientId, changeInstanceNameToPID, cloneClientConfig, getBatchPullNumber, getClientCallbackExecutorThreads, getClientIP, getInstanceName, getNameServerAddress, getPollingWaitSeconds, getRequestTimeoutMS, getRetryTimesWhenSendFailed, getSecretId, getSecretKey, getSignMethod, setBatchPullNumber, setClientCallbackExecutorThreads, setClientIP, setInstanceName, setNameServerAddress, setPollingWaitSeconds, setRequestTimeoutMS, setRetryTimesWhenSendFailed, setSecretId, setSecretKey, setSignMethod, toStringpublic void start()
throws MQClientException
public ReceiveResult receiveMsg(String queue) throws MQClientException, MQServerException
public ReceiveResult receiveMsg(String queue, int pollingWaitingSeconds) throws MQClientException, MQServerException
public void receiveMsg(String queue, ReceiveCallback callback) throws MQClientException, MQServerException
public void receiveMsg(String queue, int pollingWaitingSeconds, ReceiveCallback callback) throws MQClientException, MQServerException
public BatchReceiveResult batchReceiveMsg(String queue) throws MQClientException, MQServerException
public BatchReceiveResult batchReceiveMsg(String queue, int number) throws MQClientException, MQServerException
public BatchReceiveResult batchReceiveMsg(String queue, int number, int pollingWaitSeconds) throws MQClientException, MQServerException
public void batchReceiveMsg(String queue, BatchReceiveCallback callback) throws MQClientException, MQServerException
public void batchReceiveMsg(String queue, int number, BatchReceiveCallback callback) throws MQClientException, MQServerException
public void batchReceiveMsg(String queue, int number, int pollingWaitSeconds, BatchReceiveCallback callback) throws MQClientException, MQServerException
public DeleteResult deleteMsg(String queue, long receiptHandle) throws MQClientException, MQServerException
public void deleteMsg(String queue, long receiptHandle, DeleteCallback callback) throws MQClientException, MQServerException
public BatchDeleteResult batchDeleteMsg(String queue, List<Long> receiptHandleList) throws MQClientException, MQServerException
public void batchDeleteMsg(String queue, List<Long> receiptHandleList, BatchDeleteCallback callback) throws MQClientException, MQServerException
public void subscribe(String queue, MessageListener listener) throws MQClientException, MQServerException
public void unSubscribe(String queue) throws MQClientException
public void shutdown()
Copyright © 2020. All rights reserved.