Commit Graph

170 Commits

Author SHA1 Message Date
Artem Bilan
a9ce2fbb6a Add HTTPS entries for XSD into spring.schemas
Related to spring-projects/spring-integration#2987

**Cherry-pick to 2.1.x, 2.0.x & 1.1.x**

# Conflicts:
#	src/main/resources/META-INF/spring.schemas
2019-07-18 13:22:25 -04:00
Artem Bilan
3c242c69d7 Fix XSD for current version 2019-03-27 13:10:52 -04:00
Spring Operator
f7fd8c5e6d 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-27 13:06:09 -04:00
Spring Operator
7446591511 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://www.puppycrawl.com/dtds/configuration_1_2.dtd (404) with 1 occurrences migrated to:
  https://www.puppycrawl.com/dtds/configuration_1_3.dtd ([https](https://www.puppycrawl.com/dtds/configuration_1_2.dtd) result 404).
* [ ] http://www.puppycrawl.com/dtds/suppressions_1_1.dtd (404) with 1 occurrences migrated to:
  https://www.puppycrawl.com/dtds/suppressions_1_2.dtd ([https](https://www.puppycrawl.com/dtds/suppressions_1_1.dtd) 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://www.springframework.org/schema/beans/spring-beans.xsd with 12 occurrences migrated to:
  https://www.springframework.org/schema/beans/spring-beans.xsd ([https](https://www.springframework.org/schema/beans/spring-beans.xsd) result 200).
* [ ] http://www.springframework.org/schema/integration/aws/spring-integration-aws.xsd with 12 occurrences migrated to:
  https://www.springframework.org/schema/integration/aws/spring-integration-aws.xsd ([https](https://www.springframework.org/schema/integration/aws/spring-integration-aws.xsd) result 200).
* [ ] http://www.springframework.org/schema/integration/spring-integration.xsd with 4 occurrences migrated to:
  https://www.springframework.org/schema/integration/spring-integration.xsd ([https](https://www.springframework.org/schema/integration/spring-integration.xsd) result 200).

# Ignored
These URLs were intentionally ignored.

* http://www.springframework.org/schema/beans with 24 occurrences
* http://www.springframework.org/schema/cloud/aws/messaging with 14 occurrences
* http://www.springframework.org/schema/integration with 8 occurrences
* http://www.springframework.org/schema/integration/aws with 24 occurrences
* http://www.w3.org/2001/XMLSchema-instance with 12 occurrences
2019-03-27 12:47:55 -04:00
Spring Operator
3d0d521a62 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 Success
These URLs were switched to an https URL with a 2xx status. While the status was successful, your review is still recommended.

* [ ] http://www.apache.org/licenses/ with 1 occurrences migrated to:
  https://www.apache.org/licenses/ ([https](https://www.apache.org/licenses/) result 200).
* [ ] http://www.apache.org/licenses/LICENSE-2.0 with 70 occurrences migrated to:
  https://www.apache.org/licenses/LICENSE-2.0 ([https](https://www.apache.org/licenses/LICENSE-2.0) result 200).
2019-03-25 12:51:04 -04:00
Spring Buildmaster
273f0479c1 [artifactory-release] Next development version 2019-03-06 17:02:10 +00:00
Spring Buildmaster
2e1eeee639 [artifactory-release] Release version 2.1.0.RELEASE 2019-03-06 17:02:07 +00:00
Artem Bilan
9bb86b78fe Upgrade to SC-AWS-2.1.1l prepare release 2019-03-06 11:51:30 -05:00
Artem Bilan
f4d22d5637 Prepare for 2.1.0.RELEASE
* Remove KCL/KPL components since they are not for the current version
* Make Jackson dependency as mandatory
2019-03-01 15:52:03 -05: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
e5acf0f4de Upgrade dependencies; fix for compatibility 2019-02-25 13:14:44 -05:00
Sylvain Marcadal
5c27dfade5 Add KCL/KPL message handler and channel adapter
relates to spring-cloud/spring-cloud-stream-binder-aws-kinesis#65, spring-cloud/spring-cloud-stream-binder-aws-kinesis#53, #99

