新建订阅
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
package com.xuxd.kafka.console.controller;
|
||||
|
||||
import com.xuxd.kafka.console.beans.dto.AddSubscriptionDTO;
|
||||
import com.xuxd.kafka.console.beans.dto.QueryConsumerGroupDTO;
|
||||
import com.xuxd.kafka.console.service.ConsumerService;
|
||||
import java.util.Collections;
|
||||
@@ -60,4 +61,9 @@ public class ConsumerController {
|
||||
public Object getConsumerDetail(@RequestParam String groupId) {
|
||||
return consumerService.getConsumerDetail(groupId);
|
||||
}
|
||||
|
||||
@PostMapping("/subscription")
|
||||
public Object addSubscription(@RequestBody AddSubscriptionDTO subscriptionDTO) {
|
||||
return consumerService.addSubscription(subscriptionDTO.getGroupId(), subscriptionDTO.getTopic());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -30,6 +30,11 @@ public class TopicController {
|
||||
@Autowired
|
||||
private TopicService topicService;
|
||||
|
||||
@GetMapping
|
||||
public Object getTopicNameList() {
|
||||
return topicService.getTopicNameList(false);
|
||||
}
|
||||
|
||||
@GetMapping("/list")
|
||||
public Object getTopicList(@RequestParam(required = false) String topic, @RequestParam String type) {
|
||||
return topicService.getTopicList(topic, TopicType.valueOf(type.toUpperCase()));
|
||||
|
||||
Reference in New Issue
Block a user