58 Commits

Author SHA1 Message Date
Artem Bilan
c1133911d5 GH-245: Expose customizers for KCL configs
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`
2024-09-24 11:02:27 -04:00
Eric Haag
79a0210a3a Update Revved up by Develocity badge 2024-01-23 11:53:10 -05:00
Artem Bilan
57efaa442f Add badge for CI build status to README 2023-11-30 17:31:22 -05:00
Artem Bilan
0b41aa23d8 Mention AWS CRT client in the README
* Use an explicit `S3AsyncClient.crtBuilder()` according to the warning in the logs for test
* Some code clean up in the `S3MessageHandler`
2023-09-21 10:20:32 -04:00
Paul
1092228cc4 Update README.md
Fix readme example referencing an non-existent variable
2023-09-08 16:47:39 -04:00
Eric Haag
99b48045b2 Connect build to ge.spring.io
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
2023-08-02 13:32:18 -04:00
abilan
31a4dc67f4 GH-224: Fix SnsBodyBuilder usage in the Doc
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
2023-06-05 11:59:55 -04:00
abilan
bc9a0825fb GH-221: Revise an at-least-once delivery
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
2023-04-25 17:11:07 -04:00
abilan
63b40836ce GH-221: Revise the manual checkpoint logic
Fixes https://github.com/spring-projects/spring-integration-aws/issues/221

* Introduce a `RequestShardForSequenceException` to control the flow for
requesting the `KinesisMessageDrivenChannelAdapter` for shard iterator at specific sequence
2023-04-24 17:20:23 -04:00
abilan
bd1371fa61 Fix README.md for new state of code in project 2023-03-16 17:40:51 -04:00
abilan
594ea58f28 Implement our own DynamoDb lock repository
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
2023-02-27 12:00:46 -05:00
Christopher Smith
2b77c3810f GH-196: Add SNS FIFO support
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`**
2022-12-12 14:09:21 -05:00
Artem Bilan
620b741ba8 Start version 3.0
* Upgrade to Jakarta EE
* Upgrade to Spring Integration 6.0
* Use Testcontainers instead of direct Localstack
2022-03-30 16:19:40 -04:00
Edgar Herrero Uría
537e6f6861 GH-193: Migrate to new Spring Cloud AWS group
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
2021-04-12 12:45:11 -04:00
Artem Bilan
3a7222f456 Get rid off "master" word in the project 2021-04-07 12:20:44 -04:00
Artem Bilan
1cf84957a8 Fix XSD version; language in the README 2021-01-27 16:45:26 -05:00
Greg Eales
8a959d0db4 Fix example in README for AdjacentParentShardId 2020-10-21 09:43:29 -04:00
Greg Eales
5a3c6a1a95 GH-179: Kinesis: Add "shards to consume" filter
Fixes https://github.com/spring-projects/spring-integration-aws/issues/179

* code review
* rename to `shardListFilter` and add example to README
2020-10-20 12:59:44 -04:00
Artem Bilan
3159b4f7d1 Prepare for release 2020-01-10 10:44:06 -05:00
Artem Bilan
507f652122 Disable CBOR for AWS; enable Kinesis tests
* 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
2019-10-22 15:04:19 -04:00
Artem Bilan
86fe8543da GH-115: Mention KCL and KPL in the README
Fixes https://github.com/spring-projects/spring-integration-aws/issues/115
2019-09-12 16:17:26 -04:00
Sebastian Dusza
9185cd186a Update messageDeletionPolicy section in README.md
It wasn't up to date.
2019-04-05 15:56:14 -04:00
Artem Bilan
562b20bd4d Fix link for GH PullRequest help 2019-03-20 21:26:08 -04:00
Spring Operator
d38fd18d23 URL Cleanup
This commit updates URLs to prefer the https protocol. Redirects are not followed to avoid accidentally expanding intentionally shortened URLs (i.e. if using a URL shortener).

# Fixed URLs

## Fixed But Review Recommended
These URLs were fixed, but the https status was not OK. However, the https status was the same as the http request or http redirected to an https URL, so they were migrated. Your review is recommended.

* [ ] http://queue-url.com/ (UnknownHostException) with 2 occurrences migrated to:
  https://queue-url.com/ ([https](https://queue-url.com/) result UnknownHostException).
