Spring Cloud Stream AWS Kinesis Binder: Difference between revisions

From NovaOrdis Knowledge Base
Jump to navigation Jump to search
Line 28: Line 28:


:::[[Image:SpringCloudStreamAmazonKinesisBinder.png]]
:::[[Image:SpringCloudStreamAmazonKinesisBinder.png]]
==Payload==
The payload passed to the message as follows:
<syntaxhighlight lang='java'>
MessageChannel outputChannel = ...;
String payload = "..."
Message m = new GenericMessage<>(payload);
outputChannel.send(m);
</syntaxhighlight>
is recovered at the other end as follows:
<syntaxhighlight lang='java'>
@StreamListener(InputChannelFactory.INPUT_CHANNEL_NAME)
public void handle(Message<String> e) {
  String payload = e.getPayload();
}
</syntaxhighlight>
==Headers==


=Consumer Group Support=
=Consumer Group Support=

Revision as of 19:49, 18 December 2018

External

Internal

Overview

Dependencies

dependencies {
    implementation('org.springframework.cloud:spring-cloud-stream-binder-kinesis:1.0.0.RELEASE')
}

Playground Examples

Playground Kinesis Producer
Playground Kinesis Consumer

Message Propagation

SpringCloudStreamAmazonKinesisBinder.png

Payload

The payload passed to the message as follows:

MessageChannel outputChannel = ...;

String payload = "..."
Message m = new GenericMessage<>(payload);
 outputChannel.send(m);

is recovered at the other end as follows:

@StreamListener(InputChannelFactory.INPUT_CHANNEL_NAME)
public void handle(Message<String> e) {
  String payload = e.getPayload();
}



Headers

Consumer Group Support

Also see:

Spring Cloud Stream Consumer Groups

Configuration

Stream Auto-Creation

1.0.0 cannot be configured to fail on inexistent stream, instead of creating it. See org.springframework.cloud.stream.binder.kinesis.provisioning.KinesisStreamProvisioner line 135.

Also see

Spring Integration Configuration