package com.css.simulation.resource.server.infra.feign.service;


import api.common.pojo.param.KafkaParameter;
import com.css.simulation.resource.server.infra.feign.config.FeignConfiguration;
import com.css.simulation.resource.server.infra.feign.fallback.KafkaServiceFallback;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

@FeignClient(
        contextId = "kafka",
        value = "simulation-resource-common",
        path = "/simulation/resource/common",
        fallback = KafkaServiceFallback.class,
        configuration = FeignConfiguration.class
)
public interface KafkaService {

    @PostMapping("/kafka/send")
    void send(@RequestBody @Validated KafkaParameter kafkaParameter);


}
