Fixes: #245
Issue link: https://github.com/spring-projects/spring-integration-aws/issues/245
* Add something like `setLeaseManagementConfigCustomizer(Consumer<LeaseManagementConfig> leaseManagementConfigCustomizer)`
to the `KclMessageDrivenChannelAdapter` and call them before creating a `Scheduler`
* Also add a simple `emptyRecordList` property for the `ProcessorConfig`
This change publishes a build scan to ge.spring.io for every local
build from an authenticated Spring committer and for CI where
appropriate access tokens are available. The build will not fail if
publishing fails.
This change also allows the build to benefit from remote build caching,
providing faster builds for all contributors.
Additionally, the project will have access to all features of Gradle
Enterprise such as:
- Dashboards to view all historical build scans, along with performance
trends over time
- Build failure analytics for enhanced investigation and diagnosis of
build failures
- Test failure analytics to better understand trends and causes around
slow, failing, and flaky tests
Fixes https://github.com/spring-projects/spring-integration-aws/issues/224
* Fix `SnsMessageBuilder` -> `SnsBodyBuilder` in the `SnsMessageHandler.onInit()` comment
for SpEL import registration
* Upgrade to Localstack `2.1.0`
* Rename `SnsMessageBuilderTests` -> `SnsBodyBuilderTests` for consistency of its purpose
Fixes https://github.com/spring-projects/spring-integration-aws/issues/221
* Modify the logic of the `KinesisMessageDrivenChannelAdapter` to rewind
a shard iterator to the failed sequence for any errors.
A rewinding sequence is determined from extra properties in the `ShardCheckpointer`
* Remove `RequestShardForSequenceException` since more natural behavior to
react for any record processor error without end-user interaction
The existing `com.amazonaws:dynamodb-lock-client` does not implement
a locking algorithm properly and there is no easy way to determine if
lock has been abandoned according to the current `leaseDuration` behavior.
* Implement `DynamoDbLockRepository` to interact with lock table in this manner:
- `lockKey` as a primary key
- `lockOwner` as a unique owner client for the lock
- `createdAt` just an info when the lock was created by the client
- `expiredAt` the time in epoch seconds how long the lock is treated as valid
- this `expiredAt` can be configured as a DynamoDb `TTL` feature
* The `DynamoDbLockRepository` uses a `leaseDuration` to calculate an `expiredAt`
and compares it with the current epoch seconds to see if lock is not valid anymore
* Rework `DynamoDbLockRegistry` to rely on the `DynamoDbLockRepository`
* Remove `com.amazonaws:dynamodb-lock-client` dependency as we don't need it anymore
* Implement `RenewableLockRegistry` contract for simple `expiredAt` update
Fixes https://github.com/spring-projects/spring-integration-aws/issues/196
* Add support for SNS FIFO message group and deduplication IDs
* Add Javadoc, clean up formatting
* Fix Javadoc formatting
* Add SNS FIFO information to README
* Change XML snippet indentation to tabs
* Code samples throughout the README mix tabs and spaces, but this
snippet was using tabs, so this updates the new lines to match.
* Minor code style clean up
**Cherry-pick to `main`**
Fixes https://github.com/spring-projects/spring-integration-aws/issues/193
Starting with version `2.3` Spring Cloud AWS has been moved
to new Maven coordinates.
* Change `org.springframework.cloud` for SC-AWS to new `io.awspring.cloud`
* Fix imports for new package
* Fix links, coordinates and pacakges in docs
* 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/90
* Add an internal `ShardConsumerManager` which is responsible to initiate
a locking for the shard key in the provided consumer group and populating
a `ShardConsumer` if `tryLock()` is successful or no `LockRegistry` at all
* Additional logic is added to always iterate over candidate shards if
`tryLock()` on the matter is not successful.
This way the current `KinesisMessageDrivenChannelAdapter` picks up
those shards which have been locked by the consumer which has just
left a cluster and unlocked distributed locks
* Now all the shards are considered as candidates independently of the
`streams` or `shardOffsets` configuration
* Improve Kinesis tests performance
To be able to run Kinesalite and Dynalite npm services locally in
parallel, we need to provide unique ports for them.
Therefore a default `4567` is left for the Kinesalite, meanwhile the
`DynamoDbLocalRunning` is expecting a 4568 now
Fixes https://github.com/spring-projects/spring-integration-aws/issues/90
* The `KinesisMessageDrivenChannelAdapter` can now be supplied with the
`LockRegistry` (e.g. `DynamoDbLockRegistry`) and when stream-based
configuration is used, the channel adapter performs `tryLock()` for the
shard in the channel adapter consumer group.
Therefor only one listener in the group is able to consume from the shard
Note: there is no yet full support for rebalance functionality.
And such a feature can be implemented using Spring Cloud Bus with the
command to stop and start channel adapters when a new
`KinesisMessageDrivenChannelAdapter` arrives to the cluster
* GH-66: Add DynamoDbLockRegistry implementation
Fixes https://github.com/spring-projects/spring-integration-aws/issues/66
* * Remove `Lifecycle` from `DynamoDbLockRegistry` in favor of a thread
execution in the `afterPropertiesSet()`
* Fix `lock()` interruptibility logic
* * Remove `mavenLocal()` since the upstream PR is merged
* decrease an amount of expectations in the Kinesis test
* * Upgrade to SC-AWS-2.0.0.RC2
* * Add Docs for the `DynamoDbLockRegistry`
Fixes: spring-projects/spring-integration-aws#62
* Make `SnsMessageHandler extends AbstractAwsMessageHandler`
* Remove SNS Outbound Gateway variant since `SnsMessageHandler` covers
that part via `successChannel` and `failureChannel`
* Fix XSD for SQS and SNS
* Fix SQS and SNS tests according their logic changes
* Fix README for new changes
* Always call provided `AsyncHandler` from the internal instance
in the `KinesisMessageHandler`
* Make the `KinesisMessageHandler.obtainAsyncHandler()` as generic method
* Rename `sendFailureChannel` property just to the `failureChannel`
since the real operation is `put` not send
* Add `AwsHeaders.SERVICE_RESULT` to represent the service result, e.g.
in case of `PutRecordsRequest` in the `KinesisMessageHandler` to
send on success the whole `PutRecordsResult`
* Fix README to reflect the current reality of the code
* Fix `KinesisMessageHandlerTests` for provided `AsyncHandler` verification
This is groundwork to allow usage of a failure channel within the Kinesis binder per.
This implementation is intended to be backward-compatible with respect to the current handling
of `AsyncHandler`. Client code can still provide an `AsyncHandler`,
but doing so precludes the usage of channels for successful or unsuccessful sends.
Renaming to AwsRequestFailureException
generic getasynchandler method
always delegate or build handler
Added readme docs and using channel for tests
Fixesspring-projects/spring-integration-aws#72
* Document Kinesis Channel Adapters
* Fix some inconsistency in the `KinesisMessageHandler`
* Add integration test against `KinesisLocalRunning` `@Rule`
* Document testing against Kinesalite
Fixesspring-projects/spring-integration-aws#64
* Add `DynamoDbRunning` for testing against locally ran DynamoDB
* Upgrade to Gradle 4.0.1, SI-4.3.11
* Switch on some Checkstyle rules for tests
* Fix whitespace in documentation headers
Many README headers are missing whitespace and so are not interpreted correctly by Github-flavored markdown.
* Fix code block completion
* Update whitespace for readability
I many cases we deal in application just with simple logical name for the target AWS entities, e.g. `myQueue`, `testBucket`.
Actually they must be resolved into the physical resources against the current environment.
E.g. the same S3 `testBucket` ca be fully different in different regions.
The SQS queue must be resolved into the resources with the current `Stack` context.
JIRA: https://jira.spring.io/browse/INTEXT-221
Also apply Checkstyle for the project
Move testing to the `AssertJ`
Adjust `.travis.yml` for Gradle 2.13
Add `CODE_OF_CONDUCT.adoc`
* Upgrade to Gradle-2.13
* Add `org.gradle.daemon=true` option
* Upgrade to SC-AWS-1.1.0.RELEASE
* Upgrade to SI-4.2.6
* Make `spring-cloud-aws-messaging` as `optional` since not all SI-AWS users require messaging components and needs only S3, for example