org.apache.rocketmq.common.protocol.header.QueryMessageRequestHeader Java Examples

The following examples show how to use org.apache.rocketmq.common.protocol.header.QueryMessageRequestHeader. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: MQClientAPIImpl.java    From rocketmq-read with Apache License 2.0 6 votes vote down vote up
/**
 * 查询Message
 * @param addr addr
 * @param requestHeader requestHeader
 * @param timeoutMillis 超时时间
 * @param invokeCallback 执行回调callback
 * @param isUnqiueKey isUniqueKey
 * @throws RemotingException ;
 * @throws MQBrokerException ;
 * @throws InterruptedException ;
 */
public void queryMessage(
    final String addr,
    final QueryMessageRequestHeader requestHeader,
    final long timeoutMillis,
    final InvokeCallback invokeCallback,
    final Boolean isUnqiueKey
) throws RemotingException, MQBrokerException, InterruptedException {

    RemotingCommand request = RemotingCommand.createRequestCommand(RequestCode.QUERY_MESSAGE, requestHeader);
    request.addExtField(MixAll.UNIQUE_MSG_QUERY_FLAG, isUnqiueKey.toString());

    String acturallyAddr = getActurallyBrokerAddr(addr);
    this.remotingClient.invokeAsync(MixAll.brokerVIPChannel(this.clientConfig.isVipChannelEnabled(), acturallyAddr), request, timeoutMillis,
        invokeCallback);
}
 
Example #2
Source File: MQClientAPIImpl.java    From DDMQ with Apache License 2.0 5 votes vote down vote up
public void queryMessage(
    final String addr,
    final QueryMessageRequestHeader requestHeader,
    final long timeoutMillis,
    final InvokeCallback invokeCallback,
    final Boolean isUnqiueKey
) throws RemotingException, MQBrokerException, InterruptedException {
    RemotingCommand request = RemotingCommand.createRequestCommand(RequestCode.QUERY_MESSAGE, requestHeader);
    request.addExtField(MixAll.UNIQUE_MSG_QUERY_FLAG, isUnqiueKey.toString());
    this.remotingClient.invokeAsync(MixAll.brokerVIPChannel(this.clientConfig.isVipChannelEnabled(), addr), request, timeoutMillis,
        invokeCallback);
}
 
Example #3
Source File: MQClientAPIImpl.java    From rocketmq-4.3.0 with Apache License 2.0 5 votes vote down vote up
public void queryMessage(
    final String addr,
    final QueryMessageRequestHeader requestHeader,
    final long timeoutMillis,
    final InvokeCallback invokeCallback,
    final Boolean isUnqiueKey
) throws RemotingException, MQBrokerException, InterruptedException {
    RemotingCommand request = RemotingCommand.createRequestCommand(RequestCode.QUERY_MESSAGE, requestHeader);
    request.addExtField(MixAll.UNIQUE_MSG_QUERY_FLAG, isUnqiueKey.toString());
    this.remotingClient.invokeAsync(MixAll.brokerVIPChannel(this.clientConfig.isVipChannelEnabled(), addr), request, timeoutMillis,
        invokeCallback);
}
 
Example #4
Source File: MQClientAPIImpl.java    From DDMQ with Apache License 2.0 5 votes vote down vote up
public void queryMessage(
    final String addr,
    final QueryMessageRequestHeader requestHeader,
    final long timeoutMillis,
    final InvokeCallback invokeCallback,
    final Boolean isUnqiueKey
) throws RemotingException, MQBrokerException, InterruptedException {
    RemotingCommand request = RemotingCommand.createRequestCommand(RequestCode.QUERY_MESSAGE, requestHeader);
    request.addExtField(MixAll.UNIQUE_MSG_QUERY_FLAG, isUnqiueKey.toString());
    this.remotingClient.invokeAsync(MixAll.brokerVIPChannel(this.clientConfig.isVipChannelEnabled(), addr), request, timeoutMillis,
        invokeCallback);
}
 
Example #5
Source File: MQClientAPIImpl.java    From rocketmq-all-4.1.0-incubating with Apache License 2.0 5 votes vote down vote up
public void queryMessage(
    final String addr,
    final QueryMessageRequestHeader requestHeader,
    final long timeoutMillis,
    final InvokeCallback invokeCallback,
    final Boolean isUnqiueKey
) throws RemotingException, MQBrokerException, InterruptedException {
    RemotingCommand request = RemotingCommand.createRequestCommand(RequestCode.QUERY_MESSAGE, requestHeader);
    request.addExtField(MixAll.UNIQUE_MSG_QUERY_FLAG, isUnqiueKey.toString());
    this.remotingClient.invokeAsync(MixAll.brokerVIPChannel(this.clientConfig.isVipChannelEnabled(), addr), request, timeoutMillis,
        invokeCallback);
}
 
Example #6
Source File: MQClientAPIImpl.java    From rocketmq with Apache License 2.0 5 votes vote down vote up
public void queryMessage(
    final String addr,
    final QueryMessageRequestHeader requestHeader,
    final long timeoutMillis,
    final InvokeCallback invokeCallback,
    final Boolean isUnqiueKey
) throws RemotingException, MQBrokerException, InterruptedException {
    RemotingCommand request = RemotingCommand.createRequestCommand(RequestCode.QUERY_MESSAGE, requestHeader);
    request.addExtField(MixAll.UNIQUE_MSG_QUERY_FLAG, isUnqiueKey.toString());
    this.remotingClient.invokeAsync(MixAll.brokerVIPChannel(this.clientConfig.isVipChannelEnabled(), addr), request, timeoutMillis,
        invokeCallback);
}