I have been using Spring Cloud Stream with Kafka for a while now. I have a sample SCS-Producer which pumps out data to an output topic.
Below is my producer code:-
@EnableBinding(Source.class)
public class SampleProducer {
@InboundChannelAdapter(value = Source.OUTPUT, poller = @Poller(fixedDelay = "7000", maxMessagesPerPoll = "1"))
public Employee MessageSource() {
Employee emp = new Employee();
emp.setName("Jack");
emp.setType("Dev");
return emp;
}
}
2) App.yml
spring:
cloud:
stream:
defaultBinder: kafka
bindings:
output:
destination: topic1
content-type: application/json
kafka:
binder:
brokers: someIp:somePort
zkNodes: someIp:somePort
server:
port: 0
Request:- Never deployed an AWS Application which used AWS Native services. In the above code everything works fine if I use Kafka and the app on my Local. BUT I now I need to deploy my App on EC2 Cluster, and also I have to use AWS MSK ( this is also provisioned for my team).
I have been using pipelines created by DevOps engineers until now so never really integrated anything by myself and there is very less or rather No documentation or demo projects that I helps me in this situation. I am very much stuck and I need your help. Could anyone help me to a page or a link or any resource wherein I can follow steps to 1. have all the configuration info for the provisioned AWS MSK info in my code so that I can deploy this app on AWS ? Much appreciated.
Thank you.