Java Code Examples for org.apache.rocketmq.common.protocol.header.GetConsumerListByGroupResponseBody#getConsumerIdList()
The following examples show how to use
org.apache.rocketmq.common.protocol.header.GetConsumerListByGroupResponseBody#getConsumerIdList() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: DeFiClientManageProcessorTest.java From DeFiBus with Apache License 2.0 | 5 votes |
@Test public void processRequest_GetConsumerListByGroupAndTopic() throws Exception { ConsumerGroupInfo consumerGroupInfo = deFiBrokerController.getConsumerManager().getConsumerGroupInfo(group); assertThat(consumerGroupInfo).isNotNull(); RemotingCommand request = GetConsumerListCommand(); RemotingCommand response = deFiClientManageProcessor.processRequest(handlerContext, request); assertThat(response).isNotNull(); assertThat(response.getCode()).isEqualTo(ResponseCode.SUCCESS); GetConsumerListByGroupResponseBody body = RemotingSerializable.decode(response.getBody(), GetConsumerListByGroupResponseBody.class); List<String> clientIdList = body.getConsumerIdList(); assertThat(clientIdList).isNotNull(); assertThat(clientIdList.get(0)).isEqualTo(clientId); }
Example 2
Source File: DeFiClientManageProcessorTest.java From DeFiBus with Apache License 2.0 | 5 votes |
@Test public void processRequest_GetConsumerListByGroupAndTopicIsNull() throws Exception { ConsumerGroupInfo consumerGroupInfo = deFiBrokerController.getConsumerManager().getConsumerGroupInfo(group); assertThat(consumerGroupInfo).isNotNull(); RemotingCommand request = GetConsumerListCommandWithNoTopic(); RemotingCommand response = response = deFiClientManageProcessor.processRequest(handlerContext, request); assertThat(response).isNotNull(); assertThat(response.getCode()).isEqualTo(ResponseCode.SUCCESS); GetConsumerListByGroupResponseBody body = RemotingSerializable.decode(response.getBody(), GetConsumerListByGroupResponseBody.class); List<String> clientIdList = body.getConsumerIdList(); assertThat(clientIdList).isNotNull(); assertThat(clientIdList.get(0)).isEqualTo(clientId); }