Skip to content

Instantly share code, notes, and snippets.

@garystafford
Last active June 15, 2018 16:41
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save garystafford/3aa777a69e271973a272e4eed22054a5 to your computer and use it in GitHub Desktop.
Save garystafford/3aa777a69e271973a272e4eed22054a5 to your computer and use it in GitHub Desktop.
@Slf4j
public class Sender {
@Autowired
private KafkaTemplate<String, FulfillmentRequestEvent> kafkaTemplate;
public void send(String topic, FulfillmentRequestEvent payload) {
log.info("sending payload='{}' to topic='{}'", payload, topic);
kafkaTemplate.send(topic, payload);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment