Commit Graph

11958 Commits

Author SHA1 Message Date
Artem Bilan
8f838d04ce GH-9455: Introduce IntegrationKeepAlive (#9493)
Fixes: #9455
Issue link: https://github.com/spring-projects/spring-integration/issues/9455

* Add an `IntegrationKeepAlive` infrastructure bean to initiate a long-lived non-daemon thread
to keep application alive when it cannot be kept like that for various reason, but has to.
* Expose `spring.integration.keepAlive` global property to disable an `IntegrationKeepAlive` auto-startup
* Test and document the feature
2024-09-25 14:31:41 -04:00
Artem Bilan
52e8174c66 Improve docs for GraalVM Polyglot dependencies
* Deprecate `jython` language indicator since only GraalVM Polyglot is there from now on
2024-09-25 13:03:07 -04:00
Artem Bilan
77ebee6d33 Fix Checkstyle violation 2024-09-24 17:25:52 -04:00
Artem Bilan
ec31a5bed8 GH-9507: Migrate Python support to GraalVM Polyglot
Fixes: #9507
Issue link: https://github.com/spring-projects/spring-integration/issues/9507

* Deprecate `PythonScriptExecutor` in favor of `PolyglotScriptExecutor` with a `python` as language
* Add handling for `PolyglotWrapper` return type of the script evaluation
* Rework `DeriveLanguageFromExtensionTests.testParseLanguage()` to the `@ParameterizedTest`
2024-09-24 17:19:43 -04:00
Artem Bilan
8082f3c3f9 Fix some compiler smells for Java 21 2024-09-24 14:33:16 -04:00
Tran Ngoc Nhan
fc377126de Modernize code for diamond, isEmpty & pattern matching 2024-09-23 14:42:38 -04:00
dependabot[bot]
40faaa0c15 Bump io.micrometer:micrometer-tracing-bom (#9497)
Bumps [io.micrometer:micrometer-tracing-bom](https://github.com/micrometer-metrics/tracing) from 1.4.0-M3 to 1.4.0-SNAPSHOT.
- [Release notes](https://github.com/micrometer-metrics/tracing/releases)
- [Commits](https://github.com/micrometer-metrics/tracing/commits)

---
updated-dependencies:
- dependency-name: io.micrometer:micrometer-tracing-bom
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-09-22 13:27:28 +00:00
dependabot[bot]
3664c943c6 Bump org.springframework:spring-framework-bom (#9499)
Bumps [org.springframework:spring-framework-bom](https://github.com/spring-projects/spring-framework) from 6.2.0-RC1 to 6.2.0-SNAPSHOT.
- [Release notes](https://github.com/spring-projects/spring-framework/releases)
- [Commits](https://github.com/spring-projects/spring-framework/commits)

---
updated-dependencies:
- dependency-name: org.springframework:spring-framework-bom
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-09-22 01:11:37 +00:00
dependabot[bot]
06324d4e7d Bump io.projectreactor:reactor-bom from 2024.0.0-M6 to 2024.0.0-SNAPSHOT (#9502)
Bumps [io.projectreactor:reactor-bom](https://github.com/reactor/reactor) from 2024.0.0-M6 to 2024.0.0-SNAPSHOT.
- [Release notes](https://github.com/reactor/reactor/releases)
- [Commits](https://github.com/reactor/reactor/commits)

---
updated-dependencies:
- dependency-name: io.projectreactor:reactor-bom
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-09-22 01:07:37 +00:00
dependabot[bot]
711be4c888 Bump protobufVersion from 4.28.1 to 4.28.2 (#9496)
Bumps `protobufVersion` from 4.28.1 to 4.28.2.

Updates `com.google.protobuf:protobuf-java` from 4.28.1 to 4.28.2
- [Release notes](https://github.com/protocolbuffers/protobuf/releases)
- [Changelog](https://github.com/protocolbuffers/protobuf/blob/main/protobuf_release.bzl)
- [Commits](https://github.com/protocolbuffers/protobuf/commits)

Updates `com.google.protobuf:protobuf-java-util` from 4.28.1 to 4.28.2

Updates `com.google.protobuf:protoc` from 4.28.1 to 4.28.2
- [Release notes](https://github.com/protocolbuffers/protobuf/releases)
- [Changelog](https://github.com/protocolbuffers/protobuf/blob/main/protobuf_release.bzl)
- [Commits](https://github.com/protocolbuffers/protobuf/commits)

---
updated-dependencies:
- dependency-name: com.google.protobuf:protobuf-java
  dependency-type: direct:production
  update-type: version-update:semver-patch
- dependency-name: com.google.protobuf:protobuf-java-util
  dependency-type: direct:production
  update-type: version-update:semver-patch
- dependency-name: com.google.protobuf:protoc
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-09-22 00:59:33 +00:00
dependabot[bot]
fac123065d Bump org.springframework.amqp:spring-amqp-bom (#9504)
Bumps [org.springframework.amqp:spring-amqp-bom](https://github.com/spring-projects/spring-amqp) from 3.2.0-M3 to 3.2.0-SNAPSHOT.
- [Release notes](https://github.com/spring-projects/spring-amqp/releases)
- [Commits](https://github.com/spring-projects/spring-amqp/commits)

---
updated-dependencies:
- dependency-name: org.springframework.amqp:spring-amqp-bom
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-09-22 00:59:20 +00:00
dependabot[bot]
3fc4a4e7c9 Bump org.springframework.kafka:spring-kafka-bom (#9498)
Bumps [org.springframework.kafka:spring-kafka-bom](https://github.com/spring-projects/spring-kafka) from 3.3.0-M3 to 3.3.0-SNAPSHOT.
- [Release notes](https://github.com/spring-projects/spring-kafka/releases)
- [Commits](https://github.com/spring-projects/spring-kafka/commits)

---
updated-dependencies:
- dependency-name: org.springframework.kafka:spring-kafka-bom
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-09-22 00:59:00 +00:00
dependabot[bot]
5a71395a5c Bump org.springframework.security:spring-security-bom (#9500)
Bumps [org.springframework.security:spring-security-bom](https://github.com/spring-projects/spring-security) from 6.4.0-M4 to 6.4.0-SNAPSHOT.
- [Release notes](https://github.com/spring-projects/spring-security/releases)
- [Changelog](https://github.com/spring-projects/spring-security/blob/main/RELEASE.adoc)
- [Commits](https://github.com/spring-projects/spring-security/commits)

---
updated-dependencies:
- dependency-name: org.springframework.security:spring-security-bom
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-09-22 00:58:43 +00:00
dependabot[bot]
56f841d17e Bump debeziumVersion from 2.7.2.Final to 2.7.3.Final (#9503)
Bumps `debeziumVersion` from 2.7.2.Final to 2.7.3.Final.

Updates `io.debezium:debezium-embedded` from 2.7.2.Final to 2.7.3.Final

Updates `io.debezium:debezium-connector-mysql` from 2.7.2.Final to 2.7.3.Final

---
updated-dependencies:
- dependency-name: io.debezium:debezium-embedded
  dependency-type: direct:production
  update-type: version-update:semver-patch
- dependency-name: io.debezium:debezium-connector-mysql
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-09-22 00:58:30 +00:00
dependabot[bot]
d7beafffb8 Bump io.micrometer:micrometer-bom from 1.14.0-M3 to 1.14.0-SNAPSHOT (#9501)
Bumps [io.micrometer:micrometer-bom](https://github.com/micrometer-metrics/micrometer) from 1.14.0-M3 to 1.14.0-SNAPSHOT.
- [Release notes](https://github.com/micrometer-metrics/micrometer/releases)
- [Commits](https://github.com/micrometer-metrics/micrometer/commits)

---
updated-dependencies:
- dependency-name: io.micrometer:micrometer-bom
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-09-22 00:58:15 +00:00
Tran Ngoc Nhan
94d8195a04 Use String.isEmpty instead of length 2024-09-21 13:56:28 -04:00
Artem Bilan
614ea69526 Migrate to DEVELOCITY_ACCESS_KEY secret for GHA
**Auto-cherry-pick to `6.3.x` & `6.2.x`**
2024-09-20 17:00:19 -04:00
Artem Bilan
430094f4b2 Migrate to DEVELOCITY_ACCESS_KEY secret for GHA workflows
**Auto-cherry-pick to `6.3.x` & `6.2.x`**
2024-09-18 16:37:27 -04:00
Artem Bilan
891dca7179 GH-9489: Remove Content-Length HTTP before sending GET request
Fixes: #9489
Issue link: https://github.com/spring-projects/spring-integration/issues/9489

If request message has a `Content-Length` HTTP, it is still mapped to the target HTTP request
even if that one is indicated as "no-body" (`GET`, `HEAD`, `TRACE`).
In this case Netty fails to decode such a missed body with error:
```
java.lang.IllegalArgumentException: text is empty (possibly HTTP/0.9)), version: HTTP/1.0
```

* Since `Content-Length` is not supposed to be supported for those methods,
remove it altogether from the HTTP request headers
* Add nullability API into the `org.springframework.integration.http.outbound`
* Check received HTTP request on the server side that it does not have such a header for `GET`

**Auto-cherry-pick to `6.3.x` & `6.2.x`**
2024-09-18 13:49:45 -04:00
Spring Builds
a6f9e780a6 [artifactory-release] Next development version 2024-09-17 23:54:49 +00:00
Spring Builds
7e1ee61092 [artifactory-release] Release version 6.4.0-M3 2024-09-17 23:54:46 +00:00
Artem Bilan
91ff857a8f Upgrade deps to the latest; prepare for release 2024-09-17 17:16:53 -04:00
Artem Bilan
725e66004c Remove com.gradle.develocity plugin
The plugin is managed transitively by the `io.spring.develocity.conventions` since version `0.0.21`

**Auto-cherry-pick to `6.3.x` & `6.2.x`**
2024-09-17 17:05:47 -04:00
dependabot[bot]
0c272c61cd Bump the development-dependencies group with 2 updates (#9487)
Bumps the development-dependencies group with 2 updates: [org.hibernate.orm:hibernate-core](https://github.com/hibernate/hibernate-orm) and org.apache.tomcat.embed:tomcat-embed-websocket.


Updates `org.hibernate.orm:hibernate-core` from 6.6.0.Final to 6.6.1.Final
- [Release notes](https://github.com/hibernate/hibernate-orm/releases)
- [Changelog](https://github.com/hibernate/hibernate-orm/blob/6.6.1/changelog.txt)
- [Commits](https://github.com/hibernate/hibernate-orm/compare/6.6.0...6.6.1)

Updates `org.apache.tomcat.embed:tomcat-embed-websocket` from 10.1.29 to 10.1.30

---
updated-dependencies:
- dependency-name: org.hibernate.orm:hibernate-core
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: development-dependencies
- dependency-name: org.apache.tomcat.embed:tomcat-embed-websocket
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: development-dependencies
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-09-17 20:58:18 +00:00
Artem Bilan
98d0266ba0 GH-9481: Fix JdbcMetadataStore for PostgreSQL & MySQL
Fixes: #9481
Issue link: https://github.com/spring-projects/spring-integration/issues/9481

MySQL throws `CannotAcquireLockException` in case of duplicate key failure.
PostgreSQL just rollbacks a transaction not letting us move on with a `SELECT`

* Include `TransientDataAccessException` to the catch block of the `INSERT`
to ignore it for the subsequent `SELECT`
* Add logic to determine `PostgreSQL` database vendor and include `ON CONFLICT DO NOTHING`
hint into the `INSERT` to not fail in case of duplicate key found on `putIfAbsent` operation

**Auto-cherry-pick to `6.3.x` & `6.2.x`**
2024-09-17 15:22:08 -04:00
Artem Bilan
64b49d1fac Remove applySystemFileSeparator() from SmbTestSupport
Related to: https://github.com/spring-projects/spring-integration/issues/9453

The `SmbSession` does not rely on a system file separator anymore
and just use regular Unix `/` separator all the time.
Therefore, `TestUtils.applySystemFileSeparator()` is wrong from test perspective on Windows

**Auto-cherry-pick to `6.3.x` & `6.2.x`**
2024-09-17 12:20:41 -04:00
Artem Bilan
a8174d5bce GH-9478: Fix MessagingGatewaySupport.onInit() for calling super.onInit()
Fixes: #9478
Issue link: https://github.com/spring-projects/spring-integration/issues/9478

Any `MessagingGatewaySupport` implementation does not register itself into a `SmartLifecycleRoleController`
because they don't call  `super.onInit()` of the `AbstractEndpoint`

* Fix `MessagingGatewaySupport` for calling  `super.onInit()` from its `onInit()`
* Verify `SmartLifecycleRoleController` registration in the `KafkaInboundGatewayTests`
* Remove out of use XML `group-id` attribute from Kafka channel adapter
and move it to the `channel` XSD as the place where it is really used

**Auto-cherry-pick to `6.3.x` & `6.2.x`**
2024-09-17 12:16:31 -04:00
dependabot[bot]
49329909f2 Bump org.springframework.retry:spring-retry from 2.0.8 to 2.0.9 (#9469)
Bumps [org.springframework.retry:spring-retry](https://github.com/spring-projects/spring-retry) from 2.0.8 to 2.0.9.
- [Release notes](https://github.com/spring-projects/spring-retry/releases)
- [Commits](https://github.com/spring-projects/spring-retry/compare/v2.0.8...v2.0.9)

---
updated-dependencies:
- dependency-name: org.springframework.retry:spring-retry
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-09-15 01:54:13 +00:00
dependabot[bot]
093f4a6e35 Bump the development-dependencies group with 2 updates (#9466)
Bumps the development-dependencies group with 2 updates: org.apache.tomcat.embed:tomcat-embed-websocket and [io.spring.develocity.conventions](https://github.com/spring-io/develocity-conventions).


Updates `org.apache.tomcat.embed:tomcat-embed-websocket` from 10.1.28 to 10.1.29

Updates `io.spring.develocity.conventions` from 0.0.20 to 0.0.21
- [Release notes](https://github.com/spring-io/develocity-conventions/releases)
- [Commits](https://github.com/spring-io/develocity-conventions/compare/v0.0.20...v0.0.21)

---
updated-dependencies:
- dependency-name: org.apache.tomcat.embed:tomcat-embed-websocket
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: development-dependencies
- dependency-name: io.spring.develocity.conventions
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: development-dependencies
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-09-15 00:54:36 +00:00
dependabot[bot]
4b2b8ff704 Bump org.springframework.data:spring-data-bom from 2024.0.3 to 2024.0.4 (#9468)
Bumps [org.springframework.data:spring-data-bom](https://github.com/spring-projects/spring-data-bom) from 2024.0.3 to 2024.0.4.
- [Release notes](https://github.com/spring-projects/spring-data-bom/releases)
- [Commits](https://github.com/spring-projects/spring-data-bom/compare/2024.0.3...2024.0.4)

---
updated-dependencies:
- dependency-name: org.springframework.data:spring-data-bom
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-09-15 00:49:35 +00:00
dependabot[bot]
c75f97a56e Bump org.apache.groovy:groovy-bom from 4.0.22 to 4.0.23 (#9467)
Bumps [org.apache.groovy:groovy-bom](https://github.com/apache/groovy) from 4.0.22 to 4.0.23.
- [Commits](https://github.com/apache/groovy/commits)

---
updated-dependencies:
- dependency-name: org.apache.groovy:groovy-bom
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-09-15 00:48:15 +00:00
pfosser
4cccee7c3a GH-9453: Correct separator when checking smb path
Fixes: #9453
Issue link: https://github.com/spring-projects/spring-integration/issues/9453

On a smb file upload, to detect the need for new remote directories,
the remote path was checked for the local filesystem path separator.
On Windows that is \\ which is never found in a smb path, so the
necessary remote path was not created and the operation failed.

Use the correct separator which was already available as a constant.

**Auto-cherry-pick to `6.3.x` & `6.2.x`**
2024-09-13 15:41:25 -04:00
Artem Bilan
a6c3a30d5b GH-9452: Expose ZipTransformer.setFileNameGenerator()
Fixes: #9452
Issue link: https://github.com/spring-projects/spring-integration/issues/9452

* Move the logic about `fileNameGenerator` configuration out of `AbstractZipTransformer`
since this property is not used by `UnZipTransformer` implementation
* Add more docs about `ZipTransformer` logic
2024-09-12 16:19:17 -04:00
Artem Bilan
e3a46ca528 GH-9436: Add support for SpEL IndexAccessor configuration (#9451)
Fixes: #9436
Issue link: https://github.com/spring-projects/spring-integration/issues/9436

* Expose `IndexAccessor` configuration options on the `AbstractEvaluationContextFactoryBean`
and `SpelPropertyAccessorRegistrar`
* Expose `<index-accessors>` sub-element for the `<spel-property-accessors>`
* Adjust tests
* Document the feature, including recently added `JsonIndexAccessor`
2024-09-12 15:38:58 -04:00
Artem Bilan
775bfd6168 GH-9442: Register dynamic flows as singletons
Fixes: #9442
Issue link: https://github.com/spring-projects/spring-integration/issues/9442

When we register a `BeanDefinition`, its metadata is cached in the `DefaultListableBeanFactory.mergedBeanDefinitionHolders`
and it is not removed when we destroy bean.
This causes a memory leak with dynamic integration flows where even we destroy beans, their metadata is still cached.
This has more serious impact when random ids are used for dynamic integration flows.

* Rework `IntegrationFlowContext` logic to register singletons instead of `BeanDefinition`
* Adjust `IntegrationFlowBeanPostProcessor` logic to register singletons or `BeanDefinition`
according to the presence of `BeanDefinition` of the `IntegrationFlow` we are processing
* Introduce `ComponentSourceAware` to mimic a `BeanDefinition` metadata logic for bean source and its description.
This info helps a lot with exceptions where class in the `IntegrationFlow` might be fully from a Spring Integration package.
So, to give a clue what end-user code is related to the exception,
such a `ComponentSourceAware` is there to preserver and transfer "bean source"
* Implement `ComponentSourceAware` in the `IntegrationObjectSupport` since this is a central
place where we generate info for the Spring Integration exceptions
* Implement `ComponentSourceAware` in the `StandardIntegrationFlow` to propagate bean source info
down to its components for the mentioned `IntegrationObjectSupport` logic
* Introduce inner `StandardIntegrationFlowContext.IntegrationFlowComponentSourceAwareAdapter`
to be able to transfer "bean source" info from builder down to the target `IntegrationFlow` bean
2024-09-10 20:48:17 -04:00
SSHINE OF BORG
d5d9f754c8 Fix LockRegistrty typo in the distributed-locks.adoc 2024-09-10 20:11:58 +00:00
dependabot[bot]
145a95b4e3 Bump mongoDriverVersion from 5.1.3 to 5.1.4 (#9445)
Bumps `mongoDriverVersion` from 5.1.3 to 5.1.4.

Updates `org.mongodb:mongodb-driver-sync` from 5.1.3 to 5.1.4
- [Release notes](https://github.com/mongodb/mongo-java-driver/releases)
- [Commits](https://github.com/mongodb/mongo-java-driver/compare/r5.1.3...r5.1.4)

Updates `org.mongodb:mongodb-driver-reactivestreams` from 5.1.3 to 5.1.4
- [Release notes](https://github.com/mongodb/mongo-java-driver/releases)
- [Commits](https://github.com/mongodb/mongo-java-driver/compare/r5.1.3...r5.1.4)

---
updated-dependencies:
- dependency-name: org.mongodb:mongodb-driver-sync
  dependency-type: direct:production
  update-type: version-update:semver-patch
- dependency-name: org.mongodb:mongodb-driver-reactivestreams
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-09-08 01:39:23 +00:00
dependabot[bot]
c8a9b336f8 Bump debeziumVersion from 2.7.1.Final to 2.7.2.Final (#9446)
Bumps `debeziumVersion` from 2.7.1.Final to 2.7.2.Final.

Updates `io.debezium:debezium-embedded` from 2.7.1.Final to 2.7.2.Final

Updates `io.debezium:debezium-connector-mysql` from 2.7.1.Final to 2.7.2.Final

---
updated-dependencies:
- dependency-name: io.debezium:debezium-embedded
  dependency-type: direct:production
  update-type: version-update:semver-patch
- dependency-name: io.debezium:debezium-connector-mysql
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-09-08 00:39:02 +00:00
dependabot[bot]
a9fa9ed2de Bump com.github.spotbugs in the development-dependencies group (#9444)
Bumps the development-dependencies group with 1 update: com.github.spotbugs.


Updates `com.github.spotbugs` from 6.0.21 to 6.0.22

---
updated-dependencies:
- dependency-name: com.github.spotbugs
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: development-dependencies
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-09-08 00:37:16 +00:00
Artem Bilan
e9a577d6bd GH-9428: Emit MQTT delivery events even if share client instance
Fixes: #9428

Issue link: https://github.com/spring-projects/spring-integration/issues/9428

When `ClientManager` is used for MQTT channel adapters, a `MqttMessageDeliveredEvent`
is not emitted since callback for the `ClientManager` is not aware about `deliveryComplete`

* Use a `MqttActionListener` abstraction for the `publish` operation instead of a `deliveryComplete`
from a common callback
* Make some other refactoring into the `MqttPahoMessageHandler` and `Mqttv5PahoMessageHandler`
extracting a common logic into their `AbstractMqttMessageHandler` superclass
* Introduce an `MqttMessageNotDeliveredEvent` to be emitted from the `MqttActionListener.onFailure()` callback
* Adapt mocks in the `MqttAdapterTests` for a new code flow
* Add delivery events verification into the `ClientManagerBackToBackTests`

* Fix race condition in the `ClientManagerBackToBackTests`

Looks like the message can be consumed even before we just emit that `MqttMessageSentEvent`
2024-09-04 15:31:01 -04:00
Sam Brannen
49a0aaa793 GH-9383: Introduce JsonIndexAccessor
Fixes: #9383

Issue link: https://github.com/spring-projects/spring-integration/issues/9383

* Polish `JsonPropertyAccessor[Tests]`
* Introduce `JsonIndexAccessor`

This commit introduces a `JsonIndexAccessor` as a complement to the
existing `JsonPropertyAccessor`.

When a `JsonIndexAccessor` is registered with the SpEL `EvaluationContext`,
JSON arrays can be consistently indexed via integer literals (e.g.,[1]) instead of string literals representing integers (e.g., ['1']).
2024-09-04 10:25:46 -04:00
dependabot[bot]
c179c06134 Bump protobufVersion from 4.27.3 to 4.27.4 (#9439)
Bumps `protobufVersion` from 4.27.3 to 4.27.4.

Updates `com.google.protobuf:protobuf-java` from 4.27.3 to 4.27.4
- [Release notes](https://github.com/protocolbuffers/protobuf/releases)
- [Changelog](https://github.com/protocolbuffers/protobuf/blob/main/protobuf_release.bzl)
- [Commits](https://github.com/protocolbuffers/protobuf/commits)

Updates `com.google.protobuf:protobuf-java-util` from 4.27.3 to 4.27.4

Updates `com.google.protobuf:protoc` from 4.27.3 to 4.27.4
- [Release notes](https://github.com/protocolbuffers/protobuf/releases)
- [Changelog](https://github.com/protocolbuffers/protobuf/blob/main/protobuf_release.bzl)
- [Commits](https://github.com/protocolbuffers/protobuf/commits)

---
updated-dependencies:
- dependency-name: com.google.protobuf:protobuf-java
  dependency-type: direct:production
  update-type: version-update:semver-patch
- dependency-name: com.google.protobuf:protobuf-java-util
  dependency-type: direct:production
  update-type: version-update:semver-patch
- dependency-name: com.google.protobuf:protoc
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-09-01 00:11:59 +00:00
dependabot[bot]
f1280c8a5c Bump com.github.spotbugs in the development-dependencies group (#9438)
Bumps the development-dependencies group with 1 update: com.github.spotbugs.


Updates `com.github.spotbugs` from 6.0.20 to 6.0.21

---
updated-dependencies:
- dependency-name: com.github.spotbugs
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: development-dependencies
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-09-01 00:10:03 +00:00
Artem Bilan
8242ca6a91 GH-9430: Fix leak for the TCP/IP caching
Related to: https://github.com/spring-projects/spring-integration/issues/9430

**Auto-cherry-pick to `6.3.x` & `6.2.x`**
2024-08-30 16:23:54 -04:00
Artem Bilan
c27cc4b11c GH-9427: Improve nullability for remote path expression (#9434)
Fixes: #9427

Issue link: https://github.com/spring-projects/spring-integration/issues/9427

The `expression` of the `AbstractRemoteFileOutboundGateway` could be `null` and
ignored for some expressions making a DSL factories inconsistent

* Improve `AbstractRemoteFileOutboundGateway` constructor JavaDocs explaining
`expression` argument in more details
* Add `@Nullable` for this `expression` arg in all the `AbstractRemoteFileOutboundGateway` implementations
* Add new DSL factory method for `outboundGateway()` without this `expression` for those commands when it is not needed
2024-08-30 11:52:44 -04:00
Artem Bilan
dc02dec4de GH-9430: Fix CachingClientCF for collaborating channel adapters (#9431)
Fixes: #9430

When `CachingClientConnectionFactory` is used in combination of
`Tcp.outboundAdapter()` & `Tcp.inboundAdapter()`, the connection is not released
back to the cache because `CachingClientConnectionFactory` does not store
created connections into its `connections` property.
So, when `TcpReceivingChannelAdapter` calls `this.clientConnectionFactory.closeConnection(connectionId);`
it returned immediately because there is nothing to remove from the `this.connections`

* Add `protected removeConnection()` in the `AbstractConnectionFactory`
and override it in the `CachingClientConnectionFactory` with delegation to the `this.targetConnectionFactory`
* Demonstrate the problem in the new `IpIntegrationTests.allRepliesAreReceivedViaLimitedCachingConnectionFactory()` test
and ensure that all 27 letters from English alphabet are sent to the server and received in uppercase
while size of the `CachingClientConnectionFactory` is only `10`

**Auto-cherry-pick to `6.3.x` & `6.2.x`**
2024-08-29 20:39:09 -04:00
Artem Bilan
f10fbca38b Switch ci-snapshot.yml to the latest reusable WF
**Auto-cherry-pick to `6.3.x` & `6.2.x`**
2024-08-28 15:00:40 -04:00
Artem Bilan
730e49adec More @DirtiesContext in tests to mitigate memory
* Some other cleanups and modernizations for affected test class and their configurations
2024-08-28 14:25:38 -04:00
Artem Bilan
eb07fda61b Remove redundant OSSRH_URL secret for release workflow
**Auto-cherry-pick to `6.3.x` & `6.2.x`**
2024-08-28 09:19:09 -04:00
dependabot[bot]
e062c02daf Bump org.springframework:spring-framework-bom (#9426)
Bumps [org.springframework:spring-framework-bom](https://github.com/spring-projects/spring-framework) from 6.2.0-M7 to 6.2.0-SNAPSHOT.
- [Release notes](https://github.com/spring-projects/spring-framework/releases)
- [Commits](https://github.com/spring-projects/spring-framework/commits)

---
updated-dependencies:
- dependency-name: org.springframework:spring-framework-bom
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-08-25 01:45:07 +00:00