Add UUID consumer generation

fixed author tag

upgraded kcl version to 2.0.5

fixed source file encoding

- added setter for checkpoint interval
- change application name (concatenate consumer group and stream name)

fixed javadoc

take into account requested changes from spring-integration

fixed code style issues

take into account requested changes from spring-integration

fixed code style issues

take into account requested changes from spring-integration
2019-02-11 11:20:16 -05:00
Artem Bilan
0995564a66 GH-106: Allow null for S3MH.objectAclExpression
Fixes spring-projects/spring-integration-aws#106

It is really OK to have a `null` returned for the
`S3MessageHandler.objectAclExpression` with the meaning do not set any
ACL on the S3 object.

* Allow `null` for `objectAclExpression` evaluation result
* Optimize asserts skipping string concatenation until the `Supplier`
invocation
* Introduce a `S3MessageHandler.MessageS3ProgressListener` to have a
request message context in the `progressChanged` event case
2019-01-15 10:16:01 -05:00
Artem Bilan
432d8b640e Start 2.1.0 version 2018-10-30 16:32:20 -04: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
0ea00784f0 Use default LocalStack ports
According to https://github.com/localstack/localstack,
DynamoDB listens at `4569` by default, and Kinesis listens at `4568`
 by default.

Aligning with that setup means that it is simpler to run these tests
without having to tune the LocalStack ports.

See also: https://github.com/spring-cloud/spring-cloud-stream-binder-aws-kinesis/pull/64
2018-10-08 10:27:09 -04:00
Karl Lessard
ed89f1243f GH-97: wait at least leaseDuration to acquire the lock
Fixes https://github.com/spring-projects/spring-integration-aws/issues/97

This fixes an issue where `additionalTimeToWait` has a negative value
that is subtracted later by the Amazon DynamoDB client to
`leaseDuration`, making it impossible to acquire the lock if expired.

Also allow to use the existing `refreshPeriod` properties in this case.

* Use default refresh period in tryLock()

The 'refreshPeriod' value might not satisfy both tryLock() and lock()
requirements and should probably be used exclusively in the second case.

We can make the value used for tryLock() configurable as well in another
pull request.

* Rollback previous commit and add author name
2018-09-21 15:46:04 -04:00
Artem Bilan
857d184cca Fix KinesisMessageDrivenChannelAdapterTests
There is a race condition when real consumers are started later in
different thread.

* Add `eventually()` matcher to check the `Map<KinesisShardOffset, ?> shardConsumers`
for particular keys to appear eventually
2018-09-19 13:07:58 -04:00
skelly201
6e5e9f191b Add SqsMessageHandler DestinationResolver ctor 2018-09-19 11:27:27 -04:00
Spring Buildmaster
4476c09f61 [artifactory-release] Next development version 2018-08-21 17:34:32 +00:00
Spring Buildmaster
4043c150d1 [artifactory-release] Release version 2.0.0.RELEASE 2018-08-21 17:34:27 +00:00
Artem Bilan
2cbe87f90d Fix README typos 2018-08-01 16:32:40 -04:00
Spring Buildmaster
7c1e3f83fa [artifactory-release] Next development version 2018-07-30 14:33:53 +00:00
Spring Buildmaster
33048d892e [artifactory-release] Release version 2.0.0.RC1 2018-07-30 14:33:47 +00:00
Artem Bilan
19d11057c2 Upgrade to the latest dependencies 2018-07-27 17:00:16 -04:00
Artem Bilan
1e1e1acc39 Fix DynamoDbLockRegistry.tryLock for "fair" time
Since we don't have choice and wait at minimum `leaseDuration` to be
able to iterate in the Amazon LockClient at least two times and that is
going to be just a contract of this client, so we need to add up a
`timeout` for the `tryLock` to that `leaseDuration`
2018-07-20 12:44:51 -04:00
Artem Bilan
dd52e8f304 Fix DynamoDbLockReg for LockClient requirements
https://stackoverflow.com/questions/51428196/spring-aws-kinesis-binder-acquiring-and-releasing-lock-issues-in-dynamo-db-while

