diff --git a/applications/source/file-source/README.adoc b/applications/source/file-source/README.adoc index c3b1a502..c624d1d5 100644 --- a/applications/source/file-source/README.adoc +++ b/applications/source/file-source/README.adoc @@ -36,6 +36,43 @@ $$directory$$:: $$The directory to poll for new files.$$ *($$File$$, default: `$ $$filename-pattern$$:: $$A simple ant pattern to match files.$$ *($$String$$, default: `$$$$`)* $$filename-regex$$:: $$A regex pattern to match files.$$ *($$Pattern$$, default: `$$$$`)* $$prevent-duplicates$$:: $$Set to true to include an AcceptOnceFileListFilter which prevents duplicates.$$ *($$Boolean$$, default: `$$true$$`)* + +=== metadata.store.dynamo-db + +$$create-delay$$:: $$Delay between create table retries.$$ *($$Integer$$, default: `$$1$$`)* +$$create-retries$$:: $$Retry number for create table request.$$ *($$Integer$$, default: `$$25$$`)* +$$read-capacity$$:: $$Read capacity on the table.$$ *($$Long$$, default: `$$1$$`)* +$$table$$:: $$Table name for metadata.$$ *($$String$$, default: `$$$$`)* +$$time-to-live$$:: $$TTL for table entries.$$ *($$Integer$$, default: `$$$$`)* +$$write-capacity$$:: $$Write capacity on the table.$$ *($$Long$$, default: `$$1$$`)* + +=== metadata.store.gemfire + +$$region$$:: $$Gemfire region name for metadata.$$ *($$String$$, default: `$$$$`)* + +=== metadata.store.jdbc + +$$region$$:: $$Unique grouping identifier for messages persisted with this store.$$ *($$String$$, default: `$$DEFAULT$$`)* +$$table-prefix$$:: $$Prefix for the custom table name.$$ *($$String$$, default: `$$$$`)* + +=== metadata.store.mongo-db + +$$collection$$:: $$MongoDB collection name for metadata.$$ *($$String$$, default: `$$metadataStore$$`)* + +=== metadata.store.redis + +$$key$$:: $$Redis key for metadata.$$ *($$String$$, default: `$$$$`)* + +=== metadata.store + +$$type$$:: $$Indicates the type of metadata store to configure (default is 'memory'). You must include the corresponding Spring Integration dependency to use a persistent store.$$ *($$StoreType$$, default: `$$$$`, possible values: `mongodb`,`gemfire`,`redis`,`dynamodb`,`jdbc`,`zookeeper`,`hazelcast`,`memory`)* + +=== metadata.store.zookeeper + +$$connect-string$$:: $$Zookeeper connect string in form HOST:PORT.$$ *($$String$$, default: `$$127.0.0.1:2181$$`)* +$$encoding$$:: $$Encoding to use when storing data in Zookeeper.$$ *($$Charset$$, default: `$$UTF-8$$`)* +$$retry-interval$$:: $$Retry interval for Zookeeper operations in milliseconds.$$ *($$Integer$$, default: `$$1000$$`)* +$$root$$:: $$Root node - store entries are children of this node.$$ *($$String$$, default: `$$/SpringIntegration-MetadataStore$$`)* //end::configuration-properties[] //end::ref-doc[] diff --git a/applications/source/http-source/pom.xml b/applications/source/http-source/pom.xml index 347d46de..4ec748ba 100644 --- a/applications/source/http-source/pom.xml +++ b/applications/source/http-source/pom.xml @@ -12,6 +12,7 @@ org.springframework.cloud.stream.app stream-applications-core 3.2.1-SNAPSHOT + diff --git a/applications/source/mail-source/src/test/java/org/springframework/cloud/stream/app/source/file/MailSourceTests.java b/applications/source/mail-source/src/test/java/org/springframework/cloud/stream/app/source/file/MailSourceTests.java index 5385095c..d1031b52 100644 --- a/applications/source/mail-source/src/test/java/org/springframework/cloud/stream/app/source/file/MailSourceTests.java +++ b/applications/source/mail-source/src/test/java/org/springframework/cloud/stream/app/source/file/MailSourceTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2020-2021 the original author or authors. + * Copyright 2020-2022 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -20,24 +20,37 @@ import org.junit.jupiter.api.AfterAll; import org.junit.jupiter.api.BeforeAll; import org.junit.jupiter.api.Test; -import org.springframework.boot.WebApplicationType; +import org.springframework.beans.factory.annotation.Autowired; import org.springframework.boot.autoconfigure.SpringBootApplication; -import org.springframework.boot.builder.SpringApplicationBuilder; +import org.springframework.boot.test.context.SpringBootTest; import org.springframework.cloud.fn.supplier.mail.MailSupplierConfiguration; import org.springframework.cloud.stream.binder.test.OutputDestination; import org.springframework.cloud.stream.binder.test.TestChannelBinderConfiguration; -import org.springframework.context.ConfigurableApplicationContext; import org.springframework.context.annotation.Import; import org.springframework.integration.test.mail.TestMailServer; import org.springframework.messaging.Message; +import org.springframework.test.annotation.DirtiesContext; import static org.assertj.core.api.Assertions.assertThat; - /** + * Lightweight integration test to verify using {@link MailSupplierConfiguration} in a {@code @SpringBootApplication}. + * * @author Soby Chacko + * @author Chris Bono */ -public class MailSourceTests { +@SpringBootTest( + webEnvironment = SpringBootTest.WebEnvironment.NONE, + properties = { + "spring.cloud.function.definition=mailSupplier", + "mail.supplier.url=imap://user:pw@localhost:${test.mail.server.port}/INBOX", + "mail.supplier.mark-as-read=true", + "mail.supplier.delete=false", + "mail.supplier.user-flag=testSIUserFlag", + "mail.supplier.java-mail-properties=mail.imap.socketFactory.fallback=true\\n mail.store.protocol=imap\\n mail.debug=true" + }) +@DirtiesContext +class MailSourceTests { private static TestMailServer.MailServer MAIL_SERVER; @@ -64,27 +77,14 @@ public class MailSourceTests { } @Test - public void testMailSource() throws Exception { - try (ConfigurableApplicationContext context = new SpringApplicationBuilder( - TestChannelBinderConfiguration - .getCompleteConfiguration(MailSourceTestApplication.class)) - .web(WebApplicationType.NONE) - .run("--spring.cloud.function.definition=mailSupplier", - "--mail.supplier.url=imap://user:pw@localhost:${test.mail.server.port}/INBOX", - "--mail.supplier.mark-as-read=true", - "--mail.supplier.delete=false", - "--mail.supplier.user-flag=testSIUserFlag", - "--mail.supplier.java-mail-properties=mail.imap.socketFactory.fallback=true\\n mail.store.protocol=imap\\n mail.debug=true")) { - - OutputDestination target = context.getBean(OutputDestination.class); - Message sourceMessage = target.receive(10000, "mailSupplier-out-0"); - final String actual = new String(sourceMessage.getPayload()); - assertThat(actual.endsWith("\r\n\r\nfoo\r\n\r\n")); - } + void mailMessagesAreSuppliedToOutputDestination(@Autowired OutputDestination target) { + Message sourceMessage = target.receive(10000, "mailSupplier-out-0"); + final String actual = new String(sourceMessage.getPayload()); + assertThat(actual.endsWith("\r\n\r\nfoo\r\n\r\n")).isTrue(); } @SpringBootApplication - @Import(MailSupplierConfiguration.class) + @Import({TestChannelBinderConfiguration.class, MailSupplierConfiguration.class}) public static class MailSourceTestApplication { } } diff --git a/applications/stream-applications-core/pom.xml b/applications/stream-applications-core/pom.xml index 3a77b1f0..a0b4c789 100644 --- a/applications/stream-applications-core/pom.xml +++ b/applications/stream-applications-core/pom.xml @@ -18,20 +18,19 @@ 3.2.1-SNAPSHOT ${revision} - 1.2.0 + 1.2.1-SNAPSHOT springcloud/baseimage:1.0.1 - 5.10 - 3.2.2 - 3.2.2 + 5.13.2 + 3.2.3 + 3.2.3 1.0.7-SNAPSHOT 1.0.7-SNAPSHOT 1.0.7-SNAPSHOT - 2.1.2.RELEASE - 1.3.0 - - 2.2.0 - 2021.0.1 - 3.1.1 + 2.4.0 + 1.4.0 + 2.2.2 + 2021.0.2 + 3.1.2 diff --git a/applications/stream-applications-core/stream-applications-composite-function-support/pom.xml b/applications/stream-applications-core/stream-applications-composite-function-support/pom.xml index 82a1b260..a35fdd76 100644 --- a/applications/stream-applications-core/stream-applications-composite-function-support/pom.xml +++ b/applications/stream-applications-core/stream-applications-composite-function-support/pom.xml @@ -22,7 +22,6 @@ org.springframework.cloud.stream.app stream-applications-core ${revision} - .. 4.0.0 diff --git a/applications/stream-applications-core/stream-applications-micrometer-common/pom.xml b/applications/stream-applications-core/stream-applications-micrometer-common/pom.xml index 8322727a..846311ab 100644 --- a/applications/stream-applications-core/stream-applications-micrometer-common/pom.xml +++ b/applications/stream-applications-core/stream-applications-micrometer-common/pom.xml @@ -6,7 +6,6 @@ stream-applications-core org.springframework.cloud.stream.app ${revision} - .. 1.49 diff --git a/applications/stream-applications-core/stream-applications-postprocessor-common/pom.xml b/applications/stream-applications-core/stream-applications-postprocessor-common/pom.xml index d8f639f7..24c7ea78 100644 --- a/applications/stream-applications-core/stream-applications-postprocessor-common/pom.xml +++ b/applications/stream-applications-core/stream-applications-postprocessor-common/pom.xml @@ -5,7 +5,6 @@ stream-applications-core org.springframework.cloud.stream.app ${revision} - .. 4.0.0 diff --git a/applications/stream-applications-core/stream-applications-security-common/pom.xml b/applications/stream-applications-core/stream-applications-security-common/pom.xml index d48563a0..b0252dfb 100644 --- a/applications/stream-applications-core/stream-applications-security-common/pom.xml +++ b/applications/stream-applications-core/stream-applications-security-common/pom.xml @@ -6,7 +6,6 @@ stream-applications-core org.springframework.cloud.stream.app ${revision} - .. 4.0.0 diff --git a/applications/stream-applications-core/stream-applications-test-support/pom.xml b/applications/stream-applications-core/stream-applications-test-support/pom.xml index dc25b46f..318192bb 100644 --- a/applications/stream-applications-core/stream-applications-test-support/pom.xml +++ b/applications/stream-applications-core/stream-applications-test-support/pom.xml @@ -5,7 +5,6 @@ stream-applications-core org.springframework.cloud.stream.app ${revision} - .. 4.0.0 diff --git a/functions/common/cdc-debezium-common/src/main/java/org/springframework/cloud/fn/common/cdc/EmbeddedEngine.java b/functions/common/cdc-debezium-common/src/main/java/org/springframework/cloud/fn/common/cdc/EmbeddedEngine.java index 687275c0..4f281416 100644 --- a/functions/common/cdc-debezium-common/src/main/java/org/springframework/cloud/fn/common/cdc/EmbeddedEngine.java +++ b/functions/common/cdc-debezium-common/src/main/java/org/springframework/cloud/fn/common/cdc/EmbeddedEngine.java @@ -934,7 +934,7 @@ public final class EmbeddedEngine implements DebeziumEngine { public synchronized void markProcessed(SourceRecord record) throws InterruptedException { task.commitRecord(record); recordsSinceLastCommit += 1; - offsetWriter.offset(record.sourcePartition(), record.sourceOffset()); + offsetWriter.offset((Map) record.sourcePartition(), (Map) record.sourceOffset()); } @Override diff --git a/functions/function-dependencies/pom.xml b/functions/function-dependencies/pom.xml index ffb63d70..c987cb01 100644 --- a/functions/function-dependencies/pom.xml +++ b/functions/function-dependencies/pom.xml @@ -8,7 +8,6 @@ org.springframework.cloud.fn java-functions-parent ${revision} - .. function-dependencies diff --git a/functions/spring-functions-parent/pom.xml b/functions/spring-functions-parent/pom.xml index 1505e86b..ec39e52a 100644 --- a/functions/spring-functions-parent/pom.xml +++ b/functions/spring-functions-parent/pom.xml @@ -8,14 +8,13 @@ org.springframework.cloud.fn java-functions-parent ${revision} - .. spring-functions-parent pom - 3.2.2 + 3.2.3 ${project.version} diff --git a/stream-applications-build/pom.xml b/stream-applications-build/pom.xml index 9e55984c..cb496fc4 100644 --- a/stream-applications-build/pom.xml +++ b/stream-applications-build/pom.xml @@ -40,12 +40,12 @@ 0.0.2.RELEASE true 0.0.7 - 2.6.3 - 2.8.2 - 2.4.2 - 3.2.2 - 3.1.1 - 1.6.4 + 2.6.7 + 2.8.6 + 2.4.5 + 3.2.3 + 3.1.2 + 1.6.7 1.16.3 1.2.5 2.22.2