@Test public void test_send_message() { InstrumentRequest request = new InstrumentRequest(); Map<String, Object> message = new HashMap<>(); message.put("instrument_create", request); financialInstrumentProducer.sendMessage(TOPIC_NAME, KEY_NAME, message); verify(kafkaTemplate).send(TOPIC_NAME, KEY_NAME, message); }
public void sendMessage(String topic, String key, Map<String, Object> message) { kafkaTemplate.send(topic, key, message); }
FinancialInstrumentProducer { public void sendMessage(String topic, String key, Map<String, Object> message) { kafkaTemplate.send(topic, key, message); } }
FinancialInstrumentProducer { public void sendMessage(String topic, String key, Map<String, Object> message) { kafkaTemplate.send(topic, key, message); } @Autowired  FinancialInstrumentProducer(LogAwareKafkaTemplate<String, Object> kafkaTemplate); }
FinancialInstrumentProducer { public void sendMessage(String topic, String key, Map<String, Object> message) { kafkaTemplate.send(topic, key, message); } @Autowired  FinancialInstrumentProducer(LogAwareKafkaTemplate<String, Object> kafkaTemplate); void sendMessage(String topic, String key, Map<String, Object> message); }
FinancialInstrumentProducer { public void sendMessage(String topic, String key, Map<String, Object> message) { kafkaTemplate.send(topic, key, message); } @Autowired  FinancialInstrumentProducer(LogAwareKafkaTemplate<String, Object> kafkaTemplate); void sendMessage(String topic, String key, Map<String, Object> message);  }