According the logic in the `AmazonDynamoDBLockClient.acquireLock()` we
need to let the loop to iterate at least twice to really get access to
the existing lock and check its expiration status

* Fix the `DynamoDbLockRegistry.tryLock()` to set a proper
`.withRefreshPeriod(0L)` and `.withRefreshPeriod(0L)` to let it pull
the DB until we reach a `leaseDuration` limit on the lock or its
expiration status
2018-07-19 18:21:23 -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
fc34f814e5 Fix DynamoDbMetadataStore.initialized flag logic
https://stackoverflow.com/questions/51257855/spring-cloud-aws-kinesis-stream-binder-failed-to-start-due-to-improper-bean-init
2018-07-10 13:46:30 -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
662416cd7b Fix DynamoDbLock.tryLock() for the real timeout
Since the contract of the `tryLock()` to wait as close to the provided
timeout as possible, then we should not wait for the `leasePeriod` as
minimum.
Also we should sleep in between attempts not more then provided timeout
2018-06-28 12:43:35 -04:00
Artem Bilan
d192e17007 Protect DynamoLockReg & DynamoMDS from hanging
If `DynamoDbLockRegistry` and `DynamoDbMetaDataStore` are not declared
as beans (or their `afterPropertiesSet()` is not called), they hanging on
the `awaitForActive()`
2018-06-28 11:47:59 -04:00
Artem Bilan
9e14e86880 Fix DynamoDbLockRegistry.tryLock for fair time
When we try to lock the DynamoDB item we need to iterate at least
the lease time, but we still don't need to sleep too much - maximum
the time requested for `tryLock()`
2018-06-26 20:46:46 -04:00
Artem Bilan
3e603185a7 Fix race condition in KinesisMDCA.doStop()
https://build.spring.io/browse/INTEXT-AWS-158
2018-06-26 16:44:05 -04:00
Artem Bilan
4fe8e4c6a5 Fix timing issue in the KinesisMDChATests
https://build.spring.io/browse/INTEXT-AWS-157
2018-06-26 15:21:56 -04:00
Artem Bilan
133731f288 Fix race condition in the KinesisMDChATests 2018-06-26 13:34:01 -04:00
Artem Bilan
8247d0df1b Fix S3 Channel Adapters to use filter by default 2018-06-26 13:14:25 -04:00
Artem Bilan
6f39406309 Fix race condition: KinesisMDCA.consumerInvokers
https://build.spring.io/browse/INTEXT-AWS-JOB1-154
2018-06-25 21:58:19 -04:00
Artem Bilan
c655a8c4e2 Fix some locking issues in the KinesisMDChAdapter
Related to https://github.com/spring-projects/spring-integration-aws/issues/90
2018-06-25 21:42:24 -04:00
Artem Bilan
66e208f4f7 Try..catch updateTimeToLive in DynamoDbMetaDataSt
Related to https://github.com/spring-projects/spring-integration-aws/issues/90

The `dynamoDB.updateTimeToLive()` throws an exception if TTL is already
enabled on the table

* Wrap such a call to `try...catch()` and just log an error to let
the application to proceed
2018-06-25 21:29:11 -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
fca661404a Upgrade to the latest SC-AWS and fix tests 2018-06-14 13:42:43 -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
ffb4a6afe6 Fix JavaDocs for DynamoDbMetaDataStore
https://build.spring.io/browse/INTEXT-AWS-JOB1-148
2018-05-22 17:03:11 -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
Spring Buildmaster
50c1d6dcb7 [artifactory-release] Next development version 2018-04-16 18:10:39 +00:00
Spring Buildmaster
a011663ca7 [artifactory-release] Release version 2.0.0.M2 2018-04-16 18:10:33 +00: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