class BudgetDetailQueueRepository {

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

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

        case "create":
            topicMap.put("budgetdetail_create", request);
            System.out.println("push create topic" + request);
            break;
        case "update":
            topicMap.put("budgetdetail_update", request);
            break;
        case "delete":
            topicMap.put("budgetdetail_delete", request);
            break;

        }
        financialProducer.sendMessage(validatedTopic, budgetDetailValidatedKey, topicMap);
    }

    @Autowired public  BudgetDetailQueueRepository(final FinancialProducer financialProducer,
            @Value("${kafka.topics.egf.budget.service.validated.topic}") final String validatedTopic,
            @Value("${kafka.topics.egf.budget.budgetdetail.validated.key}") final String budgetDetailValidatedKey,
            @Value("${kafka.topics.egf.budget.service.completed.topic}") final String completedTopic,
            @Value("${kafka.topics.egf.budget.budgetdetail.completed.key}") final String budgetDetailCompletedKey);

}