final MessageChannel channel = ctx.getBean("inputToKafka", MessageChannel.class);
LOG.info(channel.getClass());
//sending 100,000 messages to Kafka server for topic test1
for (int i = 0; i < 500; i++) {
final User user = new User();
user.setFirstName("fname" + i);
user.setLastName("lname" + i);
channel.send(
MessageBuilder.withPayload(user)
.setHeader("messageKey", String.valueOf(i))
.setHeader("topic", "test1").build());