target
stringlengths
20
113k
src_fm
stringlengths
11
86.3k
src_fm_fc
stringlengths
21
86.4k
src_fm_fc_co
stringlengths
30
86.4k
src_fm_fc_ms
stringlengths
42
86.8k
src_fm_fc_ms_ff
stringlengths
43
86.8k
@Test public void testPullMessage_NotFound() throws Exception{ doAnswer(new Answer() { @Override public Object answer(InvocationOnMock mock) throws Throwable { PullMessageRequestHeader requestHeader = mock.getArgument(1); return createPullResult(requestHeader, PullStatus.NO_NEW_MSG, new ArrayList<MessageExt>()); } }).w...
@Override public PullResult pull(MessageQueue mq, String subExpression, long offset, int maxNums) throws MQClientException, RemotingException, MQBrokerException, InterruptedException { return this.defaultMQPullConsumerImpl.pull(mq, subExpression, offset, maxNums); }
DefaultMQPullConsumer extends ClientConfig implements MQPullConsumer { @Override public PullResult pull(MessageQueue mq, String subExpression, long offset, int maxNums) throws MQClientException, RemotingException, MQBrokerException, InterruptedException { return this.defaultMQPullConsumerImpl.pull(mq, subExpression, of...
DefaultMQPullConsumer extends ClientConfig implements MQPullConsumer { @Override public PullResult pull(MessageQueue mq, String subExpression, long offset, int maxNums) throws MQClientException, RemotingException, MQBrokerException, InterruptedException { return this.defaultMQPullConsumerImpl.pull(mq, subExpression, of...
DefaultMQPullConsumer extends ClientConfig implements MQPullConsumer { @Override public PullResult pull(MessageQueue mq, String subExpression, long offset, int maxNums) throws MQClientException, RemotingException, MQBrokerException, InterruptedException { return this.defaultMQPullConsumerImpl.pull(mq, subExpression, of...
DefaultMQPullConsumer extends ClientConfig implements MQPullConsumer { @Override public PullResult pull(MessageQueue mq, String subExpression, long offset, int maxNums) throws MQClientException, RemotingException, MQBrokerException, InterruptedException { return this.defaultMQPullConsumerImpl.pull(mq, subExpression, of...
@Test public void testFetchMasterAddrByClusterName() throws InterruptedException, MQBrokerException, RemotingTimeoutException, RemotingSendRequestException, RemotingConnectException { Set<String> result = CommandUtil.fetchMasterAddrByClusterName(defaultMQAdminExtImpl, "default-cluster"); assertThat(result.size()).isEqu...
public static Set<String> fetchMasterAddrByClusterName(final MQAdminExt adminExt, final String clusterName) throws InterruptedException, RemotingConnectException, RemotingTimeoutException, RemotingSendRequestException, MQBrokerException { Set<String> masterSet = new HashSet<String>(); ClusterInfo clusterInfoSerializeWr...
CommandUtil { public static Set<String> fetchMasterAddrByClusterName(final MQAdminExt adminExt, final String clusterName) throws InterruptedException, RemotingConnectException, RemotingTimeoutException, RemotingSendRequestException, MQBrokerException { Set<String> masterSet = new HashSet<String>(); ClusterInfo clusterI...
CommandUtil { public static Set<String> fetchMasterAddrByClusterName(final MQAdminExt adminExt, final String clusterName) throws InterruptedException, RemotingConnectException, RemotingTimeoutException, RemotingSendRequestException, MQBrokerException { Set<String> masterSet = new HashSet<String>(); ClusterInfo clusterI...
CommandUtil { public static Set<String> fetchMasterAddrByClusterName(final MQAdminExt adminExt, final String clusterName) throws InterruptedException, RemotingConnectException, RemotingTimeoutException, RemotingSendRequestException, MQBrokerException { Set<String> masterSet = new HashSet<String>(); ClusterInfo clusterI...
CommandUtil { public static Set<String> fetchMasterAddrByClusterName(final MQAdminExt adminExt, final String clusterName) throws InterruptedException, RemotingConnectException, RemotingTimeoutException, RemotingSendRequestException, MQBrokerException { Set<String> masterSet = new HashSet<String>(); ClusterInfo clusterI...
@Test public void testPullMessageAsync_Success() throws Exception { doAnswer(new Answer() { @Override public Object answer(InvocationOnMock mock) throws Throwable { PullMessageRequestHeader requestHeader = mock.getArgument(1); PullResult pullResult = createPullResult(requestHeader, PullStatus.FOUND, Collections.singlet...
@Override public PullResult pull(MessageQueue mq, String subExpression, long offset, int maxNums) throws MQClientException, RemotingException, MQBrokerException, InterruptedException { return this.defaultMQPullConsumerImpl.pull(mq, subExpression, offset, maxNums); }
DefaultMQPullConsumer extends ClientConfig implements MQPullConsumer { @Override public PullResult pull(MessageQueue mq, String subExpression, long offset, int maxNums) throws MQClientException, RemotingException, MQBrokerException, InterruptedException { return this.defaultMQPullConsumerImpl.pull(mq, subExpression, of...
DefaultMQPullConsumer extends ClientConfig implements MQPullConsumer { @Override public PullResult pull(MessageQueue mq, String subExpression, long offset, int maxNums) throws MQClientException, RemotingException, MQBrokerException, InterruptedException { return this.defaultMQPullConsumerImpl.pull(mq, subExpression, of...
DefaultMQPullConsumer extends ClientConfig implements MQPullConsumer { @Override public PullResult pull(MessageQueue mq, String subExpression, long offset, int maxNums) throws MQClientException, RemotingException, MQBrokerException, InterruptedException { return this.defaultMQPullConsumerImpl.pull(mq, subExpression, of...
DefaultMQPullConsumer extends ClientConfig implements MQPullConsumer { @Override public PullResult pull(MessageQueue mq, String subExpression, long offset, int maxNums) throws MQClientException, RemotingException, MQBrokerException, InterruptedException { return this.defaultMQPullConsumerImpl.pull(mq, subExpression, of...
@Test public void testPullMessage_Success() throws InterruptedException, RemotingException, MQBrokerException { final CountDownLatch countDownLatch = new CountDownLatch(1); final MessageExt[] messageExts = new MessageExt[1]; pushConsumer.getDefaultMQPushConsumerImpl().setConsumeMessageService(new ConsumeMessageConcurre...
public DefaultMQPushConsumerImpl getDefaultMQPushConsumerImpl() { return defaultMQPushConsumerImpl; }
DefaultMQPushConsumer extends ClientConfig implements MQPushConsumer { public DefaultMQPushConsumerImpl getDefaultMQPushConsumerImpl() { return defaultMQPushConsumerImpl; } }
DefaultMQPushConsumer extends ClientConfig implements MQPushConsumer { public DefaultMQPushConsumerImpl getDefaultMQPushConsumerImpl() { return defaultMQPushConsumerImpl; } DefaultMQPushConsumer(); DefaultMQPushConsumer(final String consumerGroup, RPCHook rpcHook, AllocateMessageQueueStrategy allocateMessageQueueStrat...
DefaultMQPushConsumer extends ClientConfig implements MQPushConsumer { public DefaultMQPushConsumerImpl getDefaultMQPushConsumerImpl() { return defaultMQPushConsumerImpl; } DefaultMQPushConsumer(); DefaultMQPushConsumer(final String consumerGroup, RPCHook rpcHook, AllocateMessageQueueStrategy allocateMessageQueueStrat...
DefaultMQPushConsumer extends ClientConfig implements MQPushConsumer { public DefaultMQPushConsumerImpl getDefaultMQPushConsumerImpl() { return defaultMQPushConsumerImpl; } DefaultMQPushConsumer(); DefaultMQPushConsumer(final String consumerGroup, RPCHook rpcHook, AllocateMessageQueueStrategy allocateMessageQueueStrat...
@Test public void testSendMessage_ZeroMessage() throws InterruptedException, RemotingException, MQBrokerException { try { producer.send(zeroMsg); failBecauseExceptionWasNotThrown(MQClientException.class); } catch (MQClientException e) { assertThat(e).hasMessageContaining("message body length is zero"); } }
@Override public SendResult send(Message msg) throws MQClientException, RemotingException, MQBrokerException, InterruptedException { return this.defaultMQProducerImpl.send(msg); }
DefaultMQProducer extends ClientConfig implements MQProducer { @Override public SendResult send(Message msg) throws MQClientException, RemotingException, MQBrokerException, InterruptedException { return this.defaultMQProducerImpl.send(msg); } }
DefaultMQProducer extends ClientConfig implements MQProducer { @Override public SendResult send(Message msg) throws MQClientException, RemotingException, MQBrokerException, InterruptedException { return this.defaultMQProducerImpl.send(msg); } DefaultMQProducer(); DefaultMQProducer(final String producerGroup, RPCHook r...
DefaultMQProducer extends ClientConfig implements MQProducer { @Override public SendResult send(Message msg) throws MQClientException, RemotingException, MQBrokerException, InterruptedException { return this.defaultMQProducerImpl.send(msg); } DefaultMQProducer(); DefaultMQProducer(final String producerGroup, RPCHook r...
DefaultMQProducer extends ClientConfig implements MQProducer { @Override public SendResult send(Message msg) throws MQClientException, RemotingException, MQBrokerException, InterruptedException { return this.defaultMQProducerImpl.send(msg); } DefaultMQProducer(); DefaultMQProducer(final String producerGroup, RPCHook r...
@Test public void testSendMessage_NoNameSrv() throws RemotingException, InterruptedException, MQBrokerException { when(mQClientAPIImpl.getNameServerAddressList()).thenReturn(new ArrayList<String>()); try { producer.send(message); failBecauseExceptionWasNotThrown(MQClientException.class); } catch (MQClientException e) {...
@Override public SendResult send(Message msg) throws MQClientException, RemotingException, MQBrokerException, InterruptedException { return this.defaultMQProducerImpl.send(msg); }
DefaultMQProducer extends ClientConfig implements MQProducer { @Override public SendResult send(Message msg) throws MQClientException, RemotingException, MQBrokerException, InterruptedException { return this.defaultMQProducerImpl.send(msg); } }
DefaultMQProducer extends ClientConfig implements MQProducer { @Override public SendResult send(Message msg) throws MQClientException, RemotingException, MQBrokerException, InterruptedException { return this.defaultMQProducerImpl.send(msg); } DefaultMQProducer(); DefaultMQProducer(final String producerGroup, RPCHook r...
DefaultMQProducer extends ClientConfig implements MQProducer { @Override public SendResult send(Message msg) throws MQClientException, RemotingException, MQBrokerException, InterruptedException { return this.defaultMQProducerImpl.send(msg); } DefaultMQProducer(); DefaultMQProducer(final String producerGroup, RPCHook r...
DefaultMQProducer extends ClientConfig implements MQProducer { @Override public SendResult send(Message msg) throws MQClientException, RemotingException, MQBrokerException, InterruptedException { return this.defaultMQProducerImpl.send(msg); } DefaultMQProducer(); DefaultMQProducer(final String producerGroup, RPCHook r...
@Test public void testSendMessage_NoRoute() throws RemotingException, InterruptedException, MQBrokerException { when(mQClientAPIImpl.getNameServerAddressList()).thenReturn(Collections.singletonList("127.0.0.1:9876")); try { producer.send(message); failBecauseExceptionWasNotThrown(MQClientException.class); } catch (MQCl...
@Override public SendResult send(Message msg) throws MQClientException, RemotingException, MQBrokerException, InterruptedException { return this.defaultMQProducerImpl.send(msg); }
DefaultMQProducer extends ClientConfig implements MQProducer { @Override public SendResult send(Message msg) throws MQClientException, RemotingException, MQBrokerException, InterruptedException { return this.defaultMQProducerImpl.send(msg); } }
DefaultMQProducer extends ClientConfig implements MQProducer { @Override public SendResult send(Message msg) throws MQClientException, RemotingException, MQBrokerException, InterruptedException { return this.defaultMQProducerImpl.send(msg); } DefaultMQProducer(); DefaultMQProducer(final String producerGroup, RPCHook r...
DefaultMQProducer extends ClientConfig implements MQProducer { @Override public SendResult send(Message msg) throws MQClientException, RemotingException, MQBrokerException, InterruptedException { return this.defaultMQProducerImpl.send(msg); } DefaultMQProducer(); DefaultMQProducer(final String producerGroup, RPCHook r...
DefaultMQProducer extends ClientConfig implements MQProducer { @Override public SendResult send(Message msg) throws MQClientException, RemotingException, MQBrokerException, InterruptedException { return this.defaultMQProducerImpl.send(msg); } DefaultMQProducer(); DefaultMQProducer(final String producerGroup, RPCHook r...
@Test public void testSendMessageSync_Success() throws RemotingException, InterruptedException, MQBrokerException, MQClientException { when(mQClientAPIImpl.getTopicRouteInfoFromNameServer(anyString(), anyLong())).thenReturn(createTopicRoute()); SendResult sendResult = producer.send(message); assertThat(sendResult.getSe...
@Override public SendResult send(Message msg) throws MQClientException, RemotingException, MQBrokerException, InterruptedException { return this.defaultMQProducerImpl.send(msg); }
DefaultMQProducer extends ClientConfig implements MQProducer { @Override public SendResult send(Message msg) throws MQClientException, RemotingException, MQBrokerException, InterruptedException { return this.defaultMQProducerImpl.send(msg); } }
DefaultMQProducer extends ClientConfig implements MQProducer { @Override public SendResult send(Message msg) throws MQClientException, RemotingException, MQBrokerException, InterruptedException { return this.defaultMQProducerImpl.send(msg); } DefaultMQProducer(); DefaultMQProducer(final String producerGroup, RPCHook r...
DefaultMQProducer extends ClientConfig implements MQProducer { @Override public SendResult send(Message msg) throws MQClientException, RemotingException, MQBrokerException, InterruptedException { return this.defaultMQProducerImpl.send(msg); } DefaultMQProducer(); DefaultMQProducer(final String producerGroup, RPCHook r...
DefaultMQProducer extends ClientConfig implements MQProducer { @Override public SendResult send(Message msg) throws MQClientException, RemotingException, MQBrokerException, InterruptedException { return this.defaultMQProducerImpl.send(msg); } DefaultMQProducer(); DefaultMQProducer(final String producerGroup, RPCHook r...
@Test public void testFetchBrokerNameByClusterName() throws Exception { Set<String> result = CommandUtil.fetchBrokerNameByClusterName(defaultMQAdminExtImpl, "default-cluster"); assertThat(result.contains("default-broker")).isTrue(); assertThat(result.contains("default-broker-one")).isTrue(); assertThat(result.size()).i...
public static Set<String> fetchBrokerNameByClusterName(final MQAdminExt adminExt, final String clusterName) throws Exception { ClusterInfo clusterInfoSerializeWrapper = adminExt.examineBrokerClusterInfo(); Set<String> brokerNameSet = clusterInfoSerializeWrapper.getClusterAddrTable().get(clusterName); if (brokerNameSet....
CommandUtil { public static Set<String> fetchBrokerNameByClusterName(final MQAdminExt adminExt, final String clusterName) throws Exception { ClusterInfo clusterInfoSerializeWrapper = adminExt.examineBrokerClusterInfo(); Set<String> brokerNameSet = clusterInfoSerializeWrapper.getClusterAddrTable().get(clusterName); if (...
CommandUtil { public static Set<String> fetchBrokerNameByClusterName(final MQAdminExt adminExt, final String clusterName) throws Exception { ClusterInfo clusterInfoSerializeWrapper = adminExt.examineBrokerClusterInfo(); Set<String> brokerNameSet = clusterInfoSerializeWrapper.getClusterAddrTable().get(clusterName); if (...
CommandUtil { public static Set<String> fetchBrokerNameByClusterName(final MQAdminExt adminExt, final String clusterName) throws Exception { ClusterInfo clusterInfoSerializeWrapper = adminExt.examineBrokerClusterInfo(); Set<String> brokerNameSet = clusterInfoSerializeWrapper.getClusterAddrTable().get(clusterName); if (...
CommandUtil { public static Set<String> fetchBrokerNameByClusterName(final MQAdminExt adminExt, final String clusterName) throws Exception { ClusterInfo clusterInfoSerializeWrapper = adminExt.examineBrokerClusterInfo(); Set<String> brokerNameSet = clusterInfoSerializeWrapper.getClusterAddrTable().get(clusterName); if (...
@Test public void testCheckTopic_Success() throws MQClientException { Validators.checkTopic("Hello"); Validators.checkTopic("%RETRY%Hello"); Validators.checkTopic("_%RETRY%Hello"); Validators.checkTopic("-%RETRY%Hello"); Validators.checkTopic("223-%RETRY%Hello"); }
public static void checkTopic(String topic) throws MQClientException { if (UtilAll.isBlank(topic)) { throw new MQClientException("The specified topic is blank", null); } if (!regularExpressionMatcher(topic, PATTERN)) { throw new MQClientException(String.format( "The specified topic[%s] contains illegal characters, allo...
Validators { public static void checkTopic(String topic) throws MQClientException { if (UtilAll.isBlank(topic)) { throw new MQClientException("The specified topic is blank", null); } if (!regularExpressionMatcher(topic, PATTERN)) { throw new MQClientException(String.format( "The specified topic[%s] contains illegal cha...
Validators { public static void checkTopic(String topic) throws MQClientException { if (UtilAll.isBlank(topic)) { throw new MQClientException("The specified topic is blank", null); } if (!regularExpressionMatcher(topic, PATTERN)) { throw new MQClientException(String.format( "The specified topic[%s] contains illegal cha...
Validators { public static void checkTopic(String topic) throws MQClientException { if (UtilAll.isBlank(topic)) { throw new MQClientException("The specified topic is blank", null); } if (!regularExpressionMatcher(topic, PATTERN)) { throw new MQClientException(String.format( "The specified topic[%s] contains illegal cha...
Validators { public static void checkTopic(String topic) throws MQClientException { if (UtilAll.isBlank(topic)) { throw new MQClientException("The specified topic is blank", null); } if (!regularExpressionMatcher(topic, PATTERN)) { throw new MQClientException(String.format( "The specified topic[%s] contains illegal cha...
@Test public void testCheckTopic_HasIllegalCharacters() { String illegalTopic = "TOPIC&*^"; try { Validators.checkTopic(illegalTopic); failBecauseExceptionWasNotThrown(MQClientException.class); } catch (MQClientException e) { assertThat(e).hasMessageStartingWith(String.format("The specified topic[%s] contains illegal c...
public static void checkTopic(String topic) throws MQClientException { if (UtilAll.isBlank(topic)) { throw new MQClientException("The specified topic is blank", null); } if (!regularExpressionMatcher(topic, PATTERN)) { throw new MQClientException(String.format( "The specified topic[%s] contains illegal characters, allo...
Validators { public static void checkTopic(String topic) throws MQClientException { if (UtilAll.isBlank(topic)) { throw new MQClientException("The specified topic is blank", null); } if (!regularExpressionMatcher(topic, PATTERN)) { throw new MQClientException(String.format( "The specified topic[%s] contains illegal cha...
Validators { public static void checkTopic(String topic) throws MQClientException { if (UtilAll.isBlank(topic)) { throw new MQClientException("The specified topic is blank", null); } if (!regularExpressionMatcher(topic, PATTERN)) { throw new MQClientException(String.format( "The specified topic[%s] contains illegal cha...
Validators { public static void checkTopic(String topic) throws MQClientException { if (UtilAll.isBlank(topic)) { throw new MQClientException("The specified topic is blank", null); } if (!regularExpressionMatcher(topic, PATTERN)) { throw new MQClientException(String.format( "The specified topic[%s] contains illegal cha...
Validators { public static void checkTopic(String topic) throws MQClientException { if (UtilAll.isBlank(topic)) { throw new MQClientException("The specified topic is blank", null); } if (!regularExpressionMatcher(topic, PATTERN)) { throw new MQClientException(String.format( "The specified topic[%s] contains illegal cha...
@Test public void testCheckTopic_UseDefaultTopic() { String defaultTopic = MixAll.DEFAULT_TOPIC; try { Validators.checkTopic(defaultTopic); failBecauseExceptionWasNotThrown(MQClientException.class); } catch (MQClientException e) { assertThat(e).hasMessageStartingWith(String.format("The topic[%s] is conflict with defaul...
public static void checkTopic(String topic) throws MQClientException { if (UtilAll.isBlank(topic)) { throw new MQClientException("The specified topic is blank", null); } if (!regularExpressionMatcher(topic, PATTERN)) { throw new MQClientException(String.format( "The specified topic[%s] contains illegal characters, allo...
Validators { public static void checkTopic(String topic) throws MQClientException { if (UtilAll.isBlank(topic)) { throw new MQClientException("The specified topic is blank", null); } if (!regularExpressionMatcher(topic, PATTERN)) { throw new MQClientException(String.format( "The specified topic[%s] contains illegal cha...
Validators { public static void checkTopic(String topic) throws MQClientException { if (UtilAll.isBlank(topic)) { throw new MQClientException("The specified topic is blank", null); } if (!regularExpressionMatcher(topic, PATTERN)) { throw new MQClientException(String.format( "The specified topic[%s] contains illegal cha...
Validators { public static void checkTopic(String topic) throws MQClientException { if (UtilAll.isBlank(topic)) { throw new MQClientException("The specified topic is blank", null); } if (!regularExpressionMatcher(topic, PATTERN)) { throw new MQClientException(String.format( "The specified topic[%s] contains illegal cha...
Validators { public static void checkTopic(String topic) throws MQClientException { if (UtilAll.isBlank(topic)) { throw new MQClientException("The specified topic is blank", null); } if (!regularExpressionMatcher(topic, PATTERN)) { throw new MQClientException(String.format( "The specified topic[%s] contains illegal cha...
@Test public void testCheckTopic_BlankTopic() { String blankTopic = ""; try { Validators.checkTopic(blankTopic); failBecauseExceptionWasNotThrown(MQClientException.class); } catch (MQClientException e) { assertThat(e).hasMessageStartingWith("The specified topic is blank"); } }
public static void checkTopic(String topic) throws MQClientException { if (UtilAll.isBlank(topic)) { throw new MQClientException("The specified topic is blank", null); } if (!regularExpressionMatcher(topic, PATTERN)) { throw new MQClientException(String.format( "The specified topic[%s] contains illegal characters, allo...
Validators { public static void checkTopic(String topic) throws MQClientException { if (UtilAll.isBlank(topic)) { throw new MQClientException("The specified topic is blank", null); } if (!regularExpressionMatcher(topic, PATTERN)) { throw new MQClientException(String.format( "The specified topic[%s] contains illegal cha...
Validators { public static void checkTopic(String topic) throws MQClientException { if (UtilAll.isBlank(topic)) { throw new MQClientException("The specified topic is blank", null); } if (!regularExpressionMatcher(topic, PATTERN)) { throw new MQClientException(String.format( "The specified topic[%s] contains illegal cha...
Validators { public static void checkTopic(String topic) throws MQClientException { if (UtilAll.isBlank(topic)) { throw new MQClientException("The specified topic is blank", null); } if (!regularExpressionMatcher(topic, PATTERN)) { throw new MQClientException(String.format( "The specified topic[%s] contains illegal cha...
Validators { public static void checkTopic(String topic) throws MQClientException { if (UtilAll.isBlank(topic)) { throw new MQClientException("The specified topic is blank", null); } if (!regularExpressionMatcher(topic, PATTERN)) { throw new MQClientException(String.format( "The specified topic[%s] contains illegal cha...
@Test public void testCheckTopic_TooLongTopic() { String tooLongTopic = StringUtils.rightPad("TooLongTopic", Validators.CHARACTER_MAX_LENGTH + 1, "_"); assertThat(tooLongTopic.length()).isGreaterThan(Validators.CHARACTER_MAX_LENGTH); try { Validators.checkTopic(tooLongTopic); failBecauseExceptionWasNotThrown(MQClientEx...
public static void checkTopic(String topic) throws MQClientException { if (UtilAll.isBlank(topic)) { throw new MQClientException("The specified topic is blank", null); } if (!regularExpressionMatcher(topic, PATTERN)) { throw new MQClientException(String.format( "The specified topic[%s] contains illegal characters, allo...
Validators { public static void checkTopic(String topic) throws MQClientException { if (UtilAll.isBlank(topic)) { throw new MQClientException("The specified topic is blank", null); } if (!regularExpressionMatcher(topic, PATTERN)) { throw new MQClientException(String.format( "The specified topic[%s] contains illegal cha...
Validators { public static void checkTopic(String topic) throws MQClientException { if (UtilAll.isBlank(topic)) { throw new MQClientException("The specified topic is blank", null); } if (!regularExpressionMatcher(topic, PATTERN)) { throw new MQClientException(String.format( "The specified topic[%s] contains illegal cha...
Validators { public static void checkTopic(String topic) throws MQClientException { if (UtilAll.isBlank(topic)) { throw new MQClientException("The specified topic is blank", null); } if (!regularExpressionMatcher(topic, PATTERN)) { throw new MQClientException(String.format( "The specified topic[%s] contains illegal cha...
Validators { public static void checkTopic(String topic) throws MQClientException { if (UtilAll.isBlank(topic)) { throw new MQClientException("The specified topic is blank", null); } if (!regularExpressionMatcher(topic, PATTERN)) { throw new MQClientException(String.format( "The specified topic[%s] contains illegal cha...
@Test public void testSendMessageOneWay_Success() throws RemotingException, InterruptedException, MQBrokerException { doNothing().when(remotingClient).invokeOneway(anyString(), any(RemotingCommand.class), anyLong()); SendResult sendResult = mqClientAPI.sendMessage(brokerAddr, brokerName, msg, new SendMessageRequestHead...
public SendResult sendMessage( final String addr, final String brokerName, final Message msg, final SendMessageRequestHeader requestHeader, final long timeoutMillis, final CommunicationMode communicationMode, final SendMessageContext context, final DefaultMQProducerImpl producer ) throws RemotingException, MQBrokerExce...
MQClientAPIImpl { public SendResult sendMessage( final String addr, final String brokerName, final Message msg, final SendMessageRequestHeader requestHeader, final long timeoutMillis, final CommunicationMode communicationMode, final SendMessageContext context, final DefaultMQProducerImpl producer ) throws RemotingExcep...
MQClientAPIImpl { public SendResult sendMessage( final String addr, final String brokerName, final Message msg, final SendMessageRequestHeader requestHeader, final long timeoutMillis, final CommunicationMode communicationMode, final SendMessageContext context, final DefaultMQProducerImpl producer ) throws RemotingExcep...
MQClientAPIImpl { public SendResult sendMessage( final String addr, final String brokerName, final Message msg, final SendMessageRequestHeader requestHeader, final long timeoutMillis, final CommunicationMode communicationMode, final SendMessageContext context, final DefaultMQProducerImpl producer ) throws RemotingExcep...
MQClientAPIImpl { public SendResult sendMessage( final String addr, final String brokerName, final Message msg, final SendMessageRequestHeader requestHeader, final long timeoutMillis, final CommunicationMode communicationMode, final SendMessageContext context, final DefaultMQProducerImpl producer ) throws RemotingExcep...
@Test public void testSendMessageOneWay_WithException() throws RemotingException, InterruptedException, MQBrokerException { doThrow(new RemotingTimeoutException("Remoting Exception in Test")).when(remotingClient).invokeOneway(anyString(), any(RemotingCommand.class), anyLong()); try { mqClientAPI.sendMessage(brokerAddr,...
public SendResult sendMessage( final String addr, final String brokerName, final Message msg, final SendMessageRequestHeader requestHeader, final long timeoutMillis, final CommunicationMode communicationMode, final SendMessageContext context, final DefaultMQProducerImpl producer ) throws RemotingException, MQBrokerExce...
MQClientAPIImpl { public SendResult sendMessage( final String addr, final String brokerName, final Message msg, final SendMessageRequestHeader requestHeader, final long timeoutMillis, final CommunicationMode communicationMode, final SendMessageContext context, final DefaultMQProducerImpl producer ) throws RemotingExcep...
MQClientAPIImpl { public SendResult sendMessage( final String addr, final String brokerName, final Message msg, final SendMessageRequestHeader requestHeader, final long timeoutMillis, final CommunicationMode communicationMode, final SendMessageContext context, final DefaultMQProducerImpl producer ) throws RemotingExcep...
MQClientAPIImpl { public SendResult sendMessage( final String addr, final String brokerName, final Message msg, final SendMessageRequestHeader requestHeader, final long timeoutMillis, final CommunicationMode communicationMode, final SendMessageContext context, final DefaultMQProducerImpl producer ) throws RemotingExcep...
MQClientAPIImpl { public SendResult sendMessage( final String addr, final String brokerName, final Message msg, final SendMessageRequestHeader requestHeader, final long timeoutMillis, final CommunicationMode communicationMode, final SendMessageContext context, final DefaultMQProducerImpl producer ) throws RemotingExcep...
@Test public void testSendMessageSync_Success() throws InterruptedException, RemotingException, MQBrokerException { doAnswer(new Answer() { @Override public Object answer(InvocationOnMock mock) throws Throwable { RemotingCommand request = mock.getArgument(1); return createSuccessResponse(request); } }).when(remotingCli...
public SendResult sendMessage( final String addr, final String brokerName, final Message msg, final SendMessageRequestHeader requestHeader, final long timeoutMillis, final CommunicationMode communicationMode, final SendMessageContext context, final DefaultMQProducerImpl producer ) throws RemotingException, MQBrokerExce...
MQClientAPIImpl { public SendResult sendMessage( final String addr, final String brokerName, final Message msg, final SendMessageRequestHeader requestHeader, final long timeoutMillis, final CommunicationMode communicationMode, final SendMessageContext context, final DefaultMQProducerImpl producer ) throws RemotingExcep...
MQClientAPIImpl { public SendResult sendMessage( final String addr, final String brokerName, final Message msg, final SendMessageRequestHeader requestHeader, final long timeoutMillis, final CommunicationMode communicationMode, final SendMessageContext context, final DefaultMQProducerImpl producer ) throws RemotingExcep...
MQClientAPIImpl { public SendResult sendMessage( final String addr, final String brokerName, final Message msg, final SendMessageRequestHeader requestHeader, final long timeoutMillis, final CommunicationMode communicationMode, final SendMessageContext context, final DefaultMQProducerImpl producer ) throws RemotingExcep...
MQClientAPIImpl { public SendResult sendMessage( final String addr, final String brokerName, final Message msg, final SendMessageRequestHeader requestHeader, final long timeoutMillis, final CommunicationMode communicationMode, final SendMessageContext context, final DefaultMQProducerImpl producer ) throws RemotingExcep...
@Test public void testSendMessageSync_WithException() throws InterruptedException, RemotingException, MQBrokerException { doAnswer(new Answer() { @Override public Object answer(InvocationOnMock mock) throws Throwable { RemotingCommand request = mock.getArgument(1); RemotingCommand response = RemotingCommand.createRespo...
public SendResult sendMessage( final String addr, final String brokerName, final Message msg, final SendMessageRequestHeader requestHeader, final long timeoutMillis, final CommunicationMode communicationMode, final SendMessageContext context, final DefaultMQProducerImpl producer ) throws RemotingException, MQBrokerExce...
MQClientAPIImpl { public SendResult sendMessage( final String addr, final String brokerName, final Message msg, final SendMessageRequestHeader requestHeader, final long timeoutMillis, final CommunicationMode communicationMode, final SendMessageContext context, final DefaultMQProducerImpl producer ) throws RemotingExcep...
MQClientAPIImpl { public SendResult sendMessage( final String addr, final String brokerName, final Message msg, final SendMessageRequestHeader requestHeader, final long timeoutMillis, final CommunicationMode communicationMode, final SendMessageContext context, final DefaultMQProducerImpl producer ) throws RemotingExcep...
MQClientAPIImpl { public SendResult sendMessage( final String addr, final String brokerName, final Message msg, final SendMessageRequestHeader requestHeader, final long timeoutMillis, final CommunicationMode communicationMode, final SendMessageContext context, final DefaultMQProducerImpl producer ) throws RemotingExcep...
MQClientAPIImpl { public SendResult sendMessage( final String addr, final String brokerName, final Message msg, final SendMessageRequestHeader requestHeader, final long timeoutMillis, final CommunicationMode communicationMode, final SendMessageContext context, final DefaultMQProducerImpl producer ) throws RemotingExcep...
@Test public void testSendMessageAsync_Success() throws RemotingException, InterruptedException, MQBrokerException { doNothing().when(remotingClient).invokeAsync(anyString(), any(RemotingCommand.class), anyLong(), any(InvokeCallback.class)); SendResult sendResult = mqClientAPI.sendMessage(brokerAddr, brokerName, msg, n...
public SendResult sendMessage( final String addr, final String brokerName, final Message msg, final SendMessageRequestHeader requestHeader, final long timeoutMillis, final CommunicationMode communicationMode, final SendMessageContext context, final DefaultMQProducerImpl producer ) throws RemotingException, MQBrokerExce...
MQClientAPIImpl { public SendResult sendMessage( final String addr, final String brokerName, final Message msg, final SendMessageRequestHeader requestHeader, final long timeoutMillis, final CommunicationMode communicationMode, final SendMessageContext context, final DefaultMQProducerImpl producer ) throws RemotingExcep...
MQClientAPIImpl { public SendResult sendMessage( final String addr, final String brokerName, final Message msg, final SendMessageRequestHeader requestHeader, final long timeoutMillis, final CommunicationMode communicationMode, final SendMessageContext context, final DefaultMQProducerImpl producer ) throws RemotingExcep...
MQClientAPIImpl { public SendResult sendMessage( final String addr, final String brokerName, final Message msg, final SendMessageRequestHeader requestHeader, final long timeoutMillis, final CommunicationMode communicationMode, final SendMessageContext context, final DefaultMQProducerImpl producer ) throws RemotingExcep...
MQClientAPIImpl { public SendResult sendMessage( final String addr, final String brokerName, final Message msg, final SendMessageRequestHeader requestHeader, final long timeoutMillis, final CommunicationMode communicationMode, final SendMessageContext context, final DefaultMQProducerImpl producer ) throws RemotingExcep...
@Test public void testSendMessageAsync_WithException() throws RemotingException, InterruptedException, MQBrokerException { doThrow(new RemotingTimeoutException("Remoting Exception in Test")).when(remotingClient) .invokeAsync(anyString(), any(RemotingCommand.class), anyLong(), any(InvokeCallback.class)); try { mqClientA...
public SendResult sendMessage( final String addr, final String brokerName, final Message msg, final SendMessageRequestHeader requestHeader, final long timeoutMillis, final CommunicationMode communicationMode, final SendMessageContext context, final DefaultMQProducerImpl producer ) throws RemotingException, MQBrokerExce...
MQClientAPIImpl { public SendResult sendMessage( final String addr, final String brokerName, final Message msg, final SendMessageRequestHeader requestHeader, final long timeoutMillis, final CommunicationMode communicationMode, final SendMessageContext context, final DefaultMQProducerImpl producer ) throws RemotingExcep...
MQClientAPIImpl { public SendResult sendMessage( final String addr, final String brokerName, final Message msg, final SendMessageRequestHeader requestHeader, final long timeoutMillis, final CommunicationMode communicationMode, final SendMessageContext context, final DefaultMQProducerImpl producer ) throws RemotingExcep...
MQClientAPIImpl { public SendResult sendMessage( final String addr, final String brokerName, final Message msg, final SendMessageRequestHeader requestHeader, final long timeoutMillis, final CommunicationMode communicationMode, final SendMessageContext context, final DefaultMQProducerImpl producer ) throws RemotingExcep...
MQClientAPIImpl { public SendResult sendMessage( final String addr, final String brokerName, final Message msg, final SendMessageRequestHeader requestHeader, final long timeoutMillis, final CommunicationMode communicationMode, final SendMessageContext context, final DefaultMQProducerImpl producer ) throws RemotingExcep...
@Test public void testTopicRouteData2TopicPublishInfo() { TopicRouteData topicRouteData = new TopicRouteData(); topicRouteData.setFilterServerTable(new HashMap<String, List<String>>()); List<BrokerData> brokerDataList = new ArrayList<BrokerData>(); BrokerData brokerData = new BrokerData(); brokerData.setBrokerName("Bro...
public static TopicPublishInfo topicRouteData2TopicPublishInfo(final String topic, final TopicRouteData route) { TopicPublishInfo info = new TopicPublishInfo(); info.setTopicRouteData(route); if (route.getOrderTopicConf() != null && route.getOrderTopicConf().length() > 0) { String[] brokers = route.getOrderTopicConf()....
MQClientInstance { public static TopicPublishInfo topicRouteData2TopicPublishInfo(final String topic, final TopicRouteData route) { TopicPublishInfo info = new TopicPublishInfo(); info.setTopicRouteData(route); if (route.getOrderTopicConf() != null && route.getOrderTopicConf().length() > 0) { String[] brokers = route.g...
MQClientInstance { public static TopicPublishInfo topicRouteData2TopicPublishInfo(final String topic, final TopicRouteData route) { TopicPublishInfo info = new TopicPublishInfo(); info.setTopicRouteData(route); if (route.getOrderTopicConf() != null && route.getOrderTopicConf().length() > 0) { String[] brokers = route.g...
MQClientInstance { public static TopicPublishInfo topicRouteData2TopicPublishInfo(final String topic, final TopicRouteData route) { TopicPublishInfo info = new TopicPublishInfo(); info.setTopicRouteData(route); if (route.getOrderTopicConf() != null && route.getOrderTopicConf().length() > 0) { String[] brokers = route.g...
MQClientInstance { public static TopicPublishInfo topicRouteData2TopicPublishInfo(final String topic, final TopicRouteData route) { TopicPublishInfo info = new TopicPublishInfo(); info.setTopicRouteData(route); if (route.getOrderTopicConf() != null && route.getOrderTopicConf().length() > 0) { String[] brokers = route.g...
@Test public void testRegisterProducer() { boolean flag = mqClientInstance.registerProducer(group, mock(DefaultMQProducerImpl.class)); assertThat(flag).isTrue(); flag = mqClientInstance.registerProducer(group, mock(DefaultMQProducerImpl.class)); assertThat(flag).isFalse(); mqClientInstance.unregisterProducer(group); fl...
public boolean registerProducer(final String group, final DefaultMQProducerImpl producer) { if (null == group || null == producer) { return false; } MQProducerInner prev = this.producerTable.putIfAbsent(group, producer); if (prev != null) { log.warn("the producer group[{}] exist already.", group); return false; } retur...
MQClientInstance { public boolean registerProducer(final String group, final DefaultMQProducerImpl producer) { if (null == group || null == producer) { return false; } MQProducerInner prev = this.producerTable.putIfAbsent(group, producer); if (prev != null) { log.warn("the producer group[{}] exist already.", group); re...
MQClientInstance { public boolean registerProducer(final String group, final DefaultMQProducerImpl producer) { if (null == group || null == producer) { return false; } MQProducerInner prev = this.producerTable.putIfAbsent(group, producer); if (prev != null) { log.warn("the producer group[{}] exist already.", group); re...
MQClientInstance { public boolean registerProducer(final String group, final DefaultMQProducerImpl producer) { if (null == group || null == producer) { return false; } MQProducerInner prev = this.producerTable.putIfAbsent(group, producer); if (prev != null) { log.warn("the producer group[{}] exist already.", group); re...
MQClientInstance { public boolean registerProducer(final String group, final DefaultMQProducerImpl producer) { if (null == group || null == producer) { return false; } MQProducerInner prev = this.producerTable.putIfAbsent(group, producer); if (prev != null) { log.warn("the producer group[{}] exist already.", group); re...
@Test public void testRegisterConsumer() throws RemotingException, InterruptedException, MQBrokerException { boolean flag = mqClientInstance.registerConsumer(group, mock(MQConsumerInner.class)); assertThat(flag).isTrue(); flag = mqClientInstance.registerConsumer(group, mock(MQConsumerInner.class)); assertThat(flag).isF...
public boolean registerConsumer(final String group, final MQConsumerInner consumer) { if (null == group || null == consumer) { return false; } MQConsumerInner prev = this.consumerTable.putIfAbsent(group, consumer); if (prev != null) { log.warn("the consumer group[" + group + "] exist already."); return false; } return ...
MQClientInstance { public boolean registerConsumer(final String group, final MQConsumerInner consumer) { if (null == group || null == consumer) { return false; } MQConsumerInner prev = this.consumerTable.putIfAbsent(group, consumer); if (prev != null) { log.warn("the consumer group[" + group + "] exist already."); retu...
MQClientInstance { public boolean registerConsumer(final String group, final MQConsumerInner consumer) { if (null == group || null == consumer) { return false; } MQConsumerInner prev = this.consumerTable.putIfAbsent(group, consumer); if (prev != null) { log.warn("the consumer group[" + group + "] exist already."); retu...
MQClientInstance { public boolean registerConsumer(final String group, final MQConsumerInner consumer) { if (null == group || null == consumer) { return false; } MQConsumerInner prev = this.consumerTable.putIfAbsent(group, consumer); if (prev != null) { log.warn("the consumer group[" + group + "] exist already."); retu...
MQClientInstance { public boolean registerConsumer(final String group, final MQConsumerInner consumer) { if (null == group || null == consumer) { return false; } MQConsumerInner prev = this.consumerTable.putIfAbsent(group, consumer); if (prev != null) { log.warn("the consumer group[" + group + "] exist already."); retu...
@Test public void testRegisterAdminExt() { boolean flag = mqClientInstance.registerAdminExt(group, mock(MQAdminExtInner.class)); assertThat(flag).isTrue(); flag = mqClientInstance.registerAdminExt(group, mock(MQAdminExtInner.class)); assertThat(flag).isFalse(); mqClientInstance.unregisterAdminExt(group); flag = mqClien...
public boolean registerAdminExt(final String group, final MQAdminExtInner admin) { if (null == group || null == admin) { return false; } MQAdminExtInner prev = this.adminExtTable.putIfAbsent(group, admin); if (prev != null) { log.warn("the admin group[{}] exist already.", group); return false; } return true; }
MQClientInstance { public boolean registerAdminExt(final String group, final MQAdminExtInner admin) { if (null == group || null == admin) { return false; } MQAdminExtInner prev = this.adminExtTable.putIfAbsent(group, admin); if (prev != null) { log.warn("the admin group[{}] exist already.", group); return false; } retu...
MQClientInstance { public boolean registerAdminExt(final String group, final MQAdminExtInner admin) { if (null == group || null == admin) { return false; } MQAdminExtInner prev = this.adminExtTable.putIfAbsent(group, admin); if (prev != null) { log.warn("the admin group[{}] exist already.", group); return false; } retu...
MQClientInstance { public boolean registerAdminExt(final String group, final MQAdminExtInner admin) { if (null == group || null == admin) { return false; } MQAdminExtInner prev = this.adminExtTable.putIfAbsent(group, admin); if (prev != null) { log.warn("the admin group[{}] exist already.", group); return false; } retu...
MQClientInstance { public boolean registerAdminExt(final String group, final MQAdminExtInner admin) { if (null == group || null == admin) { return false; } MQAdminExtInner prev = this.adminExtTable.putIfAbsent(group, admin); if (prev != null) { log.warn("the admin group[{}] exist already.", group); return false; } retu...
@Test public void testMarkProtocolType_JSONProtocolType() { int source = 261; SerializeType type = SerializeType.JSON; byte[] result = RemotingCommand.markProtocolType(source, type); assertThat(result).isEqualTo(new byte[]{0, 0, 1, 5}); }
public static byte[] markProtocolType(int source, SerializeType type) { byte[] result = new byte[4]; result[0] = type.getCode(); result[1] = (byte) ((source >> 16) & 0xFF); result[2] = (byte) ((source >> 8) & 0xFF); result[3] = (byte) (source & 0xFF); return result; }
RemotingCommand { public static byte[] markProtocolType(int source, SerializeType type) { byte[] result = new byte[4]; result[0] = type.getCode(); result[1] = (byte) ((source >> 16) & 0xFF); result[2] = (byte) ((source >> 8) & 0xFF); result[3] = (byte) (source & 0xFF); return result; } }
RemotingCommand { public static byte[] markProtocolType(int source, SerializeType type) { byte[] result = new byte[4]; result[0] = type.getCode(); result[1] = (byte) ((source >> 16) & 0xFF); result[2] = (byte) ((source >> 8) & 0xFF); result[3] = (byte) (source & 0xFF); return result; } protected RemotingCommand(); }
RemotingCommand { public static byte[] markProtocolType(int source, SerializeType type) { byte[] result = new byte[4]; result[0] = type.getCode(); result[1] = (byte) ((source >> 16) & 0xFF); result[2] = (byte) ((source >> 8) & 0xFF); result[3] = (byte) (source & 0xFF); return result; } protected RemotingCommand(); sta...
RemotingCommand { public static byte[] markProtocolType(int source, SerializeType type) { byte[] result = new byte[4]; result[0] = type.getCode(); result[1] = (byte) ((source >> 16) & 0xFF); result[2] = (byte) ((source >> 8) & 0xFF); result[3] = (byte) (source & 0xFF); return result; } protected RemotingCommand(); sta...
@Test public void testMarkProtocolType_ROCKETMQProtocolType() { int source = 16777215; SerializeType type = SerializeType.ROCKETMQ; byte[] result = RemotingCommand.markProtocolType(source, type); assertThat(result).isEqualTo(new byte[]{1, -1, -1, -1}); }
public static byte[] markProtocolType(int source, SerializeType type) { byte[] result = new byte[4]; result[0] = type.getCode(); result[1] = (byte) ((source >> 16) & 0xFF); result[2] = (byte) ((source >> 8) & 0xFF); result[3] = (byte) (source & 0xFF); return result; }
RemotingCommand { public static byte[] markProtocolType(int source, SerializeType type) { byte[] result = new byte[4]; result[0] = type.getCode(); result[1] = (byte) ((source >> 16) & 0xFF); result[2] = (byte) ((source >> 8) & 0xFF); result[3] = (byte) (source & 0xFF); return result; } }
RemotingCommand { public static byte[] markProtocolType(int source, SerializeType type) { byte[] result = new byte[4]; result[0] = type.getCode(); result[1] = (byte) ((source >> 16) & 0xFF); result[2] = (byte) ((source >> 8) & 0xFF); result[3] = (byte) (source & 0xFF); return result; } protected RemotingCommand(); }
RemotingCommand { public static byte[] markProtocolType(int source, SerializeType type) { byte[] result = new byte[4]; result[0] = type.getCode(); result[1] = (byte) ((source >> 16) & 0xFF); result[2] = (byte) ((source >> 8) & 0xFF); result[3] = (byte) (source & 0xFF); return result; } protected RemotingCommand(); sta...
RemotingCommand { public static byte[] markProtocolType(int source, SerializeType type) { byte[] result = new byte[4]; result[0] = type.getCode(); result[1] = (byte) ((source >> 16) & 0xFF); result[2] = (byte) ((source >> 8) & 0xFF); result[3] = (byte) (source & 0xFF); return result; } protected RemotingCommand(); sta...
@Test public void testCreateResponseCommand_FailToCreateCommand() { System.setProperty(RemotingCommand.REMOTING_VERSION_KEY, "2333"); int code = RemotingSysResponseCode.SUCCESS; String remark = "Sample remark"; RemotingCommand cmd = RemotingCommand.createResponseCommand(code ,remark, CommandCustomHeader.class); assertT...
public static RemotingCommand createResponseCommand(Class<? extends CommandCustomHeader> classHeader) { return createResponseCommand(RemotingSysResponseCode.SYSTEM_ERROR, "not set any response code", classHeader); }
RemotingCommand { public static RemotingCommand createResponseCommand(Class<? extends CommandCustomHeader> classHeader) { return createResponseCommand(RemotingSysResponseCode.SYSTEM_ERROR, "not set any response code", classHeader); } }
RemotingCommand { public static RemotingCommand createResponseCommand(Class<? extends CommandCustomHeader> classHeader) { return createResponseCommand(RemotingSysResponseCode.SYSTEM_ERROR, "not set any response code", classHeader); } protected RemotingCommand(); }
RemotingCommand { public static RemotingCommand createResponseCommand(Class<? extends CommandCustomHeader> classHeader) { return createResponseCommand(RemotingSysResponseCode.SYSTEM_ERROR, "not set any response code", classHeader); } protected RemotingCommand(); static RemotingCommand createRequestCommand(int code, Co...
RemotingCommand { public static RemotingCommand createResponseCommand(Class<? extends CommandCustomHeader> classHeader) { return createResponseCommand(RemotingSysResponseCode.SYSTEM_ERROR, "not set any response code", classHeader); } protected RemotingCommand(); static RemotingCommand createRequestCommand(int code, Co...
@Test public void testGetAllClusterInfo() { byte[] clusterInfo = routeInfoManager.getAllClusterInfo(); assertThat(clusterInfo).isNotNull(); }
public byte[] getAllClusterInfo() { ClusterInfo clusterInfoSerializeWrapper = new ClusterInfo(); clusterInfoSerializeWrapper.setBrokerAddrTable(this.brokerAddrTable); clusterInfoSerializeWrapper.setClusterAddrTable(this.clusterAddrTable); return clusterInfoSerializeWrapper.encode(); }
RouteInfoManager { public byte[] getAllClusterInfo() { ClusterInfo clusterInfoSerializeWrapper = new ClusterInfo(); clusterInfoSerializeWrapper.setBrokerAddrTable(this.brokerAddrTable); clusterInfoSerializeWrapper.setClusterAddrTable(this.clusterAddrTable); return clusterInfoSerializeWrapper.encode(); } }
RouteInfoManager { public byte[] getAllClusterInfo() { ClusterInfo clusterInfoSerializeWrapper = new ClusterInfo(); clusterInfoSerializeWrapper.setBrokerAddrTable(this.brokerAddrTable); clusterInfoSerializeWrapper.setClusterAddrTable(this.clusterAddrTable); return clusterInfoSerializeWrapper.encode(); } RouteInfoManage...
RouteInfoManager { public byte[] getAllClusterInfo() { ClusterInfo clusterInfoSerializeWrapper = new ClusterInfo(); clusterInfoSerializeWrapper.setBrokerAddrTable(this.brokerAddrTable); clusterInfoSerializeWrapper.setClusterAddrTable(this.clusterAddrTable); return clusterInfoSerializeWrapper.encode(); } RouteInfoManage...
RouteInfoManager { public byte[] getAllClusterInfo() { ClusterInfo clusterInfoSerializeWrapper = new ClusterInfo(); clusterInfoSerializeWrapper.setBrokerAddrTable(this.brokerAddrTable); clusterInfoSerializeWrapper.setClusterAddrTable(this.clusterAddrTable); return clusterInfoSerializeWrapper.encode(); } RouteInfoManage...
@Test public void testGetAllTopicList() { byte[] topicInfo = routeInfoManager.getAllTopicList(); Assert.assertTrue(topicInfo != null); assertThat(topicInfo).isNotNull(); }
public byte[] getAllTopicList() { TopicList topicList = new TopicList(); try { try { this.lock.readLock().lockInterruptibly(); topicList.getTopicList().addAll(this.topicQueueTable.keySet()); } finally { this.lock.readLock().unlock(); } } catch (Exception e) { log.error("getAllTopicList Exception", e); } return topicLis...
RouteInfoManager { public byte[] getAllTopicList() { TopicList topicList = new TopicList(); try { try { this.lock.readLock().lockInterruptibly(); topicList.getTopicList().addAll(this.topicQueueTable.keySet()); } finally { this.lock.readLock().unlock(); } } catch (Exception e) { log.error("getAllTopicList Exception", e)...
RouteInfoManager { public byte[] getAllTopicList() { TopicList topicList = new TopicList(); try { try { this.lock.readLock().lockInterruptibly(); topicList.getTopicList().addAll(this.topicQueueTable.keySet()); } finally { this.lock.readLock().unlock(); } } catch (Exception e) { log.error("getAllTopicList Exception", e)...
RouteInfoManager { public byte[] getAllTopicList() { TopicList topicList = new TopicList(); try { try { this.lock.readLock().lockInterruptibly(); topicList.getTopicList().addAll(this.topicQueueTable.keySet()); } finally { this.lock.readLock().unlock(); } } catch (Exception e) { log.error("getAllTopicList Exception", e)...
RouteInfoManager { public byte[] getAllTopicList() { TopicList topicList = new TopicList(); try { try { this.lock.readLock().lockInterruptibly(); topicList.getTopicList().addAll(this.topicQueueTable.keySet()); } finally { this.lock.readLock().unlock(); } } catch (Exception e) { log.error("getAllTopicList Exception", e)...
@Test public void testRegisterBroker() { TopicConfigSerializeWrapper topicConfigSerializeWrapper = new TopicConfigSerializeWrapper(); ConcurrentHashMap<String, TopicConfig> topicConfigConcurrentHashMap = new ConcurrentHashMap<>(); TopicConfig topicConfig = new TopicConfig(); topicConfig.setWriteQueueNums(8); topicConfi...
public RegisterBrokerResult registerBroker( final String clusterName, final String brokerAddr, final String brokerName, final long brokerId, final String haServerAddr, final TopicConfigSerializeWrapper topicConfigWrapper, final List<String> filterServerList, final Channel channel) { RegisterBrokerResult result = new Re...
RouteInfoManager { public RegisterBrokerResult registerBroker( final String clusterName, final String brokerAddr, final String brokerName, final long brokerId, final String haServerAddr, final TopicConfigSerializeWrapper topicConfigWrapper, final List<String> filterServerList, final Channel channel) { RegisterBrokerRes...
RouteInfoManager { public RegisterBrokerResult registerBroker( final String clusterName, final String brokerAddr, final String brokerName, final long brokerId, final String haServerAddr, final TopicConfigSerializeWrapper topicConfigWrapper, final List<String> filterServerList, final Channel channel) { RegisterBrokerRes...
RouteInfoManager { public RegisterBrokerResult registerBroker( final String clusterName, final String brokerAddr, final String brokerName, final long brokerId, final String haServerAddr, final TopicConfigSerializeWrapper topicConfigWrapper, final List<String> filterServerList, final Channel channel) { RegisterBrokerRes...
RouteInfoManager { public RegisterBrokerResult registerBroker( final String clusterName, final String brokerAddr, final String brokerName, final long brokerId, final String haServerAddr, final TopicConfigSerializeWrapper topicConfigWrapper, final List<String> filterServerList, final Channel channel) { RegisterBrokerRes...
@Test public void testWipeWritePermOfBrokerByLock() { int result = routeInfoManager.wipeWritePermOfBrokerByLock("default-broker"); assertThat(result).isEqualTo(0); }
public int wipeWritePermOfBrokerByLock(final String brokerName) { try { try { this.lock.writeLock().lockInterruptibly(); return wipeWritePermOfBroker(brokerName); } finally { this.lock.writeLock().unlock(); } } catch (Exception e) { log.error("wipeWritePermOfBrokerByLock Exception", e); } return 0; }
RouteInfoManager { public int wipeWritePermOfBrokerByLock(final String brokerName) { try { try { this.lock.writeLock().lockInterruptibly(); return wipeWritePermOfBroker(brokerName); } finally { this.lock.writeLock().unlock(); } } catch (Exception e) { log.error("wipeWritePermOfBrokerByLock Exception", e); } return 0; }...
RouteInfoManager { public int wipeWritePermOfBrokerByLock(final String brokerName) { try { try { this.lock.writeLock().lockInterruptibly(); return wipeWritePermOfBroker(brokerName); } finally { this.lock.writeLock().unlock(); } } catch (Exception e) { log.error("wipeWritePermOfBrokerByLock Exception", e); } return 0; }...
RouteInfoManager { public int wipeWritePermOfBrokerByLock(final String brokerName) { try { try { this.lock.writeLock().lockInterruptibly(); return wipeWritePermOfBroker(brokerName); } finally { this.lock.writeLock().unlock(); } } catch (Exception e) { log.error("wipeWritePermOfBrokerByLock Exception", e); } return 0; }...
RouteInfoManager { public int wipeWritePermOfBrokerByLock(final String brokerName) { try { try { this.lock.writeLock().lockInterruptibly(); return wipeWritePermOfBroker(brokerName); } finally { this.lock.writeLock().unlock(); } } catch (Exception e) { log.error("wipeWritePermOfBrokerByLock Exception", e); } return 0; }...
@Test public void testPickupTopicRouteData() { TopicRouteData result = routeInfoManager.pickupTopicRouteData("unit_test"); assertThat(result).isNull(); }
public TopicRouteData pickupTopicRouteData(final String topic) { TopicRouteData topicRouteData = new TopicRouteData(); boolean foundQueueData = false; boolean foundBrokerData = false; Set<String> brokerNameSet = new HashSet<String>(); List<BrokerData> brokerDataList = new LinkedList<BrokerData>(); topicRouteData.setBro...
RouteInfoManager { public TopicRouteData pickupTopicRouteData(final String topic) { TopicRouteData topicRouteData = new TopicRouteData(); boolean foundQueueData = false; boolean foundBrokerData = false; Set<String> brokerNameSet = new HashSet<String>(); List<BrokerData> brokerDataList = new LinkedList<BrokerData>(); to...
RouteInfoManager { public TopicRouteData pickupTopicRouteData(final String topic) { TopicRouteData topicRouteData = new TopicRouteData(); boolean foundQueueData = false; boolean foundBrokerData = false; Set<String> brokerNameSet = new HashSet<String>(); List<BrokerData> brokerDataList = new LinkedList<BrokerData>(); to...
RouteInfoManager { public TopicRouteData pickupTopicRouteData(final String topic) { TopicRouteData topicRouteData = new TopicRouteData(); boolean foundQueueData = false; boolean foundBrokerData = false; Set<String> brokerNameSet = new HashSet<String>(); List<BrokerData> brokerDataList = new LinkedList<BrokerData>(); to...
RouteInfoManager { public TopicRouteData pickupTopicRouteData(final String topic) { TopicRouteData topicRouteData = new TopicRouteData(); boolean foundQueueData = false; boolean foundBrokerData = false; Set<String> brokerNameSet = new HashSet<String>(); List<BrokerData> brokerDataList = new LinkedList<BrokerData>(); to...
@Test public void testGetSystemTopicList() { byte[] topicList = routeInfoManager.getSystemTopicList(); assertThat(topicList).isNotNull(); }
public byte[] getSystemTopicList() { TopicList topicList = new TopicList(); try { try { this.lock.readLock().lockInterruptibly(); for (Map.Entry<String, Set<String>> entry : clusterAddrTable.entrySet()) { topicList.getTopicList().add(entry.getKey()); topicList.getTopicList().addAll(entry.getValue()); } if (brokerAddrTa...
RouteInfoManager { public byte[] getSystemTopicList() { TopicList topicList = new TopicList(); try { try { this.lock.readLock().lockInterruptibly(); for (Map.Entry<String, Set<String>> entry : clusterAddrTable.entrySet()) { topicList.getTopicList().add(entry.getKey()); topicList.getTopicList().addAll(entry.getValue());...
RouteInfoManager { public byte[] getSystemTopicList() { TopicList topicList = new TopicList(); try { try { this.lock.readLock().lockInterruptibly(); for (Map.Entry<String, Set<String>> entry : clusterAddrTable.entrySet()) { topicList.getTopicList().add(entry.getKey()); topicList.getTopicList().addAll(entry.getValue());...
RouteInfoManager { public byte[] getSystemTopicList() { TopicList topicList = new TopicList(); try { try { this.lock.readLock().lockInterruptibly(); for (Map.Entry<String, Set<String>> entry : clusterAddrTable.entrySet()) { topicList.getTopicList().add(entry.getKey()); topicList.getTopicList().addAll(entry.getValue());...
RouteInfoManager { public byte[] getSystemTopicList() { TopicList topicList = new TopicList(); try { try { this.lock.readLock().lockInterruptibly(); for (Map.Entry<String, Set<String>> entry : clusterAddrTable.entrySet()) { topicList.getTopicList().add(entry.getKey()); topicList.getTopicList().addAll(entry.getValue());...
@Test public void testGetTopicsByCluster() { byte[] topicList = routeInfoManager.getTopicsByCluster("default-cluster"); assertThat(topicList).isNotNull(); }
public byte[] getTopicsByCluster(String cluster) { TopicList topicList = new TopicList(); try { try { this.lock.readLock().lockInterruptibly(); Set<String> brokerNameSet = this.clusterAddrTable.get(cluster); for (String brokerName : brokerNameSet) { Iterator<Entry<String, List<QueueData>>> topicTableIt = this.topicQueu...
RouteInfoManager { public byte[] getTopicsByCluster(String cluster) { TopicList topicList = new TopicList(); try { try { this.lock.readLock().lockInterruptibly(); Set<String> brokerNameSet = this.clusterAddrTable.get(cluster); for (String brokerName : brokerNameSet) { Iterator<Entry<String, List<QueueData>>> topicTable...
RouteInfoManager { public byte[] getTopicsByCluster(String cluster) { TopicList topicList = new TopicList(); try { try { this.lock.readLock().lockInterruptibly(); Set<String> brokerNameSet = this.clusterAddrTable.get(cluster); for (String brokerName : brokerNameSet) { Iterator<Entry<String, List<QueueData>>> topicTable...
RouteInfoManager { public byte[] getTopicsByCluster(String cluster) { TopicList topicList = new TopicList(); try { try { this.lock.readLock().lockInterruptibly(); Set<String> brokerNameSet = this.clusterAddrTable.get(cluster); for (String brokerName : brokerNameSet) { Iterator<Entry<String, List<QueueData>>> topicTable...
RouteInfoManager { public byte[] getTopicsByCluster(String cluster) { TopicList topicList = new TopicList(); try { try { this.lock.readLock().lockInterruptibly(); Set<String> brokerNameSet = this.clusterAddrTable.get(cluster); for (String brokerName : brokerNameSet) { Iterator<Entry<String, List<QueueData>>> topicTable...
@Test public void testGetUnitTopics() { byte[] topicList = routeInfoManager.getUnitTopics(); assertThat(topicList).isNotNull(); }
public byte[] getUnitTopics() { TopicList topicList = new TopicList(); try { try { this.lock.readLock().lockInterruptibly(); Iterator<Entry<String, List<QueueData>>> topicTableIt = this.topicQueueTable.entrySet().iterator(); while (topicTableIt.hasNext()) { Entry<String, List<QueueData>> topicEntry = topicTableIt.next(...
RouteInfoManager { public byte[] getUnitTopics() { TopicList topicList = new TopicList(); try { try { this.lock.readLock().lockInterruptibly(); Iterator<Entry<String, List<QueueData>>> topicTableIt = this.topicQueueTable.entrySet().iterator(); while (topicTableIt.hasNext()) { Entry<String, List<QueueData>> topicEntry =...
RouteInfoManager { public byte[] getUnitTopics() { TopicList topicList = new TopicList(); try { try { this.lock.readLock().lockInterruptibly(); Iterator<Entry<String, List<QueueData>>> topicTableIt = this.topicQueueTable.entrySet().iterator(); while (topicTableIt.hasNext()) { Entry<String, List<QueueData>> topicEntry =...
RouteInfoManager { public byte[] getUnitTopics() { TopicList topicList = new TopicList(); try { try { this.lock.readLock().lockInterruptibly(); Iterator<Entry<String, List<QueueData>>> topicTableIt = this.topicQueueTable.entrySet().iterator(); while (topicTableIt.hasNext()) { Entry<String, List<QueueData>> topicEntry =...
RouteInfoManager { public byte[] getUnitTopics() { TopicList topicList = new TopicList(); try { try { this.lock.readLock().lockInterruptibly(); Iterator<Entry<String, List<QueueData>>> topicTableIt = this.topicQueueTable.entrySet().iterator(); while (topicTableIt.hasNext()) { Entry<String, List<QueueData>> topicEntry =...
@Test public void testGetHasUnitSubTopicList() { byte[] topicList = routeInfoManager.getHasUnitSubTopicList(); assertThat(topicList).isNotNull(); }
public byte[] getHasUnitSubTopicList() { TopicList topicList = new TopicList(); try { try { this.lock.readLock().lockInterruptibly(); Iterator<Entry<String, List<QueueData>>> topicTableIt = this.topicQueueTable.entrySet().iterator(); while (topicTableIt.hasNext()) { Entry<String, List<QueueData>> topicEntry = topicTabl...
RouteInfoManager { public byte[] getHasUnitSubTopicList() { TopicList topicList = new TopicList(); try { try { this.lock.readLock().lockInterruptibly(); Iterator<Entry<String, List<QueueData>>> topicTableIt = this.topicQueueTable.entrySet().iterator(); while (topicTableIt.hasNext()) { Entry<String, List<QueueData>> top...
RouteInfoManager { public byte[] getHasUnitSubTopicList() { TopicList topicList = new TopicList(); try { try { this.lock.readLock().lockInterruptibly(); Iterator<Entry<String, List<QueueData>>> topicTableIt = this.topicQueueTable.entrySet().iterator(); while (topicTableIt.hasNext()) { Entry<String, List<QueueData>> top...
RouteInfoManager { public byte[] getHasUnitSubTopicList() { TopicList topicList = new TopicList(); try { try { this.lock.readLock().lockInterruptibly(); Iterator<Entry<String, List<QueueData>>> topicTableIt = this.topicQueueTable.entrySet().iterator(); while (topicTableIt.hasNext()) { Entry<String, List<QueueData>> top...
RouteInfoManager { public byte[] getHasUnitSubTopicList() { TopicList topicList = new TopicList(); try { try { this.lock.readLock().lockInterruptibly(); Iterator<Entry<String, List<QueueData>>> topicTableIt = this.topicQueueTable.entrySet().iterator(); while (topicTableIt.hasNext()) { Entry<String, List<QueueData>> top...
@Test public void testGetHasUnitSubUnUnitTopicList() { byte[] topicList = routeInfoManager.getHasUnitSubUnUnitTopicList(); assertThat(topicList).isNotNull(); }
public byte[] getHasUnitSubUnUnitTopicList() { TopicList topicList = new TopicList(); try { try { this.lock.readLock().lockInterruptibly(); Iterator<Entry<String, List<QueueData>>> topicTableIt = this.topicQueueTable.entrySet().iterator(); while (topicTableIt.hasNext()) { Entry<String, List<QueueData>> topicEntry = top...
RouteInfoManager { public byte[] getHasUnitSubUnUnitTopicList() { TopicList topicList = new TopicList(); try { try { this.lock.readLock().lockInterruptibly(); Iterator<Entry<String, List<QueueData>>> topicTableIt = this.topicQueueTable.entrySet().iterator(); while (topicTableIt.hasNext()) { Entry<String, List<QueueData...
RouteInfoManager { public byte[] getHasUnitSubUnUnitTopicList() { TopicList topicList = new TopicList(); try { try { this.lock.readLock().lockInterruptibly(); Iterator<Entry<String, List<QueueData>>> topicTableIt = this.topicQueueTable.entrySet().iterator(); while (topicTableIt.hasNext()) { Entry<String, List<QueueData...
RouteInfoManager { public byte[] getHasUnitSubUnUnitTopicList() { TopicList topicList = new TopicList(); try { try { this.lock.readLock().lockInterruptibly(); Iterator<Entry<String, List<QueueData>>> topicTableIt = this.topicQueueTable.entrySet().iterator(); while (topicTableIt.hasNext()) { Entry<String, List<QueueData...
RouteInfoManager { public byte[] getHasUnitSubUnUnitTopicList() { TopicList topicList = new TopicList(); try { try { this.lock.readLock().lockInterruptibly(); Iterator<Entry<String, List<QueueData>>> topicTableIt = this.topicQueueTable.entrySet().iterator(); while (topicTableIt.hasNext()) { Entry<String, List<QueueData...
@Test public void testPutKVConfig() { kvConfigManager.load(); kvConfigManager.putKVConfig(NamesrvUtil.NAMESPACE_ORDER_TOPIC_CONFIG, "UnitTest", "test"); byte[] kvConfig = kvConfigManager.getKVListByNamespace(NamesrvUtil.NAMESPACE_ORDER_TOPIC_CONFIG); assertThat(kvConfig).isNotNull(); String value = kvConfigManager.getK...
public void putKVConfig(final String namespace, final String key, final String value) { try { this.lock.writeLock().lockInterruptibly(); try { HashMap<String, String> kvTable = this.configTable.get(namespace); if (null == kvTable) { kvTable = new HashMap<String, String>(); this.configTable.put(namespace, kvTable); log....
KVConfigManager { public void putKVConfig(final String namespace, final String key, final String value) { try { this.lock.writeLock().lockInterruptibly(); try { HashMap<String, String> kvTable = this.configTable.get(namespace); if (null == kvTable) { kvTable = new HashMap<String, String>(); this.configTable.put(namespa...
KVConfigManager { public void putKVConfig(final String namespace, final String key, final String value) { try { this.lock.writeLock().lockInterruptibly(); try { HashMap<String, String> kvTable = this.configTable.get(namespace); if (null == kvTable) { kvTable = new HashMap<String, String>(); this.configTable.put(namespa...
KVConfigManager { public void putKVConfig(final String namespace, final String key, final String value) { try { this.lock.writeLock().lockInterruptibly(); try { HashMap<String, String> kvTable = this.configTable.get(namespace); if (null == kvTable) { kvTable = new HashMap<String, String>(); this.configTable.put(namespa...
KVConfigManager { public void putKVConfig(final String namespace, final String key, final String value) { try { this.lock.writeLock().lockInterruptibly(); try { HashMap<String, String> kvTable = this.configTable.get(namespace); if (null == kvTable) { kvTable = new HashMap<String, String>(); this.configTable.put(namespa...
@Test public void testProcessRequest_GetKVConfigReturnNull() throws RemotingCommandException { GetKVConfigRequestHeader header = new GetKVConfigRequestHeader(); RemotingCommand request = RemotingCommand.createRequestCommand(RequestCode.GET_KV_CONFIG, header); request.addExtField("namespace", "namespace"); request.addEx...
@Override public RemotingCommand processRequest(ChannelHandlerContext ctx, RemotingCommand request) throws RemotingCommandException { if (log.isDebugEnabled()) { log.debug("receive request, {} {} {}", request.getCode(), RemotingHelper.parseChannelRemoteAddr(ctx.channel()), request); } switch (request.getCode()) { case ...
DefaultRequestProcessor implements NettyRequestProcessor { @Override public RemotingCommand processRequest(ChannelHandlerContext ctx, RemotingCommand request) throws RemotingCommandException { if (log.isDebugEnabled()) { log.debug("receive request, {} {} {}", request.getCode(), RemotingHelper.parseChannelRemoteAddr(ctx...
DefaultRequestProcessor implements NettyRequestProcessor { @Override public RemotingCommand processRequest(ChannelHandlerContext ctx, RemotingCommand request) throws RemotingCommandException { if (log.isDebugEnabled()) { log.debug("receive request, {} {} {}", request.getCode(), RemotingHelper.parseChannelRemoteAddr(ctx...
DefaultRequestProcessor implements NettyRequestProcessor { @Override public RemotingCommand processRequest(ChannelHandlerContext ctx, RemotingCommand request) throws RemotingCommandException { if (log.isDebugEnabled()) { log.debug("receive request, {} {} {}", request.getCode(), RemotingHelper.parseChannelRemoteAddr(ctx...
DefaultRequestProcessor implements NettyRequestProcessor { @Override public RemotingCommand processRequest(ChannelHandlerContext ctx, RemotingCommand request) throws RemotingCommandException { if (log.isDebugEnabled()) { log.debug("receive request, {} {} {}", request.getCode(), RemotingHelper.parseChannelRemoteAddr(ctx...
@Test public void testProcessRequest_RegisterBroker() throws RemotingCommandException, NoSuchFieldException, IllegalAccessException { RemotingCommand request = genSampleRegisterCmd(true); ChannelHandlerContext ctx = mock(ChannelHandlerContext.class); when(ctx.channel()).thenReturn(null); RemotingCommand response = defa...
@Override public RemotingCommand processRequest(ChannelHandlerContext ctx, RemotingCommand request) throws RemotingCommandException { if (log.isDebugEnabled()) { log.debug("receive request, {} {} {}", request.getCode(), RemotingHelper.parseChannelRemoteAddr(ctx.channel()), request); } switch (request.getCode()) { case ...
DefaultRequestProcessor implements NettyRequestProcessor { @Override public RemotingCommand processRequest(ChannelHandlerContext ctx, RemotingCommand request) throws RemotingCommandException { if (log.isDebugEnabled()) { log.debug("receive request, {} {} {}", request.getCode(), RemotingHelper.parseChannelRemoteAddr(ctx...
DefaultRequestProcessor implements NettyRequestProcessor { @Override public RemotingCommand processRequest(ChannelHandlerContext ctx, RemotingCommand request) throws RemotingCommandException { if (log.isDebugEnabled()) { log.debug("receive request, {} {} {}", request.getCode(), RemotingHelper.parseChannelRemoteAddr(ctx...
DefaultRequestProcessor implements NettyRequestProcessor { @Override public RemotingCommand processRequest(ChannelHandlerContext ctx, RemotingCommand request) throws RemotingCommandException { if (log.isDebugEnabled()) { log.debug("receive request, {} {} {}", request.getCode(), RemotingHelper.parseChannelRemoteAddr(ctx...
DefaultRequestProcessor implements NettyRequestProcessor { @Override public RemotingCommand processRequest(ChannelHandlerContext ctx, RemotingCommand request) throws RemotingCommandException { if (log.isDebugEnabled()) { log.debug("receive request, {} {} {}", request.getCode(), RemotingHelper.parseChannelRemoteAddr(ctx...
@Test public void testProcessRequest_RegisterBrokerWithFilterServer() throws RemotingCommandException, NoSuchFieldException, IllegalAccessException { RemotingCommand request = genSampleRegisterCmd(true); request.setVersion(100); ChannelHandlerContext ctx = mock(ChannelHandlerContext.class); when(ctx.channel()).thenRetu...
@Override public RemotingCommand processRequest(ChannelHandlerContext ctx, RemotingCommand request) throws RemotingCommandException { if (log.isDebugEnabled()) { log.debug("receive request, {} {} {}", request.getCode(), RemotingHelper.parseChannelRemoteAddr(ctx.channel()), request); } switch (request.getCode()) { case ...
DefaultRequestProcessor implements NettyRequestProcessor { @Override public RemotingCommand processRequest(ChannelHandlerContext ctx, RemotingCommand request) throws RemotingCommandException { if (log.isDebugEnabled()) { log.debug("receive request, {} {} {}", request.getCode(), RemotingHelper.parseChannelRemoteAddr(ctx...
DefaultRequestProcessor implements NettyRequestProcessor { @Override public RemotingCommand processRequest(ChannelHandlerContext ctx, RemotingCommand request) throws RemotingCommandException { if (log.isDebugEnabled()) { log.debug("receive request, {} {} {}", request.getCode(), RemotingHelper.parseChannelRemoteAddr(ctx...
DefaultRequestProcessor implements NettyRequestProcessor { @Override public RemotingCommand processRequest(ChannelHandlerContext ctx, RemotingCommand request) throws RemotingCommandException { if (log.isDebugEnabled()) { log.debug("receive request, {} {} {}", request.getCode(), RemotingHelper.parseChannelRemoteAddr(ctx...
DefaultRequestProcessor implements NettyRequestProcessor { @Override public RemotingCommand processRequest(ChannelHandlerContext ctx, RemotingCommand request) throws RemotingCommandException { if (log.isDebugEnabled()) { log.debug("receive request, {} {} {}", request.getCode(), RemotingHelper.parseChannelRemoteAddr(ctx...
@Test public void testProcessRequest_UnregisterBroker() throws RemotingCommandException, NoSuchFieldException, IllegalAccessException { ChannelHandlerContext ctx = mock(ChannelHandlerContext.class); when(ctx.channel()).thenReturn(null); RemotingCommand regRequest = genSampleRegisterCmd(true); defaultRequestProcessor.pr...
@Override public RemotingCommand processRequest(ChannelHandlerContext ctx, RemotingCommand request) throws RemotingCommandException { if (log.isDebugEnabled()) { log.debug("receive request, {} {} {}", request.getCode(), RemotingHelper.parseChannelRemoteAddr(ctx.channel()), request); } switch (request.getCode()) { case ...
DefaultRequestProcessor implements NettyRequestProcessor { @Override public RemotingCommand processRequest(ChannelHandlerContext ctx, RemotingCommand request) throws RemotingCommandException { if (log.isDebugEnabled()) { log.debug("receive request, {} {} {}", request.getCode(), RemotingHelper.parseChannelRemoteAddr(ctx...
DefaultRequestProcessor implements NettyRequestProcessor { @Override public RemotingCommand processRequest(ChannelHandlerContext ctx, RemotingCommand request) throws RemotingCommandException { if (log.isDebugEnabled()) { log.debug("receive request, {} {} {}", request.getCode(), RemotingHelper.parseChannelRemoteAddr(ctx...
DefaultRequestProcessor implements NettyRequestProcessor { @Override public RemotingCommand processRequest(ChannelHandlerContext ctx, RemotingCommand request) throws RemotingCommandException { if (log.isDebugEnabled()) { log.debug("receive request, {} {} {}", request.getCode(), RemotingHelper.parseChannelRemoteAddr(ctx...
DefaultRequestProcessor implements NettyRequestProcessor { @Override public RemotingCommand processRequest(ChannelHandlerContext ctx, RemotingCommand request) throws RemotingCommandException { if (log.isDebugEnabled()) { log.debug("receive request, {} {} {}", request.getCode(), RemotingHelper.parseChannelRemoteAddr(ctx...
@Test public void testIsCancelled() throws Exception { assertThat(promise.isCancelled()).isEqualTo(false); }
@Override public boolean isCancelled() { return state.isCancelledState(); }
DefaultPromise implements Promise<V> { @Override public boolean isCancelled() { return state.isCancelledState(); } }
DefaultPromise implements Promise<V> { @Override public boolean isCancelled() { return state.isCancelledState(); } DefaultPromise(); }
DefaultPromise implements Promise<V> { @Override public boolean isCancelled() { return state.isCancelledState(); } DefaultPromise(); @Override boolean cancel(final boolean mayInterruptIfRunning); @Override boolean isCancelled(); @Override boolean isDone(); @Override V get(); @Override V get(final long timeout); @Overri...
DefaultPromise implements Promise<V> { @Override public boolean isCancelled() { return state.isCancelledState(); } DefaultPromise(); @Override boolean cancel(final boolean mayInterruptIfRunning); @Override boolean isCancelled(); @Override boolean isDone(); @Override V get(); @Override V get(final long timeout); @Overri...
@Test public void testIsDone() throws Exception { assertThat(promise.isDone()).isEqualTo(false); promise.set("Done"); assertThat(promise.isDone()).isEqualTo(true); }
@Override public boolean isDone() { return state.isDoneState(); }
DefaultPromise implements Promise<V> { @Override public boolean isDone() { return state.isDoneState(); } }
DefaultPromise implements Promise<V> { @Override public boolean isDone() { return state.isDoneState(); } DefaultPromise(); }
DefaultPromise implements Promise<V> { @Override public boolean isDone() { return state.isDoneState(); } DefaultPromise(); @Override boolean cancel(final boolean mayInterruptIfRunning); @Override boolean isCancelled(); @Override boolean isDone(); @Override V get(); @Override V get(final long timeout); @Override boolean...
DefaultPromise implements Promise<V> { @Override public boolean isDone() { return state.isDoneState(); } DefaultPromise(); @Override boolean cancel(final boolean mayInterruptIfRunning); @Override boolean isCancelled(); @Override boolean isDone(); @Override V get(); @Override V get(final long timeout); @Override boolean...
@Test public void testGet() throws Exception { promise.set("Done"); assertThat(promise.get()).isEqualTo("Done"); }
@Override public V get() { return result; }
DefaultPromise implements Promise<V> { @Override public V get() { return result; } }
DefaultPromise implements Promise<V> { @Override public V get() { return result; } DefaultPromise(); }
DefaultPromise implements Promise<V> { @Override public V get() { return result; } DefaultPromise(); @Override boolean cancel(final boolean mayInterruptIfRunning); @Override boolean isCancelled(); @Override boolean isDone(); @Override V get(); @Override V get(final long timeout); @Override boolean set(final V value); @...
DefaultPromise implements Promise<V> { @Override public V get() { return result; } DefaultPromise(); @Override boolean cancel(final boolean mayInterruptIfRunning); @Override boolean isCancelled(); @Override boolean isDone(); @Override V get(); @Override V get(final long timeout); @Override boolean set(final V value); @...
@Test public void testGet_WithTimeout() throws Exception { try { promise.get(100); failBecauseExceptionWasNotThrown(OMSRuntimeException.class); } catch (OMSRuntimeException e) { assertThat(e).hasMessageContaining("Get request result is timeout or interrupted"); } }
@Override public V get() { return result; }
DefaultPromise implements Promise<V> { @Override public V get() { return result; } }
DefaultPromise implements Promise<V> { @Override public V get() { return result; } DefaultPromise(); }
DefaultPromise implements Promise<V> { @Override public V get() { return result; } DefaultPromise(); @Override boolean cancel(final boolean mayInterruptIfRunning); @Override boolean isCancelled(); @Override boolean isDone(); @Override V get(); @Override V get(final long timeout); @Override boolean set(final V value); @...
DefaultPromise implements Promise<V> { @Override public V get() { return result; } DefaultPromise(); @Override boolean cancel(final boolean mayInterruptIfRunning); @Override boolean isCancelled(); @Override boolean isDone(); @Override V get(); @Override V get(final long timeout); @Override boolean set(final V value); @...
@Test public void testAddListener() throws Exception { promise.addListener(new PromiseListener<String>() { @Override public void operationCompleted(final Promise<String> promise) { assertThat(promise.get()).isEqualTo("Done"); } @Override public void operationFailed(final Promise<String> promise) { } }); promise.set("Do...
@Override public void addListener(final PromiseListener<V> listener) { if (listener == null) { throw new NullPointerException("FutureListener is null"); } boolean notifyNow = false; synchronized (lock) { if (!isDoing()) { notifyNow = true; } else { if (promiseListenerList == null) { promiseListenerList = new ArrayList<...
DefaultPromise implements Promise<V> { @Override public void addListener(final PromiseListener<V> listener) { if (listener == null) { throw new NullPointerException("FutureListener is null"); } boolean notifyNow = false; synchronized (lock) { if (!isDoing()) { notifyNow = true; } else { if (promiseListenerList == null)...
DefaultPromise implements Promise<V> { @Override public void addListener(final PromiseListener<V> listener) { if (listener == null) { throw new NullPointerException("FutureListener is null"); } boolean notifyNow = false; synchronized (lock) { if (!isDoing()) { notifyNow = true; } else { if (promiseListenerList == null)...
DefaultPromise implements Promise<V> { @Override public void addListener(final PromiseListener<V> listener) { if (listener == null) { throw new NullPointerException("FutureListener is null"); } boolean notifyNow = false; synchronized (lock) { if (!isDoing()) { notifyNow = true; } else { if (promiseListenerList == null)...
DefaultPromise implements Promise<V> { @Override public void addListener(final PromiseListener<V> listener) { if (listener == null) { throw new NullPointerException("FutureListener is null"); } boolean notifyNow = false; synchronized (lock) { if (!isDoing()) { notifyNow = true; } else { if (promiseListenerList == null)...
@Test public void getThrowable() throws Exception { assertThat(promise.getThrowable()).isNull(); Throwable exception = new OMSRuntimeException("-1", "Test Error"); promise.setFailure(exception); assertThat(promise.getThrowable()).isEqualTo(exception); }
@Override public Throwable getThrowable() { return exception; }
DefaultPromise implements Promise<V> { @Override public Throwable getThrowable() { return exception; } }
DefaultPromise implements Promise<V> { @Override public Throwable getThrowable() { return exception; } DefaultPromise(); }
DefaultPromise implements Promise<V> { @Override public Throwable getThrowable() { return exception; } DefaultPromise(); @Override boolean cancel(final boolean mayInterruptIfRunning); @Override boolean isCancelled(); @Override boolean isDone(); @Override V get(); @Override V get(final long timeout); @Override boolean s...
DefaultPromise implements Promise<V> { @Override public Throwable getThrowable() { return exception; } DefaultPromise(); @Override boolean cancel(final boolean mayInterruptIfRunning); @Override boolean isCancelled(); @Override boolean isDone(); @Override V get(); @Override V get(final long timeout); @Override boolean s...
@Test public void testConsumeMessage() { final byte[] testBody = new byte[] {'a', 'b'}; MessageExt consumedMsg = new MessageExt(); consumedMsg.setMsgId("NewMsgId"); consumedMsg.setBody(testBody); consumedMsg.putUserProperty(NonStandardKeys.MESSAGE_DESTINATION, "TOPIC"); consumedMsg.setTopic("HELLO_QUEUE"); consumer.att...
@Override public PushConsumer attachQueue(final String queueName, final MessageListener listener) { this.subscribeTable.put(queueName, listener); try { this.rocketmqPushConsumer.subscribe(queueName, "*"); } catch (MQClientException e) { throw new OMSRuntimeException("-1", String.format("RocketMQ push consumer can't att...
PushConsumerImpl implements PushConsumer { @Override public PushConsumer attachQueue(final String queueName, final MessageListener listener) { this.subscribeTable.put(queueName, listener); try { this.rocketmqPushConsumer.subscribe(queueName, "*"); } catch (MQClientException e) { throw new OMSRuntimeException("-1", Stri...
PushConsumerImpl implements PushConsumer { @Override public PushConsumer attachQueue(final String queueName, final MessageListener listener) { this.subscribeTable.put(queueName, listener); try { this.rocketmqPushConsumer.subscribe(queueName, "*"); } catch (MQClientException e) { throw new OMSRuntimeException("-1", Stri...
PushConsumerImpl implements PushConsumer { @Override public PushConsumer attachQueue(final String queueName, final MessageListener listener) { this.subscribeTable.put(queueName, listener); try { this.rocketmqPushConsumer.subscribe(queueName, "*"); } catch (MQClientException e) { throw new OMSRuntimeException("-1", Stri...
PushConsumerImpl implements PushConsumer { @Override public PushConsumer attachQueue(final String queueName, final MessageListener listener) { this.subscribeTable.put(queueName, listener); try { this.rocketmqPushConsumer.subscribe(queueName, "*"); } catch (MQClientException e) { throw new OMSRuntimeException("-1", Stri...
@Test public void testNextPullOffset() throws Exception { MessageQueue messageQueue = new MessageQueue(); when(rocketmqPullConsume.fetchConsumeOffset(any(MessageQueue.class), anyBoolean())) .thenReturn(123L); assertThat(localMessageCache.nextPullOffset(new MessageQueue())).isEqualTo(123L); }
long nextPullOffset(MessageQueue remoteQueue) { if (!pullOffsetTable.containsKey(remoteQueue)) { try { pullOffsetTable.putIfAbsent(remoteQueue, rocketmqPullConsumer.fetchConsumeOffset(remoteQueue, false)); } catch (MQClientException e) { log.error("A error occurred in fetch consume offset process.", e); } } return pull...
LocalMessageCache implements ServiceLifecycle { long nextPullOffset(MessageQueue remoteQueue) { if (!pullOffsetTable.containsKey(remoteQueue)) { try { pullOffsetTable.putIfAbsent(remoteQueue, rocketmqPullConsumer.fetchConsumeOffset(remoteQueue, false)); } catch (MQClientException e) { log.error("A error occurred in fet...
LocalMessageCache implements ServiceLifecycle { long nextPullOffset(MessageQueue remoteQueue) { if (!pullOffsetTable.containsKey(remoteQueue)) { try { pullOffsetTable.putIfAbsent(remoteQueue, rocketmqPullConsumer.fetchConsumeOffset(remoteQueue, false)); } catch (MQClientException e) { log.error("A error occurred in fet...
LocalMessageCache implements ServiceLifecycle { long nextPullOffset(MessageQueue remoteQueue) { if (!pullOffsetTable.containsKey(remoteQueue)) { try { pullOffsetTable.putIfAbsent(remoteQueue, rocketmqPullConsumer.fetchConsumeOffset(remoteQueue, false)); } catch (MQClientException e) { log.error("A error occurred in fet...
LocalMessageCache implements ServiceLifecycle { long nextPullOffset(MessageQueue remoteQueue) { if (!pullOffsetTable.containsKey(remoteQueue)) { try { pullOffsetTable.putIfAbsent(remoteQueue, rocketmqPullConsumer.fetchConsumeOffset(remoteQueue, false)); } catch (MQClientException e) { log.error("A error occurred in fet...
@Test public void testSubmitConsumeRequest() throws Exception { byte [] body = new byte[]{'1', '2', '3'}; MessageExt consumedMsg = new MessageExt(); consumedMsg.setMsgId("NewMsgId"); consumedMsg.setBody(body); consumedMsg.putUserProperty(NonStandardKeys.MESSAGE_DESTINATION, "TOPIC"); consumedMsg.setTopic("HELLO_QUEUE")...
void submitConsumeRequest(ConsumeRequest consumeRequest) { try { consumeRequestCache.put(consumeRequest); } catch (InterruptedException ignore) { } }
LocalMessageCache implements ServiceLifecycle { void submitConsumeRequest(ConsumeRequest consumeRequest) { try { consumeRequestCache.put(consumeRequest); } catch (InterruptedException ignore) { } } }
LocalMessageCache implements ServiceLifecycle { void submitConsumeRequest(ConsumeRequest consumeRequest) { try { consumeRequestCache.put(consumeRequest); } catch (InterruptedException ignore) { } } LocalMessageCache(final DefaultMQPullConsumer rocketmqPullConsumer, final ClientConfig clientConfig); }
LocalMessageCache implements ServiceLifecycle { void submitConsumeRequest(ConsumeRequest consumeRequest) { try { consumeRequestCache.put(consumeRequest); } catch (InterruptedException ignore) { } } LocalMessageCache(final DefaultMQPullConsumer rocketmqPullConsumer, final ClientConfig clientConfig); @Override void start...
LocalMessageCache implements ServiceLifecycle { void submitConsumeRequest(ConsumeRequest consumeRequest) { try { consumeRequestCache.put(consumeRequest); } catch (InterruptedException ignore) { } } LocalMessageCache(final DefaultMQPullConsumer rocketmqPullConsumer, final ClientConfig clientConfig); @Override void start...
@Test public void testPoll() { final byte[] testBody = new byte[] {'a', 'b'}; MessageExt consumedMsg = new MessageExt(); consumedMsg.setMsgId("NewMsgId"); consumedMsg.setBody(testBody); consumedMsg.putUserProperty(NonStandardKeys.MESSAGE_DESTINATION, "TOPIC"); consumedMsg.setTopic(queueName); when(localMessageCache.pol...
@Override public Message poll() { MessageExt rmqMsg = localMessageCache.poll(); return rmqMsg == null ? null : OMSUtil.msgConvert(rmqMsg); }
PullConsumerImpl implements PullConsumer { @Override public Message poll() { MessageExt rmqMsg = localMessageCache.poll(); return rmqMsg == null ? null : OMSUtil.msgConvert(rmqMsg); } }
PullConsumerImpl implements PullConsumer { @Override public Message poll() { MessageExt rmqMsg = localMessageCache.poll(); return rmqMsg == null ? null : OMSUtil.msgConvert(rmqMsg); } PullConsumerImpl(final String queueName, final KeyValue properties); }
PullConsumerImpl implements PullConsumer { @Override public Message poll() { MessageExt rmqMsg = localMessageCache.poll(); return rmqMsg == null ? null : OMSUtil.msgConvert(rmqMsg); } PullConsumerImpl(final String queueName, final KeyValue properties); @Override KeyValue properties(); @Override Message poll(); @Overrid...
PullConsumerImpl implements PullConsumer { @Override public Message poll() { MessageExt rmqMsg = localMessageCache.poll(); return rmqMsg == null ? null : OMSUtil.msgConvert(rmqMsg); } PullConsumerImpl(final String queueName, final KeyValue properties); @Override KeyValue properties(); @Override Message poll(); @Overrid...
@Test public void testPoll_WithTimeout() { Message message = consumer.poll(); assertThat(message).isNull(); message = consumer.poll(OMS.newKeyValue().put(PropertyKeys.OPERATION_TIMEOUT, 100)); assertThat(message).isNull(); }
@Override public Message poll() { MessageExt rmqMsg = localMessageCache.poll(); return rmqMsg == null ? null : OMSUtil.msgConvert(rmqMsg); }
PullConsumerImpl implements PullConsumer { @Override public Message poll() { MessageExt rmqMsg = localMessageCache.poll(); return rmqMsg == null ? null : OMSUtil.msgConvert(rmqMsg); } }
PullConsumerImpl implements PullConsumer { @Override public Message poll() { MessageExt rmqMsg = localMessageCache.poll(); return rmqMsg == null ? null : OMSUtil.msgConvert(rmqMsg); } PullConsumerImpl(final String queueName, final KeyValue properties); }
PullConsumerImpl implements PullConsumer { @Override public Message poll() { MessageExt rmqMsg = localMessageCache.poll(); return rmqMsg == null ? null : OMSUtil.msgConvert(rmqMsg); } PullConsumerImpl(final String queueName, final KeyValue properties); @Override KeyValue properties(); @Override Message poll(); @Overrid...
PullConsumerImpl implements PullConsumer { @Override public Message poll() { MessageExt rmqMsg = localMessageCache.poll(); return rmqMsg == null ? null : OMSUtil.msgConvert(rmqMsg); } PullConsumerImpl(final String queueName, final KeyValue properties); @Override KeyValue properties(); @Override Message poll(); @Overrid...
@Test public void testRollback() { when(rocketmqProducer.getMaxMessageSize()).thenReturn(1024); final BytesMessage message = producer.createBytesMessageToTopic("HELLO_TOPIC", new byte[] {'a'}); producer.send(message); producer.rollback(); producer.commit(); assertThat(message.headers().getString(MessageHeader.MESSAGE_I...
@Override public synchronized void rollback() { msgCacheQueue.clear(); }
SequenceProducerImpl extends AbstractOMSProducer implements SequenceProducer { @Override public synchronized void rollback() { msgCacheQueue.clear(); } }
SequenceProducerImpl extends AbstractOMSProducer implements SequenceProducer { @Override public synchronized void rollback() { msgCacheQueue.clear(); } SequenceProducerImpl(final KeyValue properties); }
SequenceProducerImpl extends AbstractOMSProducer implements SequenceProducer { @Override public synchronized void rollback() { msgCacheQueue.clear(); } SequenceProducerImpl(final KeyValue properties); @Override KeyValue properties(); @Override void send(final Message message); @Override void send(final Message message,...
SequenceProducerImpl extends AbstractOMSProducer implements SequenceProducer { @Override public synchronized void rollback() { msgCacheQueue.clear(); } SequenceProducerImpl(final KeyValue properties); @Override KeyValue properties(); @Override void send(final Message message); @Override void send(final Message message,...
@Test public void testSend_OK() throws InterruptedException, RemotingException, MQClientException, MQBrokerException { SendResult sendResult = new SendResult(); sendResult.setMsgId("TestMsgID"); sendResult.setSendStatus(SendStatus.SEND_OK); when(rocketmqProducer.send(any(Message.class), anyLong())).thenReturn(sendResul...
@Override public SendResult send(final Message message) { return send(message, this.rocketmqProducer.getSendMsgTimeout()); }
ProducerImpl extends AbstractOMSProducer implements Producer { @Override public SendResult send(final Message message) { return send(message, this.rocketmqProducer.getSendMsgTimeout()); } }
ProducerImpl extends AbstractOMSProducer implements Producer { @Override public SendResult send(final Message message) { return send(message, this.rocketmqProducer.getSendMsgTimeout()); } ProducerImpl(final KeyValue properties); }
ProducerImpl extends AbstractOMSProducer implements Producer { @Override public SendResult send(final Message message) { return send(message, this.rocketmqProducer.getSendMsgTimeout()); } ProducerImpl(final KeyValue properties); @Override KeyValue properties(); @Override SendResult send(final Message message); @Overrid...
ProducerImpl extends AbstractOMSProducer implements Producer { @Override public SendResult send(final Message message) { return send(message, this.rocketmqProducer.getSendMsgTimeout()); } ProducerImpl(final KeyValue properties); @Override KeyValue properties(); @Override SendResult send(final Message message); @Overrid...
@Test public void testSend_Not_OK() throws InterruptedException, RemotingException, MQClientException, MQBrokerException { SendResult sendResult = new SendResult(); sendResult.setSendStatus(SendStatus.FLUSH_DISK_TIMEOUT); when(rocketmqProducer.send(any(Message.class), anyLong())).thenReturn(sendResult); try { producer....
@Override public SendResult send(final Message message) { return send(message, this.rocketmqProducer.getSendMsgTimeout()); }
ProducerImpl extends AbstractOMSProducer implements Producer { @Override public SendResult send(final Message message) { return send(message, this.rocketmqProducer.getSendMsgTimeout()); } }
ProducerImpl extends AbstractOMSProducer implements Producer { @Override public SendResult send(final Message message) { return send(message, this.rocketmqProducer.getSendMsgTimeout()); } ProducerImpl(final KeyValue properties); }
ProducerImpl extends AbstractOMSProducer implements Producer { @Override public SendResult send(final Message message) { return send(message, this.rocketmqProducer.getSendMsgTimeout()); } ProducerImpl(final KeyValue properties); @Override KeyValue properties(); @Override SendResult send(final Message message); @Overrid...
ProducerImpl extends AbstractOMSProducer implements Producer { @Override public SendResult send(final Message message) { return send(message, this.rocketmqProducer.getSendMsgTimeout()); } ProducerImpl(final KeyValue properties); @Override KeyValue properties(); @Override SendResult send(final Message message); @Overrid...
@Test public void testSend_WithException() throws InterruptedException, RemotingException, MQClientException, MQBrokerException { when(rocketmqProducer.send(any(Message.class), anyLong())).thenThrow(MQClientException.class); try { producer.send(producer.createBytesMessageToTopic("HELLO_TOPIC", new byte[] {'a'})); failB...
@Override public SendResult send(final Message message) { return send(message, this.rocketmqProducer.getSendMsgTimeout()); }
ProducerImpl extends AbstractOMSProducer implements Producer { @Override public SendResult send(final Message message) { return send(message, this.rocketmqProducer.getSendMsgTimeout()); } }
ProducerImpl extends AbstractOMSProducer implements Producer { @Override public SendResult send(final Message message) { return send(message, this.rocketmqProducer.getSendMsgTimeout()); } ProducerImpl(final KeyValue properties); }
ProducerImpl extends AbstractOMSProducer implements Producer { @Override public SendResult send(final Message message) { return send(message, this.rocketmqProducer.getSendMsgTimeout()); } ProducerImpl(final KeyValue properties); @Override KeyValue properties(); @Override SendResult send(final Message message); @Overrid...
ProducerImpl extends AbstractOMSProducer implements Producer { @Override public SendResult send(final Message message) { return send(message, this.rocketmqProducer.getSendMsgTimeout()); } ProducerImpl(final KeyValue properties); @Override KeyValue properties(); @Override SendResult send(final Message message); @Overrid...
@Test public void testPopulate_ExistObj() { CustomizedConfig config = new CustomizedConfig(); config.setOmsConsumerId("NewConsumerId"); Assert.assertEquals(config.getOmsConsumerId(), "NewConsumerId"); config = BeanUtils.populate(properties, config); Assert.assertEquals(config.getRmqMaxRedeliveryTimes(), 120); Assert.as...
public static <T> T populate(final Properties properties, final Class<T> clazz) { T obj = null; try { obj = clazz.newInstance(); return populate(properties, obj); } catch (Throwable e) { log.warn("Error occurs !", e); } return obj; }
BeanUtils { public static <T> T populate(final Properties properties, final Class<T> clazz) { T obj = null; try { obj = clazz.newInstance(); return populate(properties, obj); } catch (Throwable e) { log.warn("Error occurs !", e); } return obj; } }
BeanUtils { public static <T> T populate(final Properties properties, final Class<T> clazz) { T obj = null; try { obj = clazz.newInstance(); return populate(properties, obj); } catch (Throwable e) { log.warn("Error occurs !", e); } return obj; } }
BeanUtils { public static <T> T populate(final Properties properties, final Class<T> clazz) { T obj = null; try { obj = clazz.newInstance(); return populate(properties, obj); } catch (Throwable e) { log.warn("Error occurs !", e); } return obj; } static T populate(final Properties properties, final Class<T> clazz); sta...
BeanUtils { public static <T> T populate(final Properties properties, final Class<T> clazz) { T obj = null; try { obj = clazz.newInstance(); return populate(properties, obj); } catch (Throwable e) { log.warn("Error occurs !", e); } return obj; } static T populate(final Properties properties, final Class<T> clazz); sta...
@Ignore @Test public void testExecute() throws SubCommandException { GetBrokerConfigCommand cmd = new GetBrokerConfigCommand(); Options options = ServerUtil.buildCommandlineOptions(new Options()); String[] subargs = new String[] {"-b 127.0.0.1:10911", "-c default-cluster"}; final CommandLine commandLine = ServerUtil.pa...
@Override public void execute(final CommandLine commandLine, final Options options, final RPCHook rpcHook) throws SubCommandException { DefaultMQAdminExt defaultMQAdminExt = new DefaultMQAdminExt(rpcHook); defaultMQAdminExt.setInstanceName(Long.toString(System.currentTimeMillis())); try { if (commandLine.hasOption('b')...
GetBrokerConfigCommand implements SubCommand { @Override public void execute(final CommandLine commandLine, final Options options, final RPCHook rpcHook) throws SubCommandException { DefaultMQAdminExt defaultMQAdminExt = new DefaultMQAdminExt(rpcHook); defaultMQAdminExt.setInstanceName(Long.toString(System.currentTimeM...
GetBrokerConfigCommand implements SubCommand { @Override public void execute(final CommandLine commandLine, final Options options, final RPCHook rpcHook) throws SubCommandException { DefaultMQAdminExt defaultMQAdminExt = new DefaultMQAdminExt(rpcHook); defaultMQAdminExt.setInstanceName(Long.toString(System.currentTimeM...
GetBrokerConfigCommand implements SubCommand { @Override public void execute(final CommandLine commandLine, final Options options, final RPCHook rpcHook) throws SubCommandException { DefaultMQAdminExt defaultMQAdminExt = new DefaultMQAdminExt(rpcHook); defaultMQAdminExt.setInstanceName(Long.toString(System.currentTimeM...
GetBrokerConfigCommand implements SubCommand { @Override public void execute(final CommandLine commandLine, final Options options, final RPCHook rpcHook) throws SubCommandException { DefaultMQAdminExt defaultMQAdminExt = new DefaultMQAdminExt(rpcHook); defaultMQAdminExt.setInstanceName(Long.toString(System.currentTimeM...
@Ignore @Test public void testExecute() throws SubCommandException { BrokerConsumeStatsSubCommad cmd = new BrokerConsumeStatsSubCommad(); Options options = ServerUtil.buildCommandlineOptions(new Options()); String[] subargs = new String[] {"-b 127.0.0.1:10911", "-t 3000", "-l 5", "-o true"}; final CommandLine commandLi...
@Override public void execute(CommandLine commandLine, Options options, RPCHook rpcHook) throws SubCommandException { DefaultMQAdminExt defaultMQAdminExt = new DefaultMQAdminExt(rpcHook); defaultMQAdminExt.setInstanceName(Long.toString(System.currentTimeMillis())); try { defaultMQAdminExt.start(); String brokerAddr = c...
BrokerConsumeStatsSubCommad implements SubCommand { @Override public void execute(CommandLine commandLine, Options options, RPCHook rpcHook) throws SubCommandException { DefaultMQAdminExt defaultMQAdminExt = new DefaultMQAdminExt(rpcHook); defaultMQAdminExt.setInstanceName(Long.toString(System.currentTimeMillis())); tr...
BrokerConsumeStatsSubCommad implements SubCommand { @Override public void execute(CommandLine commandLine, Options options, RPCHook rpcHook) throws SubCommandException { DefaultMQAdminExt defaultMQAdminExt = new DefaultMQAdminExt(rpcHook); defaultMQAdminExt.setInstanceName(Long.toString(System.currentTimeMillis())); tr...
BrokerConsumeStatsSubCommad implements SubCommand { @Override public void execute(CommandLine commandLine, Options options, RPCHook rpcHook) throws SubCommandException { DefaultMQAdminExt defaultMQAdminExt = new DefaultMQAdminExt(rpcHook); defaultMQAdminExt.setInstanceName(Long.toString(System.currentTimeMillis())); tr...
BrokerConsumeStatsSubCommad implements SubCommand { @Override public void execute(CommandLine commandLine, Options options, RPCHook rpcHook) throws SubCommandException { DefaultMQAdminExt defaultMQAdminExt = new DefaultMQAdminExt(rpcHook); defaultMQAdminExt.setInstanceName(Long.toString(System.currentTimeMillis())); tr...
@Test public void testExecute() { SendMsgStatusCommand cmd = new SendMsgStatusCommand(); Options options = ServerUtil.buildCommandlineOptions(new Options()); String[] subargs = new String[] {"-b 127.0.0.1:10911", "-s 1024 -c 10"}; final CommandLine commandLine = ServerUtil.parseCmdLine("mqadmin " + cmd.commandName(), s...
@Override public void execute(CommandLine commandLine, Options options, RPCHook rpcHook) throws SubCommandException { final DefaultMQProducer producer = new DefaultMQProducer("PID_SMSC", rpcHook); producer.setInstanceName("PID_SMSC_" + System.currentTimeMillis()); try { producer.start(); String brokerName = commandLine...
SendMsgStatusCommand implements SubCommand { @Override public void execute(CommandLine commandLine, Options options, RPCHook rpcHook) throws SubCommandException { final DefaultMQProducer producer = new DefaultMQProducer("PID_SMSC", rpcHook); producer.setInstanceName("PID_SMSC_" + System.currentTimeMillis()); try { prod...
SendMsgStatusCommand implements SubCommand { @Override public void execute(CommandLine commandLine, Options options, RPCHook rpcHook) throws SubCommandException { final DefaultMQProducer producer = new DefaultMQProducer("PID_SMSC", rpcHook); producer.setInstanceName("PID_SMSC_" + System.currentTimeMillis()); try { prod...
SendMsgStatusCommand implements SubCommand { @Override public void execute(CommandLine commandLine, Options options, RPCHook rpcHook) throws SubCommandException { final DefaultMQProducer producer = new DefaultMQProducer("PID_SMSC", rpcHook); producer.setInstanceName("PID_SMSC_" + System.currentTimeMillis()); try { prod...
SendMsgStatusCommand implements SubCommand { @Override public void execute(CommandLine commandLine, Options options, RPCHook rpcHook) throws SubCommandException { final DefaultMQProducer producer = new DefaultMQProducer("PID_SMSC", rpcHook); producer.setInstanceName("PID_SMSC_" + System.currentTimeMillis()); try { prod...
@Ignore @Test public void testExecute() throws SubCommandException { ConsumerProgressSubCommand cmd = new ConsumerProgressSubCommand(); Options options = ServerUtil.buildCommandlineOptions(new Options()); String[] subargs = new String[] {"-g default-group"}; final CommandLine commandLine = ServerUtil.parseCmdLine("mqad...
@Override public void execute(CommandLine commandLine, Options options, RPCHook rpcHook) throws SubCommandException { DefaultMQAdminExt defaultMQAdminExt = new DefaultMQAdminExt(rpcHook); defaultMQAdminExt.setInstanceName(Long.toString(System.currentTimeMillis())); try { defaultMQAdminExt.start(); if (commandLine.hasOp...
ConsumerProgressSubCommand implements SubCommand { @Override public void execute(CommandLine commandLine, Options options, RPCHook rpcHook) throws SubCommandException { DefaultMQAdminExt defaultMQAdminExt = new DefaultMQAdminExt(rpcHook); defaultMQAdminExt.setInstanceName(Long.toString(System.currentTimeMillis())); try...
ConsumerProgressSubCommand implements SubCommand { @Override public void execute(CommandLine commandLine, Options options, RPCHook rpcHook) throws SubCommandException { DefaultMQAdminExt defaultMQAdminExt = new DefaultMQAdminExt(rpcHook); defaultMQAdminExt.setInstanceName(Long.toString(System.currentTimeMillis())); try...
ConsumerProgressSubCommand implements SubCommand { @Override public void execute(CommandLine commandLine, Options options, RPCHook rpcHook) throws SubCommandException { DefaultMQAdminExt defaultMQAdminExt = new DefaultMQAdminExt(rpcHook); defaultMQAdminExt.setInstanceName(Long.toString(System.currentTimeMillis())); try...
ConsumerProgressSubCommand implements SubCommand { @Override public void execute(CommandLine commandLine, Options options, RPCHook rpcHook) throws SubCommandException { DefaultMQAdminExt defaultMQAdminExt = new DefaultMQAdminExt(rpcHook); defaultMQAdminExt.setInstanceName(Long.toString(System.currentTimeMillis())); try...
@Ignore @Test public void testExecute() throws SubCommandException { ConsumerStatusSubCommand cmd = new ConsumerStatusSubCommand(); Options options = ServerUtil.buildCommandlineOptions(new Options()); String[] subargs = new String[] {"-g default-group", "-i cid_one"}; final CommandLine commandLine = ServerUtil.parseCmd...
@Override public void execute(CommandLine commandLine, Options options, RPCHook rpcHook) throws SubCommandException { DefaultMQAdminExt defaultMQAdminExt = new DefaultMQAdminExt(rpcHook); defaultMQAdminExt.setInstanceName(Long.toString(System.currentTimeMillis())); try { defaultMQAdminExt.start(); String group = comman...
ConsumerStatusSubCommand implements SubCommand { @Override public void execute(CommandLine commandLine, Options options, RPCHook rpcHook) throws SubCommandException { DefaultMQAdminExt defaultMQAdminExt = new DefaultMQAdminExt(rpcHook); defaultMQAdminExt.setInstanceName(Long.toString(System.currentTimeMillis())); try {...
ConsumerStatusSubCommand implements SubCommand { @Override public void execute(CommandLine commandLine, Options options, RPCHook rpcHook) throws SubCommandException { DefaultMQAdminExt defaultMQAdminExt = new DefaultMQAdminExt(rpcHook); defaultMQAdminExt.setInstanceName(Long.toString(System.currentTimeMillis())); try {...
ConsumerStatusSubCommand implements SubCommand { @Override public void execute(CommandLine commandLine, Options options, RPCHook rpcHook) throws SubCommandException { DefaultMQAdminExt defaultMQAdminExt = new DefaultMQAdminExt(rpcHook); defaultMQAdminExt.setInstanceName(Long.toString(System.currentTimeMillis())); try {...
ConsumerStatusSubCommand implements SubCommand { @Override public void execute(CommandLine commandLine, Options options, RPCHook rpcHook) throws SubCommandException { DefaultMQAdminExt defaultMQAdminExt = new DefaultMQAdminExt(rpcHook); defaultMQAdminExt.setInstanceName(Long.toString(System.currentTimeMillis())); try {...
@Test public void testExecute() throws SubCommandException { GetNamesrvConfigCommand cmd = new GetNamesrvConfigCommand(); Options options = ServerUtil.buildCommandlineOptions(new Options()); String[] subargs = new String[] {}; final CommandLine commandLine = ServerUtil.parseCmdLine("mqadmin " + cmd.commandName(), subar...
@Override public void execute(final CommandLine commandLine, final Options options, final RPCHook rpcHook) throws SubCommandException { DefaultMQAdminExt defaultMQAdminExt = new DefaultMQAdminExt(rpcHook); defaultMQAdminExt.setInstanceName(Long.toString(System.currentTimeMillis())); try { String servers = commandLine.g...
GetNamesrvConfigCommand implements SubCommand { @Override public void execute(final CommandLine commandLine, final Options options, final RPCHook rpcHook) throws SubCommandException { DefaultMQAdminExt defaultMQAdminExt = new DefaultMQAdminExt(rpcHook); defaultMQAdminExt.setInstanceName(Long.toString(System.currentTime...
GetNamesrvConfigCommand implements SubCommand { @Override public void execute(final CommandLine commandLine, final Options options, final RPCHook rpcHook) throws SubCommandException { DefaultMQAdminExt defaultMQAdminExt = new DefaultMQAdminExt(rpcHook); defaultMQAdminExt.setInstanceName(Long.toString(System.currentTime...
GetNamesrvConfigCommand implements SubCommand { @Override public void execute(final CommandLine commandLine, final Options options, final RPCHook rpcHook) throws SubCommandException { DefaultMQAdminExt defaultMQAdminExt = new DefaultMQAdminExt(rpcHook); defaultMQAdminExt.setInstanceName(Long.toString(System.currentTime...
GetNamesrvConfigCommand implements SubCommand { @Override public void execute(final CommandLine commandLine, final Options options, final RPCHook rpcHook) throws SubCommandException { DefaultMQAdminExt defaultMQAdminExt = new DefaultMQAdminExt(rpcHook); defaultMQAdminExt.setInstanceName(Long.toString(System.currentTime...
@Test public void testExecute() { UpdateTopicPermSubCommand cmd = new UpdateTopicPermSubCommand(); Options options = ServerUtil.buildCommandlineOptions(new Options()); String[] subargs = new String[] {"-b 127.0.0.1:10911", "-c default-cluster", "-t unit-test", "-p 6"}; final CommandLine commandLine = ServerUtil.parseCm...
@Override public void execute(final CommandLine commandLine, final Options options, RPCHook rpcHook) throws SubCommandException { DefaultMQAdminExt defaultMQAdminExt = new DefaultMQAdminExt(rpcHook); defaultMQAdminExt.setInstanceName(Long.toString(System.currentTimeMillis())); try { defaultMQAdminExt.start(); TopicConf...
UpdateTopicPermSubCommand implements SubCommand { @Override public void execute(final CommandLine commandLine, final Options options, RPCHook rpcHook) throws SubCommandException { DefaultMQAdminExt defaultMQAdminExt = new DefaultMQAdminExt(rpcHook); defaultMQAdminExt.setInstanceName(Long.toString(System.currentTimeMill...
UpdateTopicPermSubCommand implements SubCommand { @Override public void execute(final CommandLine commandLine, final Options options, RPCHook rpcHook) throws SubCommandException { DefaultMQAdminExt defaultMQAdminExt = new DefaultMQAdminExt(rpcHook); defaultMQAdminExt.setInstanceName(Long.toString(System.currentTimeMill...
UpdateTopicPermSubCommand implements SubCommand { @Override public void execute(final CommandLine commandLine, final Options options, RPCHook rpcHook) throws SubCommandException { DefaultMQAdminExt defaultMQAdminExt = new DefaultMQAdminExt(rpcHook); defaultMQAdminExt.setInstanceName(Long.toString(System.currentTimeMill...
UpdateTopicPermSubCommand implements SubCommand { @Override public void execute(final CommandLine commandLine, final Options options, RPCHook rpcHook) throws SubCommandException { DefaultMQAdminExt defaultMQAdminExt = new DefaultMQAdminExt(rpcHook); defaultMQAdminExt.setInstanceName(Long.toString(System.currentTimeMill...
@Test public void testExecute() { UpdateTopicSubCommand cmd = new UpdateTopicSubCommand(); Options options = ServerUtil.buildCommandlineOptions(new Options()); String[] subargs = new String[] { "-b 127.0.0.1:10911", "-c default-cluster", "-t unit-test", "-r 8", "-w 8", "-p 6", "-o false", "-u false", "-s false"}; final...
@Override public void execute(final CommandLine commandLine, final Options options, RPCHook rpcHook) throws SubCommandException { DefaultMQAdminExt defaultMQAdminExt = new DefaultMQAdminExt(rpcHook); defaultMQAdminExt.setInstanceName(Long.toString(System.currentTimeMillis())); try { TopicConfig topicConfig = new TopicC...
UpdateTopicSubCommand implements SubCommand { @Override public void execute(final CommandLine commandLine, final Options options, RPCHook rpcHook) throws SubCommandException { DefaultMQAdminExt defaultMQAdminExt = new DefaultMQAdminExt(rpcHook); defaultMQAdminExt.setInstanceName(Long.toString(System.currentTimeMillis()...
UpdateTopicSubCommand implements SubCommand { @Override public void execute(final CommandLine commandLine, final Options options, RPCHook rpcHook) throws SubCommandException { DefaultMQAdminExt defaultMQAdminExt = new DefaultMQAdminExt(rpcHook); defaultMQAdminExt.setInstanceName(Long.toString(System.currentTimeMillis()...
UpdateTopicSubCommand implements SubCommand { @Override public void execute(final CommandLine commandLine, final Options options, RPCHook rpcHook) throws SubCommandException { DefaultMQAdminExt defaultMQAdminExt = new DefaultMQAdminExt(rpcHook); defaultMQAdminExt.setInstanceName(Long.toString(System.currentTimeMillis()...
UpdateTopicSubCommand implements SubCommand { @Override public void execute(final CommandLine commandLine, final Options options, RPCHook rpcHook) throws SubCommandException { DefaultMQAdminExt defaultMQAdminExt = new DefaultMQAdminExt(rpcHook); defaultMQAdminExt.setInstanceName(Long.toString(System.currentTimeMillis()...
@Test public void testExecute() { TopicRouteSubCommand cmd = new TopicRouteSubCommand(); Options options = ServerUtil.buildCommandlineOptions(new Options()); String[] subargs = new String[] {"-t unit-test"}; final CommandLine commandLine = ServerUtil.parseCmdLine("mqadmin " + cmd.commandName(), subargs, cmd.buildComman...
@Override public void execute(final CommandLine commandLine, final Options options, RPCHook rpcHook) throws SubCommandException { DefaultMQAdminExt defaultMQAdminExt = new DefaultMQAdminExt(rpcHook); defaultMQAdminExt.setInstanceName(Long.toString(System.currentTimeMillis())); try { defaultMQAdminExt.start(); String to...
TopicRouteSubCommand implements SubCommand { @Override public void execute(final CommandLine commandLine, final Options options, RPCHook rpcHook) throws SubCommandException { DefaultMQAdminExt defaultMQAdminExt = new DefaultMQAdminExt(rpcHook); defaultMQAdminExt.setInstanceName(Long.toString(System.currentTimeMillis())...
TopicRouteSubCommand implements SubCommand { @Override public void execute(final CommandLine commandLine, final Options options, RPCHook rpcHook) throws SubCommandException { DefaultMQAdminExt defaultMQAdminExt = new DefaultMQAdminExt(rpcHook); defaultMQAdminExt.setInstanceName(Long.toString(System.currentTimeMillis())...
TopicRouteSubCommand implements SubCommand { @Override public void execute(final CommandLine commandLine, final Options options, RPCHook rpcHook) throws SubCommandException { DefaultMQAdminExt defaultMQAdminExt = new DefaultMQAdminExt(rpcHook); defaultMQAdminExt.setInstanceName(Long.toString(System.currentTimeMillis())...
TopicRouteSubCommand implements SubCommand { @Override public void execute(final CommandLine commandLine, final Options options, RPCHook rpcHook) throws SubCommandException { DefaultMQAdminExt defaultMQAdminExt = new DefaultMQAdminExt(rpcHook); defaultMQAdminExt.setInstanceName(Long.toString(System.currentTimeMillis())...
@Test public void testExecute() { TopicClusterSubCommand cmd = new TopicClusterSubCommand(); Options options = ServerUtil.buildCommandlineOptions(new Options()); String[] subargs = new String[] {"-t unit-test"}; final CommandLine commandLine = ServerUtil.parseCmdLine("mqadmin " + cmd.commandName(), subargs, cmd.buildCo...
@Override public void execute(final CommandLine commandLine, final Options options, RPCHook rpcHook) throws SubCommandException { DefaultMQAdminExt defaultMQAdminExt = new DefaultMQAdminExt(rpcHook); defaultMQAdminExt.setInstanceName(Long.toString(System.currentTimeMillis())); String topic = commandLine.getOptionValue(...
TopicClusterSubCommand implements SubCommand { @Override public void execute(final CommandLine commandLine, final Options options, RPCHook rpcHook) throws SubCommandException { DefaultMQAdminExt defaultMQAdminExt = new DefaultMQAdminExt(rpcHook); defaultMQAdminExt.setInstanceName(Long.toString(System.currentTimeMillis(...
TopicClusterSubCommand implements SubCommand { @Override public void execute(final CommandLine commandLine, final Options options, RPCHook rpcHook) throws SubCommandException { DefaultMQAdminExt defaultMQAdminExt = new DefaultMQAdminExt(rpcHook); defaultMQAdminExt.setInstanceName(Long.toString(System.currentTimeMillis(...
TopicClusterSubCommand implements SubCommand { @Override public void execute(final CommandLine commandLine, final Options options, RPCHook rpcHook) throws SubCommandException { DefaultMQAdminExt defaultMQAdminExt = new DefaultMQAdminExt(rpcHook); defaultMQAdminExt.setInstanceName(Long.toString(System.currentTimeMillis(...
TopicClusterSubCommand implements SubCommand { @Override public void execute(final CommandLine commandLine, final Options options, RPCHook rpcHook) throws SubCommandException { DefaultMQAdminExt defaultMQAdminExt = new DefaultMQAdminExt(rpcHook); defaultMQAdminExt.setInstanceName(Long.toString(System.currentTimeMillis(...
@Test public void testExecute() { TopicStatusSubCommand cmd = new TopicStatusSubCommand(); Options options = ServerUtil.buildCommandlineOptions(new Options()); String[] subargs = new String[] {"-t unit-test"}; final CommandLine commandLine = ServerUtil.parseCmdLine("mqadmin " + cmd.commandName(), subargs, cmd.buildComm...
@Override public void execute(final CommandLine commandLine, final Options options, RPCHook rpcHook) throws SubCommandException { DefaultMQAdminExt defaultMQAdminExt = new DefaultMQAdminExt(rpcHook); defaultMQAdminExt.setInstanceName(Long.toString(System.currentTimeMillis())); try { defaultMQAdminExt.start(); String to...
TopicStatusSubCommand implements SubCommand { @Override public void execute(final CommandLine commandLine, final Options options, RPCHook rpcHook) throws SubCommandException { DefaultMQAdminExt defaultMQAdminExt = new DefaultMQAdminExt(rpcHook); defaultMQAdminExt.setInstanceName(Long.toString(System.currentTimeMillis()...
TopicStatusSubCommand implements SubCommand { @Override public void execute(final CommandLine commandLine, final Options options, RPCHook rpcHook) throws SubCommandException { DefaultMQAdminExt defaultMQAdminExt = new DefaultMQAdminExt(rpcHook); defaultMQAdminExt.setInstanceName(Long.toString(System.currentTimeMillis()...
TopicStatusSubCommand implements SubCommand { @Override public void execute(final CommandLine commandLine, final Options options, RPCHook rpcHook) throws SubCommandException { DefaultMQAdminExt defaultMQAdminExt = new DefaultMQAdminExt(rpcHook); defaultMQAdminExt.setInstanceName(Long.toString(System.currentTimeMillis()...
TopicStatusSubCommand implements SubCommand { @Override public void execute(final CommandLine commandLine, final Options options, RPCHook rpcHook) throws SubCommandException { DefaultMQAdminExt defaultMQAdminExt = new DefaultMQAdminExt(rpcHook); defaultMQAdminExt.setInstanceName(Long.toString(System.currentTimeMillis()...
@Test public void testExecute() { UpdateOrderConfCommand cmd = new UpdateOrderConfCommand(); Options options = ServerUtil.buildCommandlineOptions(new Options()); String[] subargs = new String[] {"-t unit-test", "-v default-broker:8", "-m post"}; final CommandLine commandLine = ServerUtil.parseCmdLine("mqadmin " + cmd.c...
@Override public void execute(final CommandLine commandLine, final Options options, RPCHook rpcHook) throws SubCommandException { DefaultMQAdminExt defaultMQAdminExt = new DefaultMQAdminExt(rpcHook); defaultMQAdminExt.setInstanceName(Long.toString(System.currentTimeMillis())); try { String topic = commandLine.getOption...
UpdateOrderConfCommand implements SubCommand { @Override public void execute(final CommandLine commandLine, final Options options, RPCHook rpcHook) throws SubCommandException { DefaultMQAdminExt defaultMQAdminExt = new DefaultMQAdminExt(rpcHook); defaultMQAdminExt.setInstanceName(Long.toString(System.currentTimeMillis(...
UpdateOrderConfCommand implements SubCommand { @Override public void execute(final CommandLine commandLine, final Options options, RPCHook rpcHook) throws SubCommandException { DefaultMQAdminExt defaultMQAdminExt = new DefaultMQAdminExt(rpcHook); defaultMQAdminExt.setInstanceName(Long.toString(System.currentTimeMillis(...
UpdateOrderConfCommand implements SubCommand { @Override public void execute(final CommandLine commandLine, final Options options, RPCHook rpcHook) throws SubCommandException { DefaultMQAdminExt defaultMQAdminExt = new DefaultMQAdminExt(rpcHook); defaultMQAdminExt.setInstanceName(Long.toString(System.currentTimeMillis(...
UpdateOrderConfCommand implements SubCommand { @Override public void execute(final CommandLine commandLine, final Options options, RPCHook rpcHook) throws SubCommandException { DefaultMQAdminExt defaultMQAdminExt = new DefaultMQAdminExt(rpcHook); defaultMQAdminExt.setInstanceName(Long.toString(System.currentTimeMillis(...
@Test public void testUpdateBrokerConfig() throws InterruptedException, RemotingConnectException, UnsupportedEncodingException, RemotingTimeoutException, MQBrokerException, RemotingSendRequestException { Properties result = defaultMQAdminExt.getBrokerConfig("127.0.0.1:10911"); assertThat(result.getProperty("maxMessageS...
@Override public void updateBrokerConfig(String brokerAddr, Properties properties) throws RemotingConnectException, RemotingSendRequestException, RemotingTimeoutException, UnsupportedEncodingException, InterruptedException, MQBrokerException { defaultMQAdminExtImpl.updateBrokerConfig(brokerAddr, properties); }
DefaultMQAdminExt extends ClientConfig implements MQAdminExt { @Override public void updateBrokerConfig(String brokerAddr, Properties properties) throws RemotingConnectException, RemotingSendRequestException, RemotingTimeoutException, UnsupportedEncodingException, InterruptedException, MQBrokerException { defaultMQAdmi...
DefaultMQAdminExt extends ClientConfig implements MQAdminExt { @Override public void updateBrokerConfig(String brokerAddr, Properties properties) throws RemotingConnectException, RemotingSendRequestException, RemotingTimeoutException, UnsupportedEncodingException, InterruptedException, MQBrokerException { defaultMQAdmi...
DefaultMQAdminExt extends ClientConfig implements MQAdminExt { @Override public void updateBrokerConfig(String brokerAddr, Properties properties) throws RemotingConnectException, RemotingSendRequestException, RemotingTimeoutException, UnsupportedEncodingException, InterruptedException, MQBrokerException { defaultMQAdmi...
DefaultMQAdminExt extends ClientConfig implements MQAdminExt { @Override public void updateBrokerConfig(String brokerAddr, Properties properties) throws RemotingConnectException, RemotingSendRequestException, RemotingTimeoutException, UnsupportedEncodingException, InterruptedException, MQBrokerException { defaultMQAdmi...
@Test public void testFetchAllTopicList() throws RemotingException, MQClientException, InterruptedException { TopicList topicList = defaultMQAdminExt.fetchAllTopicList(); assertThat(topicList.getTopicList().size()).isEqualTo(2); assertThat(topicList.getTopicList()).contains("topic_one"); }
@Override public TopicList fetchAllTopicList() throws RemotingException, MQClientException, InterruptedException { return this.defaultMQAdminExtImpl.fetchAllTopicList(); }
DefaultMQAdminExt extends ClientConfig implements MQAdminExt { @Override public TopicList fetchAllTopicList() throws RemotingException, MQClientException, InterruptedException { return this.defaultMQAdminExtImpl.fetchAllTopicList(); } }
DefaultMQAdminExt extends ClientConfig implements MQAdminExt { @Override public TopicList fetchAllTopicList() throws RemotingException, MQClientException, InterruptedException { return this.defaultMQAdminExtImpl.fetchAllTopicList(); } DefaultMQAdminExt(); DefaultMQAdminExt(long timeoutMillis); DefaultMQAdminExt(RPCHo...
DefaultMQAdminExt extends ClientConfig implements MQAdminExt { @Override public TopicList fetchAllTopicList() throws RemotingException, MQClientException, InterruptedException { return this.defaultMQAdminExtImpl.fetchAllTopicList(); } DefaultMQAdminExt(); DefaultMQAdminExt(long timeoutMillis); DefaultMQAdminExt(RPCHo...
DefaultMQAdminExt extends ClientConfig implements MQAdminExt { @Override public TopicList fetchAllTopicList() throws RemotingException, MQClientException, InterruptedException { return this.defaultMQAdminExtImpl.fetchAllTopicList(); } DefaultMQAdminExt(); DefaultMQAdminExt(long timeoutMillis); DefaultMQAdminExt(RPCHo...
@Test public void testFetchBrokerRuntimeStats() throws InterruptedException, MQBrokerException, RemotingTimeoutException, RemotingSendRequestException, RemotingConnectException { KVTable brokerStats = defaultMQAdminExt.fetchBrokerRuntimeStats("127.0.0.1:10911"); assertThat(brokerStats.getTable().get("id")).isEqualTo("1...
@Override public KVTable fetchBrokerRuntimeStats(final String brokerAddr) throws RemotingConnectException, RemotingSendRequestException, RemotingTimeoutException, InterruptedException, MQBrokerException { return this.defaultMQAdminExtImpl.fetchBrokerRuntimeStats(brokerAddr); }
DefaultMQAdminExt extends ClientConfig implements MQAdminExt { @Override public KVTable fetchBrokerRuntimeStats(final String brokerAddr) throws RemotingConnectException, RemotingSendRequestException, RemotingTimeoutException, InterruptedException, MQBrokerException { return this.defaultMQAdminExtImpl.fetchBrokerRuntime...
DefaultMQAdminExt extends ClientConfig implements MQAdminExt { @Override public KVTable fetchBrokerRuntimeStats(final String brokerAddr) throws RemotingConnectException, RemotingSendRequestException, RemotingTimeoutException, InterruptedException, MQBrokerException { return this.defaultMQAdminExtImpl.fetchBrokerRuntime...
DefaultMQAdminExt extends ClientConfig implements MQAdminExt { @Override public KVTable fetchBrokerRuntimeStats(final String brokerAddr) throws RemotingConnectException, RemotingSendRequestException, RemotingTimeoutException, InterruptedException, MQBrokerException { return this.defaultMQAdminExtImpl.fetchBrokerRuntime...
DefaultMQAdminExt extends ClientConfig implements MQAdminExt { @Override public KVTable fetchBrokerRuntimeStats(final String brokerAddr) throws RemotingConnectException, RemotingSendRequestException, RemotingTimeoutException, InterruptedException, MQBrokerException { return this.defaultMQAdminExtImpl.fetchBrokerRuntime...
@Test public void testExamineBrokerClusterInfo() throws InterruptedException, MQBrokerException, RemotingTimeoutException, RemotingSendRequestException, RemotingConnectException { ClusterInfo clusterInfo = defaultMQAdminExt.examineBrokerClusterInfo(); HashMap<String, BrokerData> brokerList = clusterInfo.getBrokerAddrTa...
@Override public ClusterInfo examineBrokerClusterInfo() throws InterruptedException, RemotingConnectException, RemotingTimeoutException, RemotingSendRequestException, MQBrokerException { return defaultMQAdminExtImpl.examineBrokerClusterInfo(); }
DefaultMQAdminExt extends ClientConfig implements MQAdminExt { @Override public ClusterInfo examineBrokerClusterInfo() throws InterruptedException, RemotingConnectException, RemotingTimeoutException, RemotingSendRequestException, MQBrokerException { return defaultMQAdminExtImpl.examineBrokerClusterInfo(); } }
DefaultMQAdminExt extends ClientConfig implements MQAdminExt { @Override public ClusterInfo examineBrokerClusterInfo() throws InterruptedException, RemotingConnectException, RemotingTimeoutException, RemotingSendRequestException, MQBrokerException { return defaultMQAdminExtImpl.examineBrokerClusterInfo(); } DefaultMQAd...
DefaultMQAdminExt extends ClientConfig implements MQAdminExt { @Override public ClusterInfo examineBrokerClusterInfo() throws InterruptedException, RemotingConnectException, RemotingTimeoutException, RemotingSendRequestException, MQBrokerException { return defaultMQAdminExtImpl.examineBrokerClusterInfo(); } DefaultMQAd...
DefaultMQAdminExt extends ClientConfig implements MQAdminExt { @Override public ClusterInfo examineBrokerClusterInfo() throws InterruptedException, RemotingConnectException, RemotingTimeoutException, RemotingSendRequestException, MQBrokerException { return defaultMQAdminExtImpl.examineBrokerClusterInfo(); } DefaultMQAd...
@Test public void testExamineConsumeStats() throws InterruptedException, RemotingException, MQClientException, MQBrokerException { ConsumeStats consumeStats = defaultMQAdminExt.examineConsumeStats("default-consumer-group", "unit-test"); assertThat(consumeStats.getConsumeTps()).isEqualTo(1234); }
@Override public ConsumeStats examineConsumeStats(String consumerGroup) throws RemotingException, MQClientException, InterruptedException, MQBrokerException { return examineConsumeStats(consumerGroup, null); }
DefaultMQAdminExt extends ClientConfig implements MQAdminExt { @Override public ConsumeStats examineConsumeStats(String consumerGroup) throws RemotingException, MQClientException, InterruptedException, MQBrokerException { return examineConsumeStats(consumerGroup, null); } }
DefaultMQAdminExt extends ClientConfig implements MQAdminExt { @Override public ConsumeStats examineConsumeStats(String consumerGroup) throws RemotingException, MQClientException, InterruptedException, MQBrokerException { return examineConsumeStats(consumerGroup, null); } DefaultMQAdminExt(); DefaultMQAdminExt(long ti...
DefaultMQAdminExt extends ClientConfig implements MQAdminExt { @Override public ConsumeStats examineConsumeStats(String consumerGroup) throws RemotingException, MQClientException, InterruptedException, MQBrokerException { return examineConsumeStats(consumerGroup, null); } DefaultMQAdminExt(); DefaultMQAdminExt(long ti...
DefaultMQAdminExt extends ClientConfig implements MQAdminExt { @Override public ConsumeStats examineConsumeStats(String consumerGroup) throws RemotingException, MQClientException, InterruptedException, MQBrokerException { return examineConsumeStats(consumerGroup, null); } DefaultMQAdminExt(); DefaultMQAdminExt(long ti...
@Test public void testExamineConsumerConnectionInfo() throws InterruptedException, RemotingException, MQClientException, MQBrokerException { ConsumerConnection consumerConnection = defaultMQAdminExt.examineConsumerConnectionInfo("default-consumer-group"); assertThat(consumerConnection.getConsumeType()).isEqualTo(Consum...
@Override public ConsumerConnection examineConsumerConnectionInfo(String consumerGroup) throws InterruptedException, MQBrokerException, RemotingException, MQClientException { return defaultMQAdminExtImpl.examineConsumerConnectionInfo(consumerGroup); }
DefaultMQAdminExt extends ClientConfig implements MQAdminExt { @Override public ConsumerConnection examineConsumerConnectionInfo(String consumerGroup) throws InterruptedException, MQBrokerException, RemotingException, MQClientException { return defaultMQAdminExtImpl.examineConsumerConnectionInfo(consumerGroup); } }
DefaultMQAdminExt extends ClientConfig implements MQAdminExt { @Override public ConsumerConnection examineConsumerConnectionInfo(String consumerGroup) throws InterruptedException, MQBrokerException, RemotingException, MQClientException { return defaultMQAdminExtImpl.examineConsumerConnectionInfo(consumerGroup); } Defau...
DefaultMQAdminExt extends ClientConfig implements MQAdminExt { @Override public ConsumerConnection examineConsumerConnectionInfo(String consumerGroup) throws InterruptedException, MQBrokerException, RemotingException, MQClientException { return defaultMQAdminExtImpl.examineConsumerConnectionInfo(consumerGroup); } Defau...
DefaultMQAdminExt extends ClientConfig implements MQAdminExt { @Override public ConsumerConnection examineConsumerConnectionInfo(String consumerGroup) throws InterruptedException, MQBrokerException, RemotingException, MQClientException { return defaultMQAdminExtImpl.examineConsumerConnectionInfo(consumerGroup); } Defau...
@Test public void testExamineProducerConnectionInfo() throws InterruptedException, RemotingException, MQClientException, MQBrokerException { ProducerConnection producerConnection = defaultMQAdminExt.examineProducerConnectionInfo("default-producer-group", "unit-test"); assertThat(producerConnection.getConnectionSet().si...
@Override public ProducerConnection examineProducerConnectionInfo(String producerGroup, final String topic) throws RemotingException, MQClientException, InterruptedException, MQBrokerException { return defaultMQAdminExtImpl.examineProducerConnectionInfo(producerGroup, topic); }
DefaultMQAdminExt extends ClientConfig implements MQAdminExt { @Override public ProducerConnection examineProducerConnectionInfo(String producerGroup, final String topic) throws RemotingException, MQClientException, InterruptedException, MQBrokerException { return defaultMQAdminExtImpl.examineProducerConnectionInfo(pro...
DefaultMQAdminExt extends ClientConfig implements MQAdminExt { @Override public ProducerConnection examineProducerConnectionInfo(String producerGroup, final String topic) throws RemotingException, MQClientException, InterruptedException, MQBrokerException { return defaultMQAdminExtImpl.examineProducerConnectionInfo(pro...
DefaultMQAdminExt extends ClientConfig implements MQAdminExt { @Override public ProducerConnection examineProducerConnectionInfo(String producerGroup, final String topic) throws RemotingException, MQClientException, InterruptedException, MQBrokerException { return defaultMQAdminExtImpl.examineProducerConnectionInfo(pro...
DefaultMQAdminExt extends ClientConfig implements MQAdminExt { @Override public ProducerConnection examineProducerConnectionInfo(String producerGroup, final String topic) throws RemotingException, MQClientException, InterruptedException, MQBrokerException { return defaultMQAdminExtImpl.examineProducerConnectionInfo(pro...
@Test public void testWipeWritePermOfBroker() throws InterruptedException, RemotingCommandException, RemotingSendRequestException, RemotingTimeoutException, MQClientException, RemotingConnectException { int result = defaultMQAdminExt.wipeWritePermOfBroker("127.0.0.1:9876", "default-broker"); assertThat(result).isEqualT...
@Override public int wipeWritePermOfBroker(final String namesrvAddr, String brokerName) throws RemotingCommandException, RemotingConnectException, RemotingSendRequestException, RemotingTimeoutException, InterruptedException, MQClientException { return defaultMQAdminExtImpl.wipeWritePermOfBroker(namesrvAddr, brokerName)...
DefaultMQAdminExt extends ClientConfig implements MQAdminExt { @Override public int wipeWritePermOfBroker(final String namesrvAddr, String brokerName) throws RemotingCommandException, RemotingConnectException, RemotingSendRequestException, RemotingTimeoutException, InterruptedException, MQClientException { return defau...
DefaultMQAdminExt extends ClientConfig implements MQAdminExt { @Override public int wipeWritePermOfBroker(final String namesrvAddr, String brokerName) throws RemotingCommandException, RemotingConnectException, RemotingSendRequestException, RemotingTimeoutException, InterruptedException, MQClientException { return defau...
DefaultMQAdminExt extends ClientConfig implements MQAdminExt { @Override public int wipeWritePermOfBroker(final String namesrvAddr, String brokerName) throws RemotingCommandException, RemotingConnectException, RemotingSendRequestException, RemotingTimeoutException, InterruptedException, MQClientException { return defau...
DefaultMQAdminExt extends ClientConfig implements MQAdminExt { @Override public int wipeWritePermOfBroker(final String namesrvAddr, String brokerName) throws RemotingCommandException, RemotingConnectException, RemotingSendRequestException, RemotingTimeoutException, InterruptedException, MQClientException { return defau...
@Test public void testExamineTopicRouteInfo() throws RemotingException, MQClientException, InterruptedException { TopicRouteData topicRouteData = defaultMQAdminExt.examineTopicRouteInfo("UnitTest"); assertThat(topicRouteData.getBrokerDatas().get(0).getBrokerName()).isEqualTo("default-broker"); assertThat(topicRouteData...
@Override public TopicRouteData examineTopicRouteInfo(String topic) throws RemotingException, MQClientException, InterruptedException { return defaultMQAdminExtImpl.examineTopicRouteInfo(topic); }
DefaultMQAdminExt extends ClientConfig implements MQAdminExt { @Override public TopicRouteData examineTopicRouteInfo(String topic) throws RemotingException, MQClientException, InterruptedException { return defaultMQAdminExtImpl.examineTopicRouteInfo(topic); } }
DefaultMQAdminExt extends ClientConfig implements MQAdminExt { @Override public TopicRouteData examineTopicRouteInfo(String topic) throws RemotingException, MQClientException, InterruptedException { return defaultMQAdminExtImpl.examineTopicRouteInfo(topic); } DefaultMQAdminExt(); DefaultMQAdminExt(long timeoutMillis);...
DefaultMQAdminExt extends ClientConfig implements MQAdminExt { @Override public TopicRouteData examineTopicRouteInfo(String topic) throws RemotingException, MQClientException, InterruptedException { return defaultMQAdminExtImpl.examineTopicRouteInfo(topic); } DefaultMQAdminExt(); DefaultMQAdminExt(long timeoutMillis);...
DefaultMQAdminExt extends ClientConfig implements MQAdminExt { @Override public TopicRouteData examineTopicRouteInfo(String topic) throws RemotingException, MQClientException, InterruptedException { return defaultMQAdminExtImpl.examineTopicRouteInfo(topic); } DefaultMQAdminExt(); DefaultMQAdminExt(long timeoutMillis);...
@Test public void testGetNameServerAddressList() { List<String> result = new ArrayList<>(); result.add("default-name-one"); result.add("default-name-two"); when(mqClientInstance.getMQClientAPIImpl().getNameServerAddressList()).thenReturn(result); List<String> nameList = defaultMQAdminExt.getNameServerAddressList(); ass...
@Override public List<String> getNameServerAddressList() { return this.defaultMQAdminExtImpl.getNameServerAddressList(); }
DefaultMQAdminExt extends ClientConfig implements MQAdminExt { @Override public List<String> getNameServerAddressList() { return this.defaultMQAdminExtImpl.getNameServerAddressList(); } }
DefaultMQAdminExt extends ClientConfig implements MQAdminExt { @Override public List<String> getNameServerAddressList() { return this.defaultMQAdminExtImpl.getNameServerAddressList(); } DefaultMQAdminExt(); DefaultMQAdminExt(long timeoutMillis); DefaultMQAdminExt(RPCHook rpcHook); DefaultMQAdminExt(RPCHook rpcHook, ...
DefaultMQAdminExt extends ClientConfig implements MQAdminExt { @Override public List<String> getNameServerAddressList() { return this.defaultMQAdminExtImpl.getNameServerAddressList(); } DefaultMQAdminExt(); DefaultMQAdminExt(long timeoutMillis); DefaultMQAdminExt(RPCHook rpcHook); DefaultMQAdminExt(RPCHook rpcHook, ...
DefaultMQAdminExt extends ClientConfig implements MQAdminExt { @Override public List<String> getNameServerAddressList() { return this.defaultMQAdminExtImpl.getNameServerAddressList(); } DefaultMQAdminExt(); DefaultMQAdminExt(long timeoutMillis); DefaultMQAdminExt(RPCHook rpcHook); DefaultMQAdminExt(RPCHook rpcHook, ...
@Test public void testPutKVConfig() throws RemotingException, MQClientException, InterruptedException { String topicConfig = defaultMQAdminExt.getKVConfig(NamesrvUtil.NAMESPACE_ORDER_TOPIC_CONFIG, "UnitTest"); assertThat(topicConfig).isEqualTo("topicListConfig"); KVTable kvs = defaultMQAdminExt.getKVListByNamespace(Nam...
@Override public void putKVConfig(String namespace, String key, String value) { defaultMQAdminExtImpl.putKVConfig(namespace, key, value); }
DefaultMQAdminExt extends ClientConfig implements MQAdminExt { @Override public void putKVConfig(String namespace, String key, String value) { defaultMQAdminExtImpl.putKVConfig(namespace, key, value); } }
DefaultMQAdminExt extends ClientConfig implements MQAdminExt { @Override public void putKVConfig(String namespace, String key, String value) { defaultMQAdminExtImpl.putKVConfig(namespace, key, value); } DefaultMQAdminExt(); DefaultMQAdminExt(long timeoutMillis); DefaultMQAdminExt(RPCHook rpcHook); DefaultMQAdminExt(...
DefaultMQAdminExt extends ClientConfig implements MQAdminExt { @Override public void putKVConfig(String namespace, String key, String value) { defaultMQAdminExtImpl.putKVConfig(namespace, key, value); } DefaultMQAdminExt(); DefaultMQAdminExt(long timeoutMillis); DefaultMQAdminExt(RPCHook rpcHook); DefaultMQAdminExt(...
DefaultMQAdminExt extends ClientConfig implements MQAdminExt { @Override public void putKVConfig(String namespace, String key, String value) { defaultMQAdminExtImpl.putKVConfig(namespace, key, value); } DefaultMQAdminExt(); DefaultMQAdminExt(long timeoutMillis); DefaultMQAdminExt(RPCHook rpcHook); DefaultMQAdminExt(...
@Test public void testQueryTopicConsumeByWho() throws InterruptedException, RemotingException, MQClientException, MQBrokerException { GroupList groupList = defaultMQAdminExt.queryTopicConsumeByWho("UnitTest"); assertThat(groupList.getGroupList().contains("consumer-group-two")).isTrue(); }
@Override public GroupList queryTopicConsumeByWho(String topic) throws InterruptedException, MQBrokerException, RemotingException, MQClientException { return this.defaultMQAdminExtImpl.queryTopicConsumeByWho(topic); }
DefaultMQAdminExt extends ClientConfig implements MQAdminExt { @Override public GroupList queryTopicConsumeByWho(String topic) throws InterruptedException, MQBrokerException, RemotingException, MQClientException { return this.defaultMQAdminExtImpl.queryTopicConsumeByWho(topic); } }
DefaultMQAdminExt extends ClientConfig implements MQAdminExt { @Override public GroupList queryTopicConsumeByWho(String topic) throws InterruptedException, MQBrokerException, RemotingException, MQClientException { return this.defaultMQAdminExtImpl.queryTopicConsumeByWho(topic); } DefaultMQAdminExt(); DefaultMQAdminExt...
DefaultMQAdminExt extends ClientConfig implements MQAdminExt { @Override public GroupList queryTopicConsumeByWho(String topic) throws InterruptedException, MQBrokerException, RemotingException, MQClientException { return this.defaultMQAdminExtImpl.queryTopicConsumeByWho(topic); } DefaultMQAdminExt(); DefaultMQAdminExt...
DefaultMQAdminExt extends ClientConfig implements MQAdminExt { @Override public GroupList queryTopicConsumeByWho(String topic) throws InterruptedException, MQBrokerException, RemotingException, MQClientException { return this.defaultMQAdminExtImpl.queryTopicConsumeByWho(topic); } DefaultMQAdminExt(); DefaultMQAdminExt...
@Test public void testQueryConsumeTimeSpan() throws InterruptedException, RemotingException, MQClientException, MQBrokerException { List<QueueTimeSpan> result = defaultMQAdminExt.queryConsumeTimeSpan("unit-test", "default-broker-group"); assertThat(result.size()).isEqualTo(0); }
@Override public List<QueueTimeSpan> queryConsumeTimeSpan(final String topic, final String group) throws InterruptedException, MQBrokerException, RemotingException, MQClientException { return this.defaultMQAdminExtImpl.queryConsumeTimeSpan(topic, group); }
DefaultMQAdminExt extends ClientConfig implements MQAdminExt { @Override public List<QueueTimeSpan> queryConsumeTimeSpan(final String topic, final String group) throws InterruptedException, MQBrokerException, RemotingException, MQClientException { return this.defaultMQAdminExtImpl.queryConsumeTimeSpan(topic, group); } ...
DefaultMQAdminExt extends ClientConfig implements MQAdminExt { @Override public List<QueueTimeSpan> queryConsumeTimeSpan(final String topic, final String group) throws InterruptedException, MQBrokerException, RemotingException, MQClientException { return this.defaultMQAdminExtImpl.queryConsumeTimeSpan(topic, group); } ...
DefaultMQAdminExt extends ClientConfig implements MQAdminExt { @Override public List<QueueTimeSpan> queryConsumeTimeSpan(final String topic, final String group) throws InterruptedException, MQBrokerException, RemotingException, MQClientException { return this.defaultMQAdminExtImpl.queryConsumeTimeSpan(topic, group); } ...
DefaultMQAdminExt extends ClientConfig implements MQAdminExt { @Override public List<QueueTimeSpan> queryConsumeTimeSpan(final String topic, final String group) throws InterruptedException, MQBrokerException, RemotingException, MQClientException { return this.defaultMQAdminExtImpl.queryConsumeTimeSpan(topic, group); } ...
@Test public void testCleanExpiredConsumerQueue() throws InterruptedException, RemotingTimeoutException, MQClientException, RemotingSendRequestException, RemotingConnectException { boolean result = defaultMQAdminExt.cleanExpiredConsumerQueue("default-cluster"); assertThat(result).isFalse(); }
@Override public boolean cleanExpiredConsumerQueue(String cluster) throws RemotingConnectException, RemotingSendRequestException, RemotingTimeoutException, MQClientException, InterruptedException { return defaultMQAdminExtImpl.cleanExpiredConsumerQueue(cluster); }
DefaultMQAdminExt extends ClientConfig implements MQAdminExt { @Override public boolean cleanExpiredConsumerQueue(String cluster) throws RemotingConnectException, RemotingSendRequestException, RemotingTimeoutException, MQClientException, InterruptedException { return defaultMQAdminExtImpl.cleanExpiredConsumerQueue(clus...
DefaultMQAdminExt extends ClientConfig implements MQAdminExt { @Override public boolean cleanExpiredConsumerQueue(String cluster) throws RemotingConnectException, RemotingSendRequestException, RemotingTimeoutException, MQClientException, InterruptedException { return defaultMQAdminExtImpl.cleanExpiredConsumerQueue(clus...
DefaultMQAdminExt extends ClientConfig implements MQAdminExt { @Override public boolean cleanExpiredConsumerQueue(String cluster) throws RemotingConnectException, RemotingSendRequestException, RemotingTimeoutException, MQClientException, InterruptedException { return defaultMQAdminExtImpl.cleanExpiredConsumerQueue(clus...
DefaultMQAdminExt extends ClientConfig implements MQAdminExt { @Override public boolean cleanExpiredConsumerQueue(String cluster) throws RemotingConnectException, RemotingSendRequestException, RemotingTimeoutException, MQClientException, InterruptedException { return defaultMQAdminExtImpl.cleanExpiredConsumerQueue(clus...
@Test public void testCleanExpiredConsumerQueueByAddr() throws InterruptedException, RemotingTimeoutException, MQClientException, RemotingSendRequestException, RemotingConnectException { boolean clean = defaultMQAdminExt.cleanExpiredConsumerQueueByAddr("127.0.0.1:10911"); assertThat(clean).isTrue(); }
@Override public boolean cleanExpiredConsumerQueueByAddr(String addr) throws RemotingConnectException, RemotingSendRequestException, RemotingTimeoutException, MQClientException, InterruptedException { return defaultMQAdminExtImpl.cleanExpiredConsumerQueueByAddr(addr); }
DefaultMQAdminExt extends ClientConfig implements MQAdminExt { @Override public boolean cleanExpiredConsumerQueueByAddr(String addr) throws RemotingConnectException, RemotingSendRequestException, RemotingTimeoutException, MQClientException, InterruptedException { return defaultMQAdminExtImpl.cleanExpiredConsumerQueueBy...
DefaultMQAdminExt extends ClientConfig implements MQAdminExt { @Override public boolean cleanExpiredConsumerQueueByAddr(String addr) throws RemotingConnectException, RemotingSendRequestException, RemotingTimeoutException, MQClientException, InterruptedException { return defaultMQAdminExtImpl.cleanExpiredConsumerQueueBy...
DefaultMQAdminExt extends ClientConfig implements MQAdminExt { @Override public boolean cleanExpiredConsumerQueueByAddr(String addr) throws RemotingConnectException, RemotingSendRequestException, RemotingTimeoutException, MQClientException, InterruptedException { return defaultMQAdminExtImpl.cleanExpiredConsumerQueueBy...
DefaultMQAdminExt extends ClientConfig implements MQAdminExt { @Override public boolean cleanExpiredConsumerQueueByAddr(String addr) throws RemotingConnectException, RemotingSendRequestException, RemotingTimeoutException, MQClientException, InterruptedException { return defaultMQAdminExtImpl.cleanExpiredConsumerQueueBy...
@Test public void testCleanUnusedTopic() throws InterruptedException, RemotingTimeoutException, MQClientException, RemotingSendRequestException, RemotingConnectException { boolean result = defaultMQAdminExt.cleanUnusedTopic("default-cluster"); assertThat(result).isFalse(); }
@Override public boolean cleanUnusedTopic(String cluster) throws RemotingConnectException, RemotingSendRequestException, RemotingTimeoutException, MQClientException, InterruptedException { return defaultMQAdminExtImpl.cleanUnusedTopicByAddr(cluster); }
DefaultMQAdminExt extends ClientConfig implements MQAdminExt { @Override public boolean cleanUnusedTopic(String cluster) throws RemotingConnectException, RemotingSendRequestException, RemotingTimeoutException, MQClientException, InterruptedException { return defaultMQAdminExtImpl.cleanUnusedTopicByAddr(cluster); } }
DefaultMQAdminExt extends ClientConfig implements MQAdminExt { @Override public boolean cleanUnusedTopic(String cluster) throws RemotingConnectException, RemotingSendRequestException, RemotingTimeoutException, MQClientException, InterruptedException { return defaultMQAdminExtImpl.cleanUnusedTopicByAddr(cluster); } Defa...
DefaultMQAdminExt extends ClientConfig implements MQAdminExt { @Override public boolean cleanUnusedTopic(String cluster) throws RemotingConnectException, RemotingSendRequestException, RemotingTimeoutException, MQClientException, InterruptedException { return defaultMQAdminExtImpl.cleanUnusedTopicByAddr(cluster); } Defa...
DefaultMQAdminExt extends ClientConfig implements MQAdminExt { @Override public boolean cleanUnusedTopic(String cluster) throws RemotingConnectException, RemotingSendRequestException, RemotingTimeoutException, MQClientException, InterruptedException { return defaultMQAdminExtImpl.cleanUnusedTopicByAddr(cluster); } Defa...
@Test public void testGetConsumerRunningInfo() throws RemotingException, MQClientException, InterruptedException { ConsumerRunningInfo consumerRunningInfo = defaultMQAdminExt.getConsumerRunningInfo("consumer-group", "cid_123", false); assertThat(consumerRunningInfo.getJstack()).isEqualTo("test"); }
@Override public ConsumerRunningInfo getConsumerRunningInfo(String consumerGroup, String clientId, boolean jstack) throws RemotingException, MQClientException, InterruptedException { return defaultMQAdminExtImpl.getConsumerRunningInfo(consumerGroup, clientId, jstack); }
DefaultMQAdminExt extends ClientConfig implements MQAdminExt { @Override public ConsumerRunningInfo getConsumerRunningInfo(String consumerGroup, String clientId, boolean jstack) throws RemotingException, MQClientException, InterruptedException { return defaultMQAdminExtImpl.getConsumerRunningInfo(consumerGroup, clientI...
DefaultMQAdminExt extends ClientConfig implements MQAdminExt { @Override public ConsumerRunningInfo getConsumerRunningInfo(String consumerGroup, String clientId, boolean jstack) throws RemotingException, MQClientException, InterruptedException { return defaultMQAdminExtImpl.getConsumerRunningInfo(consumerGroup, clientI...
DefaultMQAdminExt extends ClientConfig implements MQAdminExt { @Override public ConsumerRunningInfo getConsumerRunningInfo(String consumerGroup, String clientId, boolean jstack) throws RemotingException, MQClientException, InterruptedException { return defaultMQAdminExtImpl.getConsumerRunningInfo(consumerGroup, clientI...
DefaultMQAdminExt extends ClientConfig implements MQAdminExt { @Override public ConsumerRunningInfo getConsumerRunningInfo(String consumerGroup, String clientId, boolean jstack) throws RemotingException, MQClientException, InterruptedException { return defaultMQAdminExtImpl.getConsumerRunningInfo(consumerGroup, clientI...
@Test public void testMessageTrackDetail() throws InterruptedException, RemotingException, MQClientException, MQBrokerException { MessageExt messageExt = new MessageExt(); messageExt.setMsgId("msgId"); messageExt.setTopic("unit-test"); List<MessageTrack> messageTrackList = defaultMQAdminExt.messageTrackDetail(messageEx...
@Override public List<MessageTrack> messageTrackDetail(MessageExt msg) throws RemotingException, MQClientException, InterruptedException, MQBrokerException { return this.defaultMQAdminExtImpl.messageTrackDetail(msg); }
DefaultMQAdminExt extends ClientConfig implements MQAdminExt { @Override public List<MessageTrack> messageTrackDetail(MessageExt msg) throws RemotingException, MQClientException, InterruptedException, MQBrokerException { return this.defaultMQAdminExtImpl.messageTrackDetail(msg); } }
DefaultMQAdminExt extends ClientConfig implements MQAdminExt { @Override public List<MessageTrack> messageTrackDetail(MessageExt msg) throws RemotingException, MQClientException, InterruptedException, MQBrokerException { return this.defaultMQAdminExtImpl.messageTrackDetail(msg); } DefaultMQAdminExt(); DefaultMQAdminEx...
DefaultMQAdminExt extends ClientConfig implements MQAdminExt { @Override public List<MessageTrack> messageTrackDetail(MessageExt msg) throws RemotingException, MQClientException, InterruptedException, MQBrokerException { return this.defaultMQAdminExtImpl.messageTrackDetail(msg); } DefaultMQAdminExt(); DefaultMQAdminEx...
DefaultMQAdminExt extends ClientConfig implements MQAdminExt { @Override public List<MessageTrack> messageTrackDetail(MessageExt msg) throws RemotingException, MQClientException, InterruptedException, MQBrokerException { return this.defaultMQAdminExtImpl.messageTrackDetail(msg); } DefaultMQAdminExt(); DefaultMQAdminEx...
@Test public void testGetConsumeStatus() throws InterruptedException, RemotingException, MQClientException, MQBrokerException { Map<String, Map<MessageQueue, Long>> result = defaultMQAdminExt.getConsumeStatus("unit-test", "default-broker-group", "127.0.0.1:10911"); assertThat(result.size()).isEqualTo(0); }
@Override public Map<String, Map<MessageQueue, Long>> getConsumeStatus(String topic, String group, String clientAddr) throws RemotingException, MQBrokerException, InterruptedException, MQClientException { return defaultMQAdminExtImpl.getConsumeStatus(topic, group, clientAddr); }
DefaultMQAdminExt extends ClientConfig implements MQAdminExt { @Override public Map<String, Map<MessageQueue, Long>> getConsumeStatus(String topic, String group, String clientAddr) throws RemotingException, MQBrokerException, InterruptedException, MQClientException { return defaultMQAdminExtImpl.getConsumeStatus(topic,...
DefaultMQAdminExt extends ClientConfig implements MQAdminExt { @Override public Map<String, Map<MessageQueue, Long>> getConsumeStatus(String topic, String group, String clientAddr) throws RemotingException, MQBrokerException, InterruptedException, MQClientException { return defaultMQAdminExtImpl.getConsumeStatus(topic,...
DefaultMQAdminExt extends ClientConfig implements MQAdminExt { @Override public Map<String, Map<MessageQueue, Long>> getConsumeStatus(String topic, String group, String clientAddr) throws RemotingException, MQBrokerException, InterruptedException, MQClientException { return defaultMQAdminExtImpl.getConsumeStatus(topic,...
DefaultMQAdminExt extends ClientConfig implements MQAdminExt { @Override public Map<String, Map<MessageQueue, Long>> getConsumeStatus(String topic, String group, String clientAddr) throws RemotingException, MQBrokerException, InterruptedException, MQClientException { return defaultMQAdminExtImpl.getConsumeStatus(topic,...
@Test public void testGetTopicClusterList() throws InterruptedException, RemotingException, MQClientException, MQBrokerException { Set<String> result = defaultMQAdminExt.getTopicClusterList("unit-test"); assertThat(result.size()).isEqualTo(0); }
@Override public Set<String> getTopicClusterList(final String topic) throws InterruptedException, MQBrokerException, MQClientException, RemotingException { return this.defaultMQAdminExtImpl.getTopicClusterList(topic); }
DefaultMQAdminExt extends ClientConfig implements MQAdminExt { @Override public Set<String> getTopicClusterList(final String topic) throws InterruptedException, MQBrokerException, MQClientException, RemotingException { return this.defaultMQAdminExtImpl.getTopicClusterList(topic); } }
DefaultMQAdminExt extends ClientConfig implements MQAdminExt { @Override public Set<String> getTopicClusterList(final String topic) throws InterruptedException, MQBrokerException, MQClientException, RemotingException { return this.defaultMQAdminExtImpl.getTopicClusterList(topic); } DefaultMQAdminExt(); DefaultMQAdminE...
DefaultMQAdminExt extends ClientConfig implements MQAdminExt { @Override public Set<String> getTopicClusterList(final String topic) throws InterruptedException, MQBrokerException, MQClientException, RemotingException { return this.defaultMQAdminExtImpl.getTopicClusterList(topic); } DefaultMQAdminExt(); DefaultMQAdminE...
DefaultMQAdminExt extends ClientConfig implements MQAdminExt { @Override public Set<String> getTopicClusterList(final String topic) throws InterruptedException, MQBrokerException, MQClientException, RemotingException { return this.defaultMQAdminExtImpl.getTopicClusterList(topic); } DefaultMQAdminExt(); DefaultMQAdminE...
@Test public void testGetClusterList() throws InterruptedException, RemotingTimeoutException, MQClientException, RemotingSendRequestException, RemotingConnectException { Set<String> clusterlist = defaultMQAdminExt.getClusterList("UnitTest"); assertThat(clusterlist.contains("default-cluster-one")).isTrue(); assertThat(c...
@Override public Set<String> getClusterList(String topic) throws RemotingConnectException, RemotingSendRequestException, RemotingTimeoutException, MQClientException, InterruptedException { return this.defaultMQAdminExtImpl.getClusterList(topic); }
DefaultMQAdminExt extends ClientConfig implements MQAdminExt { @Override public Set<String> getClusterList(String topic) throws RemotingConnectException, RemotingSendRequestException, RemotingTimeoutException, MQClientException, InterruptedException { return this.defaultMQAdminExtImpl.getClusterList(topic); } }
DefaultMQAdminExt extends ClientConfig implements MQAdminExt { @Override public Set<String> getClusterList(String topic) throws RemotingConnectException, RemotingSendRequestException, RemotingTimeoutException, MQClientException, InterruptedException { return this.defaultMQAdminExtImpl.getClusterList(topic); } DefaultMQ...
DefaultMQAdminExt extends ClientConfig implements MQAdminExt { @Override public Set<String> getClusterList(String topic) throws RemotingConnectException, RemotingSendRequestException, RemotingTimeoutException, MQClientException, InterruptedException { return this.defaultMQAdminExtImpl.getClusterList(topic); } DefaultMQ...
DefaultMQAdminExt extends ClientConfig implements MQAdminExt { @Override public Set<String> getClusterList(String topic) throws RemotingConnectException, RemotingSendRequestException, RemotingTimeoutException, MQClientException, InterruptedException { return this.defaultMQAdminExtImpl.getClusterList(topic); } DefaultMQ...
@Test public void testFetchConsumeStatsInBroker() throws InterruptedException, RemotingTimeoutException, MQClientException, RemotingSendRequestException, RemotingConnectException { ConsumeStatsList result = new ConsumeStatsList(); result.setBrokerAddr("127.0.0.1:10911"); when(mqClientInstance.getMQClientAPIImpl().fetch...
@Override public ConsumeStatsList fetchConsumeStatsInBroker(final String brokerAddr, boolean isOrder, long timeoutMillis) throws RemotingConnectException, RemotingSendRequestException, RemotingTimeoutException, MQClientException, InterruptedException { return this.defaultMQAdminExtImpl.fetchConsumeStatsInBroker(brokerA...
DefaultMQAdminExt extends ClientConfig implements MQAdminExt { @Override public ConsumeStatsList fetchConsumeStatsInBroker(final String brokerAddr, boolean isOrder, long timeoutMillis) throws RemotingConnectException, RemotingSendRequestException, RemotingTimeoutException, MQClientException, InterruptedException { retu...
DefaultMQAdminExt extends ClientConfig implements MQAdminExt { @Override public ConsumeStatsList fetchConsumeStatsInBroker(final String brokerAddr, boolean isOrder, long timeoutMillis) throws RemotingConnectException, RemotingSendRequestException, RemotingTimeoutException, MQClientException, InterruptedException { retu...
DefaultMQAdminExt extends ClientConfig implements MQAdminExt { @Override public ConsumeStatsList fetchConsumeStatsInBroker(final String brokerAddr, boolean isOrder, long timeoutMillis) throws RemotingConnectException, RemotingSendRequestException, RemotingTimeoutException, MQClientException, InterruptedException { retu...
DefaultMQAdminExt extends ClientConfig implements MQAdminExt { @Override public ConsumeStatsList fetchConsumeStatsInBroker(final String brokerAddr, boolean isOrder, long timeoutMillis) throws RemotingConnectException, RemotingSendRequestException, RemotingTimeoutException, MQClientException, InterruptedException { retu...
@Test public void testGetAllSubscriptionGroup() throws InterruptedException, MQBrokerException, RemotingTimeoutException, RemotingSendRequestException, RemotingConnectException { SubscriptionGroupWrapper subscriptionGroupWrapper = defaultMQAdminExt.getAllSubscriptionGroup("127.0.0.1:10911", 10000); assertThat(subscript...
@Override public SubscriptionGroupWrapper getAllSubscriptionGroup(final String brokerAddr, long timeoutMillis) throws InterruptedException, RemotingTimeoutException, RemotingSendRequestException, RemotingConnectException, MQBrokerException { return this.defaultMQAdminExtImpl.getAllSubscriptionGroup(brokerAddr, timeoutM...
DefaultMQAdminExt extends ClientConfig implements MQAdminExt { @Override public SubscriptionGroupWrapper getAllSubscriptionGroup(final String brokerAddr, long timeoutMillis) throws InterruptedException, RemotingTimeoutException, RemotingSendRequestException, RemotingConnectException, MQBrokerException { return this.def...
DefaultMQAdminExt extends ClientConfig implements MQAdminExt { @Override public SubscriptionGroupWrapper getAllSubscriptionGroup(final String brokerAddr, long timeoutMillis) throws InterruptedException, RemotingTimeoutException, RemotingSendRequestException, RemotingConnectException, MQBrokerException { return this.def...
DefaultMQAdminExt extends ClientConfig implements MQAdminExt { @Override public SubscriptionGroupWrapper getAllSubscriptionGroup(final String brokerAddr, long timeoutMillis) throws InterruptedException, RemotingTimeoutException, RemotingSendRequestException, RemotingConnectException, MQBrokerException { return this.def...
DefaultMQAdminExt extends ClientConfig implements MQAdminExt { @Override public SubscriptionGroupWrapper getAllSubscriptionGroup(final String brokerAddr, long timeoutMillis) throws InterruptedException, RemotingTimeoutException, RemotingSendRequestException, RemotingConnectException, MQBrokerException { return this.def...
@Test public void testRegister() { ConsumerFilterManager filterManager = gen(10, 10); ConsumerFilterData filterData = filterManager.get("topic9", "CID_9"); assertThat(filterData).isNotNull(); assertThat(filterData.isDead()).isFalse(); assertThat(filterManager.register( "topic9", "CID_9", "a is not null", ExpressionType...
public void register(final String consumerGroup, final Collection<SubscriptionData> subList) { for (SubscriptionData subscriptionData : subList) { register( subscriptionData.getTopic(), consumerGroup, subscriptionData.getSubString(), subscriptionData.getExpressionType(), subscriptionData.getSubVersion() ); } Collection...
ConsumerFilterManager extends ConfigManager { public void register(final String consumerGroup, final Collection<SubscriptionData> subList) { for (SubscriptionData subscriptionData : subList) { register( subscriptionData.getTopic(), consumerGroup, subscriptionData.getSubString(), subscriptionData.getExpressionType(), su...
ConsumerFilterManager extends ConfigManager { public void register(final String consumerGroup, final Collection<SubscriptionData> subList) { for (SubscriptionData subscriptionData : subList) { register( subscriptionData.getTopic(), consumerGroup, subscriptionData.getSubString(), subscriptionData.getExpressionType(), su...
ConsumerFilterManager extends ConfigManager { public void register(final String consumerGroup, final Collection<SubscriptionData> subList) { for (SubscriptionData subscriptionData : subList) { register( subscriptionData.getTopic(), consumerGroup, subscriptionData.getSubString(), subscriptionData.getExpressionType(), su...
ConsumerFilterManager extends ConfigManager { public void register(final String consumerGroup, final Collection<SubscriptionData> subList) { for (SubscriptionData subscriptionData : subList) { register( subscriptionData.getTopic(), consumerGroup, subscriptionData.getSubString(), subscriptionData.getExpressionType(), su...
@Test public void testUnregister() { ConsumerFilterManager filterManager = gen(10, 10); ConsumerFilterData filterData = filterManager.get("topic9", "CID_9"); assertThat(filterData).isNotNull(); assertThat(filterData.isDead()).isFalse(); filterManager.unRegister("CID_9"); assertThat(filterData.isDead()).isTrue(); }
public void unRegister(final String consumerGroup) { for (String topic : filterDataByTopic.keySet()) { this.filterDataByTopic.get(topic).unRegister(consumerGroup); } }
ConsumerFilterManager extends ConfigManager { public void unRegister(final String consumerGroup) { for (String topic : filterDataByTopic.keySet()) { this.filterDataByTopic.get(topic).unRegister(consumerGroup); } } }
ConsumerFilterManager extends ConfigManager { public void unRegister(final String consumerGroup) { for (String topic : filterDataByTopic.keySet()) { this.filterDataByTopic.get(topic).unRegister(consumerGroup); } } ConsumerFilterManager(); ConsumerFilterManager(BrokerController brokerController); }
ConsumerFilterManager extends ConfigManager { public void unRegister(final String consumerGroup) { for (String topic : filterDataByTopic.keySet()) { this.filterDataByTopic.get(topic).unRegister(consumerGroup); } } ConsumerFilterManager(); ConsumerFilterManager(BrokerController brokerController); static ConsumerFilterD...
ConsumerFilterManager extends ConfigManager { public void unRegister(final String consumerGroup) { for (String topic : filterDataByTopic.keySet()) { this.filterDataByTopic.get(topic).unRegister(consumerGroup); } } ConsumerFilterManager(); ConsumerFilterManager(BrokerController brokerController); static ConsumerFilterD...
@Test public void testPersist() { ConsumerFilterManager filterManager = gen(10, 10); try { filterManager.persist(); ConsumerFilterData filterData = filterManager.get("topic9", "CID_9"); assertThat(filterData).isNotNull(); assertThat(filterData.isDead()).isFalse(); ConsumerFilterManager loadFilter = new ConsumerFilterMa...
public ConsumerFilterData get(final String topic, final String consumerGroup) { if (!this.filterDataByTopic.containsKey(topic)) { return null; } if (this.filterDataByTopic.get(topic).getGroupFilterData().isEmpty()) { return null; } return this.filterDataByTopic.get(topic).getGroupFilterData().get(consumerGroup); }
ConsumerFilterManager extends ConfigManager { public ConsumerFilterData get(final String topic, final String consumerGroup) { if (!this.filterDataByTopic.containsKey(topic)) { return null; } if (this.filterDataByTopic.get(topic).getGroupFilterData().isEmpty()) { return null; } return this.filterDataByTopic.get(topic).g...
ConsumerFilterManager extends ConfigManager { public ConsumerFilterData get(final String topic, final String consumerGroup) { if (!this.filterDataByTopic.containsKey(topic)) { return null; } if (this.filterDataByTopic.get(topic).getGroupFilterData().isEmpty()) { return null; } return this.filterDataByTopic.get(topic).g...
ConsumerFilterManager extends ConfigManager { public ConsumerFilterData get(final String topic, final String consumerGroup) { if (!this.filterDataByTopic.containsKey(topic)) { return null; } if (this.filterDataByTopic.get(topic).getGroupFilterData().isEmpty()) { return null; } return this.filterDataByTopic.get(topic).g...
ConsumerFilterManager extends ConfigManager { public ConsumerFilterData get(final String topic, final String consumerGroup) { if (!this.filterDataByTopic.containsKey(topic)) { return null; } if (this.filterDataByTopic.get(topic).getGroupFilterData().isEmpty()) { return null; } return this.filterDataByTopic.get(topic).g...
@Test public void testPersist_clean() { ConsumerFilterManager filterManager = gen(10, 10); String topic = "topic9"; for (int i = 0; i < 10; i++) { String cid = "CID_" + i; ConsumerFilterData filterData = filterManager.get(topic, cid); assertThat(filterData).isNotNull(); assertThat(filterData.isDead()).isFalse(); filter...
public ConsumerFilterData get(final String topic, final String consumerGroup) { if (!this.filterDataByTopic.containsKey(topic)) { return null; } if (this.filterDataByTopic.get(topic).getGroupFilterData().isEmpty()) { return null; } return this.filterDataByTopic.get(topic).getGroupFilterData().get(consumerGroup); }
ConsumerFilterManager extends ConfigManager { public ConsumerFilterData get(final String topic, final String consumerGroup) { if (!this.filterDataByTopic.containsKey(topic)) { return null; } if (this.filterDataByTopic.get(topic).getGroupFilterData().isEmpty()) { return null; } return this.filterDataByTopic.get(topic).g...
ConsumerFilterManager extends ConfigManager { public ConsumerFilterData get(final String topic, final String consumerGroup) { if (!this.filterDataByTopic.containsKey(topic)) { return null; } if (this.filterDataByTopic.get(topic).getGroupFilterData().isEmpty()) { return null; } return this.filterDataByTopic.get(topic).g...
ConsumerFilterManager extends ConfigManager { public ConsumerFilterData get(final String topic, final String consumerGroup) { if (!this.filterDataByTopic.containsKey(topic)) { return null; } if (this.filterDataByTopic.get(topic).getGroupFilterData().isEmpty()) { return null; } return this.filterDataByTopic.get(topic).g...
ConsumerFilterManager extends ConfigManager { public ConsumerFilterData get(final String topic, final String consumerGroup) { if (!this.filterDataByTopic.containsKey(topic)) { return null; } if (this.filterDataByTopic.get(topic).getGroupFilterData().isEmpty()) { return null; } return this.filterDataByTopic.get(topic).g...
@Test public void testDispatch_filterDataIllegal() { BrokerConfig brokerConfig = new BrokerConfig(); brokerConfig.setEnableCalcFilterBitMap(true); ConsumerFilterManager filterManager = new ConsumerFilterManager(); filterManager.register("topic0", "CID_0", "a is not null and a >= 5", ExpressionType.SQL92, System.current...
@Override public void dispatch(DispatchRequest request) { if (!this.brokerConfig.isEnableCalcFilterBitMap()) { return; } try { Collection<ConsumerFilterData> filterDatas = consumerFilterManager.get(request.getTopic()); if (filterDatas == null || filterDatas.isEmpty()) { return; } Iterator<ConsumerFilterData> iterator =...
CommitLogDispatcherCalcBitMap implements CommitLogDispatcher { @Override public void dispatch(DispatchRequest request) { if (!this.brokerConfig.isEnableCalcFilterBitMap()) { return; } try { Collection<ConsumerFilterData> filterDatas = consumerFilterManager.get(request.getTopic()); if (filterDatas == null || filterDatas...
CommitLogDispatcherCalcBitMap implements CommitLogDispatcher { @Override public void dispatch(DispatchRequest request) { if (!this.brokerConfig.isEnableCalcFilterBitMap()) { return; } try { Collection<ConsumerFilterData> filterDatas = consumerFilterManager.get(request.getTopic()); if (filterDatas == null || filterDatas...
CommitLogDispatcherCalcBitMap implements CommitLogDispatcher { @Override public void dispatch(DispatchRequest request) { if (!this.brokerConfig.isEnableCalcFilterBitMap()) { return; } try { Collection<ConsumerFilterData> filterDatas = consumerFilterManager.get(request.getTopic()); if (filterDatas == null || filterDatas...
CommitLogDispatcherCalcBitMap implements CommitLogDispatcher { @Override public void dispatch(DispatchRequest request) { if (!this.brokerConfig.isEnableCalcFilterBitMap()) { return; } try { Collection<ConsumerFilterData> filterDatas = consumerFilterManager.get(request.getTopic()); if (filterDatas == null || filterDatas...
@Test public void testDispatch_blankFilterData() { BrokerConfig brokerConfig = new BrokerConfig(); brokerConfig.setEnableCalcFilterBitMap(true); ConsumerFilterManager filterManager = new ConsumerFilterManager(); CommitLogDispatcherCalcBitMap calcBitMap = new CommitLogDispatcherCalcBitMap(brokerConfig, filterManager); f...
@Override public void dispatch(DispatchRequest request) { if (!this.brokerConfig.isEnableCalcFilterBitMap()) { return; } try { Collection<ConsumerFilterData> filterDatas = consumerFilterManager.get(request.getTopic()); if (filterDatas == null || filterDatas.isEmpty()) { return; } Iterator<ConsumerFilterData> iterator =...
CommitLogDispatcherCalcBitMap implements CommitLogDispatcher { @Override public void dispatch(DispatchRequest request) { if (!this.brokerConfig.isEnableCalcFilterBitMap()) { return; } try { Collection<ConsumerFilterData> filterDatas = consumerFilterManager.get(request.getTopic()); if (filterDatas == null || filterDatas...
CommitLogDispatcherCalcBitMap implements CommitLogDispatcher { @Override public void dispatch(DispatchRequest request) { if (!this.brokerConfig.isEnableCalcFilterBitMap()) { return; } try { Collection<ConsumerFilterData> filterDatas = consumerFilterManager.get(request.getTopic()); if (filterDatas == null || filterDatas...
CommitLogDispatcherCalcBitMap implements CommitLogDispatcher { @Override public void dispatch(DispatchRequest request) { if (!this.brokerConfig.isEnableCalcFilterBitMap()) { return; } try { Collection<ConsumerFilterData> filterDatas = consumerFilterManager.get(request.getTopic()); if (filterDatas == null || filterDatas...
CommitLogDispatcherCalcBitMap implements CommitLogDispatcher { @Override public void dispatch(DispatchRequest request) { if (!this.brokerConfig.isEnableCalcFilterBitMap()) { return; } try { Collection<ConsumerFilterData> filterDatas = consumerFilterManager.get(request.getTopic()); if (filterDatas == null || filterDatas...
@Test public void testDispatch() { BrokerConfig brokerConfig = new BrokerConfig(); brokerConfig.setEnableCalcFilterBitMap(true); ConsumerFilterManager filterManager = ConsumerFilterManagerTest.gen(10, 10); CommitLogDispatcherCalcBitMap calcBitMap = new CommitLogDispatcherCalcBitMap(brokerConfig, filterManager); for (in...
@Override public void dispatch(DispatchRequest request) { if (!this.brokerConfig.isEnableCalcFilterBitMap()) { return; } try { Collection<ConsumerFilterData> filterDatas = consumerFilterManager.get(request.getTopic()); if (filterDatas == null || filterDatas.isEmpty()) { return; } Iterator<ConsumerFilterData> iterator =...
CommitLogDispatcherCalcBitMap implements CommitLogDispatcher { @Override public void dispatch(DispatchRequest request) { if (!this.brokerConfig.isEnableCalcFilterBitMap()) { return; } try { Collection<ConsumerFilterData> filterDatas = consumerFilterManager.get(request.getTopic()); if (filterDatas == null || filterDatas...
CommitLogDispatcherCalcBitMap implements CommitLogDispatcher { @Override public void dispatch(DispatchRequest request) { if (!this.brokerConfig.isEnableCalcFilterBitMap()) { return; } try { Collection<ConsumerFilterData> filterDatas = consumerFilterManager.get(request.getTopic()); if (filterDatas == null || filterDatas...
CommitLogDispatcherCalcBitMap implements CommitLogDispatcher { @Override public void dispatch(DispatchRequest request) { if (!this.brokerConfig.isEnableCalcFilterBitMap()) { return; } try { Collection<ConsumerFilterData> filterDatas = consumerFilterManager.get(request.getTopic()); if (filterDatas == null || filterDatas...
CommitLogDispatcherCalcBitMap implements CommitLogDispatcher { @Override public void dispatch(DispatchRequest request) { if (!this.brokerConfig.isEnableCalcFilterBitMap()) { return; } try { Collection<ConsumerFilterData> filterDatas = consumerFilterManager.get(request.getTopic()); if (filterDatas == null || filterDatas...