
pl.allegro.tech.hermes.management.api.InactiveTopicsEndpoint Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of hermes-management Show documentation
Show all versions of hermes-management Show documentation
Fast and reliable message broker built on top of Kafka.
package pl.allegro.tech.hermes.management.api;
import static jakarta.ws.rs.core.MediaType.APPLICATION_JSON;
import io.swagger.annotations.ApiOperation;
import jakarta.annotation.security.RolesAllowed;
import jakarta.ws.rs.GET;
import jakarta.ws.rs.HttpMethod;
import jakarta.ws.rs.Path;
import jakarta.ws.rs.Produces;
import java.util.List;
import org.springframework.stereotype.Component;
import pl.allegro.tech.hermes.management.api.auth.Roles;
import pl.allegro.tech.hermes.management.domain.detection.InactiveTopic;
import pl.allegro.tech.hermes.management.domain.detection.InactiveTopicsStorageService;
@Component
@Path("/inactive-topics")
public class InactiveTopicsEndpoint {
private final InactiveTopicsStorageService storageService;
public InactiveTopicsEndpoint(InactiveTopicsStorageService storageService) {
this.storageService = storageService;
}
@GET
@Produces(APPLICATION_JSON)
@RolesAllowed(Roles.ADMIN)
@ApiOperation(value = "All inactive topics", response = List.class, httpMethod = HttpMethod.GET)
public List getConsumersWorkloadConstraints() {
return storageService.getInactiveTopics();
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy