class InstrumentAccountCodeQueueRepository {

    public void addToSearchQue(InstrumentAccountCodeRequest request) {

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

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

            topicMap.put("instrumentaccountcode_persisted", request);

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

        }

        financialInstrumentProducer.sendMessage(completedTopic, instrumentAccountCodeCompletedKey, topicMap);

    }

    @Autowired public  InstrumentAccountCodeQueueRepository(FinancialInstrumentProducer financialInstrumentProducer,
            @Value("${kafka.topics.egf.instrument.validated.topic}") String validatedTopic,
            @Value("${kafka.topics.egf.instrument.instrument.accountcode.validated.key}") String instrumentAccountCodeValidatedKey,
            @Value("${kafka.topics.egf.instrument.completed.topic}") String completedTopic,
            @Value("${kafka.topics.egf.instrument.instrument.accountcode.completed.key}") String instrumentAccountCodeCompletedKey);

}