Fixes https://github.com/spring-projects/spring-integration-aws/issues/158
It turns out that closed shards are still candidates for consumption
when we have concurrency
* Remove closed shards from the `shardConsumerManager.shardOffsetsToConsumer`
* Upgrade to Spring Integration 5.2.3, Jackson 2.10.2
Related to https://github.com/spring-cloud/spring-cloud-stream-binder-aws-kinesis/issues/117
It can be useful in the target application to have a full control
over KCL options to configure a `KclMessageDrivenChannelAdapter`
* Expose a `KinesisClientLibConfiguration`-based ctor in the
`KclMessageDrivenChannelAdapter`
* Add assert in setters when options must be configured on
the provided `KclMessageDrivenChannelAdapter`
* Extract `stream` and `group` options from the provided
`KclMessageDrivenChannelAdapter`
Fixes https://github.com/spring-projects/spring-integration-aws/issues/157
It turns out that `implementation` provides a `runtime` dependency in
Maven's POM, which is not what we would expect to behave as an `optional`
* Apply Gradle variants for those dependencies which should be as
`optional` in the generate POM
* Some Gradle build config refactoring
Fixes https://github.com/spring-projects/spring-integration-aws/issues/113
* Fix some properties in the `KclMessageDrivenChannelAdapter` for a
reasonable default value
* Introduce `LocalStackSslEnvironmentProvider` to populate a `USE_SSL`
ENV var into a Docker instance for Local Stack
* Add more factory methods into an `ExtendedDockerTestUtils`, especially
variants to obtain an HTTPS-based service clients
* Since Local Stack Kinesis support is based on Kinesalite, it turns out
that `System.setProperty(SDKGlobalConfiguration.AWS_CBOR_DISABLE_SYSTEM_PROPERTY, "true");`
does the trick to make Kinesis integration tests to pass with Local Stack
in Docker
* Suppress `serial` warning in the `AwsIntegrationEvent` classes
* Make `junit-jupiter-api` as `testCompile` dependency
* Fix README in regards Local Stack support for testing
Fixes https://github.com/spring-projects/spring-integration-aws/issues/112
* Introduce an `AwsIntegrationEvent` hierarchy
* Emit a `KinesisShardEndedEvent` from the `KinesisMessageDrivenChannelAdapter`
when current `shardIterator` is returned as `null` indicating the end
of the shard
* NOTE: `KclMessageDrivenChannelAdapter` cannot emit such an event
unit upgrade to KCL v2
* Introduce `EnvironmentHostNameResolver` to resolve Docker host name
from the environment variable
* Make Local Stack tests conditional based on the ENV variable mentioned
above
* Disable `KinesisIntegrationTests` because of `502 Bad Gateway` for
Kinesis service in Local Stack
* Disable
`DynamoDbLockRegistryLeaderInitiatorTests.testDistributedLeaderElection()` -
looks like two instances cannot interaction with table in Local Stack
concurrently properly
* Fix `DynamoDbLockRegistry` to catch and ignore `ResourceInUseException`
instead of re-throwing it without a reason
* Remove `junit-vintage-engine` - no JUnit 4 tests any more
Fixes https://github.com/spring-projects/spring-integration-aws/issues/110
Convert a `PutRecordsRequest` into a `Flux`, map its items into a
`this.kinesisProducer.addUserRecord()` and represent a result
`ListenableFuture` as a `Mono` for deferred execution.
Collect all the monos into a `List<PutRecordsResultEntry>` to populate
into a `putRecordsResult`.
Consume subscription into such a reactive stream via `SettableFuture`
for reply from the `KplMessageHandler`
Any failure in any `ListenableFuture` for `UserRecord`s results in the
failure for the whole `Future` for this `PutRecordsRequest`
The `KinesisMessageDrivenChannelAdapter` may exit its `active` state,
but `consumerInvokers` won't be cleared in the main consumer loop
**Cherry-pick to master**
Fixes https://github.com/spring-projects/spring-integration-aws/issues/109
The plain `Converter` is not able to deal with `MessageHeaders` as a
context for target payload conversion.
* Use `MessageConverter` abstraction to get a request message context
for target conversion
* Deprecate a `setConverter()` in favor of a new `setMessageConverter()`
* Use delegating `ConvertingFromMessageConverter` for default serialization
behavior and for backward compatibility
* Add `flushDuration` option into `KplMessageHandler` for calling a
`kinesisProducer.flush()` periodically
* Call `kinesisProducer.flush()` immediately after `addUserRecord()`
`if (this.flushDuration.toMillis() <= 0) {`
Fixes https://github.com/spring-projects/spring-integration-aws/issues/153
Right now we ignore an `embeddedHeadersMapper` result when we also have a `converter`.
* Move `converter` logic for `batch` mode into `else` of the
`if (KclMessageDrivenChannelAdapter.this.embeddedHeadersMapper != null) {`.
This way we cover all the possible use-case, and don't override results
of each other and also don't perform extra logic for nothing
Fixes https://github.com/spring-projects/spring-integration-aws/issues/152
`map()` into `build()`` the result of a stream for the
`embeddedHeadersMapper` in the `processMultipleRecords()`.
Otherwise our `payload` is going to have `AbstractIntegrationMessageBuilder` instances.
The idea is to allow to process a batch of Messages.