class SurrenderReasonQueueRepository {

    public void addToSearchQue(SurrenderReasonRequest request) {

        HashMap<String, Object> topicMap = new HashMap<String, Object>();

        if (!request.getSurrenderReasons().isEmpty()) {

            topicMap.put("surrenderreason_persisted", request);

            System.out.println("push search topic" + request);

        }

        financialInstrumentProducer.sendMessage(completedTopic, surrenderReasonCompletedKey, 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);

}