* [ ] http://queue-url.com/bar (UnknownHostException) with 1 occurrences migrated to:
  https://queue-url.com/bar ([https](https://queue-url.com/bar) result UnknownHostException).
* [ ] http://queue-url.com/baz (UnknownHostException) with 1 occurrences migrated to:
  https://queue-url.com/baz ([https](https://queue-url.com/baz) result UnknownHostException).
* [ ] http://queue-url.com/foo (UnknownHostException) with 2 occurrences migrated to:
  https://queue-url.com/foo ([https](https://queue-url.com/foo) result UnknownHostException).
* [ ] http://help.github.com/send-pull-requests (404) with 1 occurrences migrated to:
  https://help.github.com/send-pull-requests ([https](https://help.github.com/send-pull-requests) result 404).

## Fixed Success
These URLs were switched to an https URL with a 2xx status. While the status was successful, your review is still recommended.

* [ ] http://aws.amazon.com/ with 1 occurrences migrated to:
  https://aws.amazon.com/ ([https](https://aws.amazon.com/) result 200).
* [ ] http://aws.amazon.com/products/ with 3 occurrences migrated to:
  https://aws.amazon.com/products/ ([https](https://aws.amazon.com/products/) result 200).
* [ ] http://aws.amazon.com/ses/ with 2 occurrences migrated to:
  https://aws.amazon.com/ses/ ([https](https://aws.amazon.com/ses/) result 200).
* [ ] http://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-long-polling.html with 1 occurrences migrated to:
  https://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-long-polling.html ([https](https://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-long-polling.html) result 200).
* [ ] http://docs.spring.io/spring-integration/reference/ with 1 occurrences migrated to:
  https://docs.spring.io/spring-integration/reference/ ([https](https://docs.spring.io/spring-integration/reference/) result 200).
* [ ] http://projects.spring.io/spring-integration/ with 1 occurrences migrated to:
  https://projects.spring.io/spring-integration/ ([https](https://projects.spring.io/spring-integration/) result 200).
* [ ] http://www.apache.org with 1 occurrences migrated to:
  https://www.apache.org ([https](https://www.apache.org) result 200).
* [ ] http://www.springframework.org/schema/integration/spring-integration.xsd with 1 occurrences migrated to:
  https://www.springframework.org/schema/integration/spring-integration.xsd ([https](https://www.springframework.org/schema/integration/spring-integration.xsd) result 200).
* [ ] http://aws.amazon.com/documentation/ses/ with 2 occurrences migrated to:
  https://aws.amazon.com/documentation/ses/ ([https](https://aws.amazon.com/documentation/ses/) result 301).
* [ ] http://aws.amazon.com/sdkforjava/ with 1 occurrences migrated to:
  https://aws.amazon.com/sdkforjava/ ([https](https://aws.amazon.com/sdkforjava/) result 301).
* [ ] http://contributor-covenant.org with 1 occurrences migrated to:
  https://contributor-covenant.org ([https](https://contributor-covenant.org) result 301).
* [ ] http://contributor-covenant.org/version/1/3/0/ with 1 occurrences migrated to:
  https://contributor-covenant.org/version/1/3/0/ ([https](https://contributor-covenant.org/version/1/3/0/) result 301).
* [ ] http://www.springframework.org with 1 occurrences migrated to:
  https://www.springframework.org ([https](https://www.springframework.org) result 301).

# Ignored
These URLs were intentionally ignored.

