class SurrenderReasonQueueRepository {

    public void addToQue(SurrenderReasonRequest request) {
        HashMap<String, Object> topicMap = new HashMap<String, Object>();

        switch (request.getRequestInfo().getAction().toLowerCase()) {

        case "create":
            topicMap.put("surrenderreason_create", request);
            System.out.println("push create topic" + request);
            break;
        case "update":
            topicMap.put("surrenderreason_update", request);
            break;
        case "delete":
            topicMap.put("surrenderreason_delete", request);
            break;

        }
        financialInstrumentProducer.sendMessage(validatedTopic, surrenderReasonValidatedKey, topicMap);
    }

    @Autowired public  SurrenderReasonQueueRepository(FinancialInstrumentProducer financialInstrumentProducer,
            @Value("${kafka.topics.egf.instrument.validated.topic}") String validatedTopic,
            @Value("${kafka.topics.egf.instrument.surrender.reason.validated.key}") String surrenderReasonValidatedKey,
            @Value("${kafka.topics.egf.instrument.completed.topic}") String completedTopic,
            @Value("${kafka.topics.egf.instrument.surrender.reason.completed.key}") String surrenderReasonCompletedKey);

}