0

How can we have two AWS kinesis connections using spring-cloud-stream-binder-kinesis?

1st connection: spring application and AWS kinesis stream in the same AWS account.

2nd connection: other AWS kinesis stream sitting in a different AWS account.

Is it possible to have two different connections from a spring application to two different kinesis streams in different AWS accounts? If it is yes, How do we implement this?

Mihai Chelaru
  • 7,614
  • 14
  • 45
  • 51
Sidath
  • 1
  • 1

1 Answers1

0

See Connecting to Multiple Systems.

By default, binders share the application’s Spring Boot auto-configuration, so that one instance of each binder found on the classpath is created. If your application should connect to more than one broker of the same type, you can specify multiple binder configurations, each with different environment settings.

Gary Russell
  • 166,535
  • 14
  • 146
  • 179
  • Thank you very much Gary, Btw, this is for the AWS kinesis multiple binders,How can I implement two AWS kinesis binders at the same time. – Sidath Nov 17 '18 at 05:43
  • The type of the binder should make no difference; just use the technique described there to set up 2 binders with different environments. – Gary Russell Nov 17 '18 at 15:59
  • Thank you . :) challenge here is to have two different AWS connections (need to support two different AWS credential providers to access one kinesis to same account and other one for different account ) . Really appreciate your comment/help on this. Thank you again .... Sidath – Sidath Nov 20 '18 at 07:42
  • You really can't do that just as is based on the Spring Boot auto-configuration: https://cloud.spring.io/spring-cloud-static/spring-cloud-aws/2.0.1.RELEASE/single/spring-cloud-aws.html#_spring_boot_auto_configuration. You need to consider to divide your project to several independent microservices. – Artem Bilan Nov 21 '18 at 18:14