* http://localhost with 4 occurrences
* http://testQueue.amazonaws.com with 2 occurrences
* http://www.springframework.org/schema/beans with 1 occurrences
* http://www.springframework.org/schema/integration with 2 occurrences
* http://www.springframework.org/schema/integration/aws with 2 occurrences
* http://www.springframework.org/schema/tool with 2 occurrences
* http://www.w3.org/2001/XMLSchema with 1 occurrences
2019-03-20 21:25:00 -04:00
Artem Bilan
82c0135669 GH-116: Document optional dependencies
Fixes https://github.com/spring-projects/spring-integration-aws/issues/116
2019-03-01 11:50:28 -05:00
Artem Bilan
a3dd4763c6 Add note about project version and its deps
Fixes https://github.com/spring-projects/spring-integration-aws/issues/100
2018-10-15 14:30:49 -04:00
Artem Bilan
2cbe87f90d Fix README typos 2018-08-01 16:32:40 -04:00
Artem Bilan
0e02b0d470 GH-90: Rework locking logic in the KinesisMDChA
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
2018-07-16 13:17:13 -04:00
Artem Bilan
3a279ca67f Rename DynamoDbMetadataStore class for consistency 2018-07-02 20:52:40 -04:00
Artem Bilan
19b21579dc Change DynamoDbLocalRunning default port to 4568
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
2018-07-02 13:30:39 -04:00
Artem Bilan
ebd562d6da GH-90: Add shard locking support to KinesisMDChA
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
2018-06-19 13:05:00 -04:00
Artem Bilan
5c262f1d3c GH-66: Add DynamoDbLockRegistry implementation (#93)
* 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`
2018-06-08 16:49:23 -04:00
Artem Bilan
598384bc8c Add TTL to DynamoDbMetaDataStore
Fixes https://github.com/spring-projects/spring-integration-aws/issues/92
2018-05-22 16:51:50 -04:00
Artem Bilan
2c58a6925e Add records conversion support in batch mode
https://stackoverflow.com/questions/49730808/unable-to-consume-messages-as-batch-mode-in-kinesis-binder
2018-04-12 18:11:57 -04:00
Artem Bilan
6a999b2873 GH-51: Add headers mapping to channel adapters
Fixes spring-projects/spring-integration-aws#51
2018-04-06 16:51:47 -04:00
Artem Bilan
2e63b2c682 GH-62: Align Message Handlers for common API
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
2017-12-22 16:59:48 -05:00
Artem Bilan
d07441134b Polishing:
* 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
2017-11-16 11:44:15 -05:00
Jacob Severson
281fad8330 Adding error handling to KinesisMessageHandler
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
2017-11-16 11:44:13 -05:00
ISHIDA Akio
e9dcb5b58d Fix (S)FTP docs link in the README 2017-11-14 09:14:16 -05:00
Artem Bilan
464213001e Fix links to external resources 2017-08-03 15:33:13 -04:00
Artem Bilan
c4a3fcdee2 GH-72: Add KinesisLocalRunning and tests
Fixes spring-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
2017-08-02 20:01:13 -04:00
Artem Bilan
638d5e6f75 GH-64: Add DynamoDbMetaDataStore implementation
Fixes spring-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
2017-08-01 12:33:40 -04:00
Andrew Keely
54782d13c5 Fix README issues
* 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
2017-06-27 10:01:46 -04:00
Mike Girard
3e692f529a Update to spring-cloud-aws-1.1.3
Fixes GH-49 (https://github.com/spring-projects/spring-integration-aws/issues/49)
2017-02-07 13:35:58 -05:00
Christian Tzolov
da77e4b89e Issue #30 : Add S3 inbound streaming channel adapter.
Fixes GH-30 (https://github.com/spring-projects/spring-integration-aws/issues/30)

* Add S3InboundStreamingMessageSource and related S3FileInfo
* Extend spring-integration-aws-1.1.xsd with s3-inbound-streaming-channel-adapter tag.
* Add S3StreamingInboundChannelAdapterParser and s3-inbound-streaming-channel-adapter handler.
* Add S3 streaming spring tests.
* Add S3 streaming documentation to README.md.

Issue #30: Resolve code style and formatting issues

Polishing:
* Revert some `build.gradle` changes
* Add JavaDoc to the `S3FileInfo.getPermissions()`
2016-08-31 22:43:39 -04:00
Gary Russell
07e8d59c1f CLA Hook 2016-07-11 15:37:13 +01:00
Artem Bilan
6abc1210a1 Add ResourceIdResolver support
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.
2016-05-27 15:05:00 -04:00
Artem Bilan
5d4bcb37db INTEXT-221: Document S3 Gateway & CheckStyle
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`
2016-05-18 18:44:38 -04:00
Artem Bilan
f946a1d5e9 Some various fixes
* 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
2016-05-16 12:55:53 -04:00
Artem Bilan
1c0b315462 Pre-release polishing 2016-04-13 16:33:26 -04:00