Commit Graph

189 Commits

Author SHA1 Message Date
Soby Chacko
d1a0aff623 GH-2820: Component beans and function return types
- When Kafka Streams functions are provided as component beans,
   the function type check in the core Spring Cloud Stream framework,
   fails with an NPE. Addressing this issue.

Resolves https://github.com/spring-cloud/spring-cloud-stream/issues/2820
2023-09-29 17:00:09 -04:00
Soby Chacko
db5b717fc4 StreamBridge test cleanup
- Fix a race condtion that causes a CI failure
2023-09-28 15:35:46 -04:00
Oleg Zhurakousky
a74b3d5e99 Disabled few tests temporarily to get clean GH actions build 2023-09-28 16:55:24 +02:00
buildmaster
cd0e3c1a38 Going back to snapshots 2023-09-27 10:33:44 +00:00
buildmaster
ecaf757a38 Update SNAPSHOT to 4.1.0-M2 2023-09-27 10:29:34 +00:00
Soby Chacko
34aae4b62d GH-2806: Pulsar binder defaults properties config
- Ensure that the Pulsar binder default properties can be properly
   expressed via spring.cloud.stream.pulsar.default property prefix.
 - Add the binder child context bean with the name binderName_binderProducingContext
   into the parent application context so that individual beans from the binder context
   can be easily queried.

Resolves https://github.com/spring-cloud/spring-cloud-stream/issues/2806
2023-09-21 09:37:54 -05:00
Soby Chacko
7e7688ce1b GH-2805: StreamBridge send and custom content-type
- When StreamBridge#send is called with binder-name and custom content-type,
   it does not honor the content-type value, but default to application/json.
   Fixing this issue for this call path by explicitly checking for any custom
   content-type provided on the binding.

Resolves https://github.com/spring-cloud/spring-cloud-stream/issues/2805
Resolves #2813
2023-09-20 13:09:51 +02:00
omercelikceng
248fe01b9a Cloud Stream Core RuntimeHints
- Adding missing runtime hints for Stream Binding (InputBindingLifecycle and OutputBindingLifecycle)

Resolves spring-cloud#2793
2023-09-19 16:39:18 -04:00
Soby Chacko
28ebf327fc Make AbstractBindingLifecycle public
See this discussion for details:
https://github.com/spring-cloud/spring-cloud-stream/pull/2793#issuecomment-1715420091
2023-09-14 10:57:29 -04:00
Soby Chacko
3c65104b1d GH-2796: Fix partition count related issues (#2807)
If a target middleware (Kafka for ex) topic has more partitions
than what is set on the partition-count producer property, the binder
never updates the original producer partition-count property to the
partition count from the middleware if it is higher than what was given
through the property. Because of this, te PartitionAwareFunctionWrapper
which evaluates and assigns the partition header in Spring Cloud Stream
does not compute the correct partition since the hash operation still
using the original partition-count from the producer binding property.
This commit is addressing this issue.

Resolves https://github.com/spring-cloud/spring-cloud-stream/issues/2796
2023-09-14 08:52:14 -04:00
Soby Chacko
1a62bc3913 GH-2799: AOT processing and conversion service
When building in AOT mode, the BinderChildContextInitializer is unable to get access
to a SpEL expression conversion service in order to properly bind spring.cloud.stream
prefixed properties with values containing SpEL expressions such as headers[partition-key-expression].
However, we don't need to bind at this level of generality (spring.cloud.stream.*) in the
BinderChildContextInitializer since we are only looking for the user defined binders there.
To fix the issue, this commit explicitly binds only the spring.cloud.stream.binders.* properties
and ignores any other binding properties via spring.cloud.stream prefix. Any such conversions
will be done in later phases after the binder contexts are created.

Resolves https://github.com/spring-cloud/spring-cloud-stream/issues/2799
2023-09-12 18:04:53 -04:00
omercelik
149714062c GH-2787: NestedConfigurationProperties for native
Nested configurations(BindingProperties(ConsumerProperties and ProducerProperties))
in the BindingServiceProperties class do not work when built with native image.
For this reason, the consumer and producer properties under the Bindings configuration
do not work. Adding @NestedConfigurationProperty annotation on the property fields
in BindingProperties.

For more info see https://docs.spring.io/spring-boot/docs/current/reference/html/native-image.html#native-image.advanced

Resolves https://github.com/spring-cloud/spring-cloud-stream/issues/2787
2023-09-05 16:37:03 -04:00
Debugging Sparrow
3f4365156e Fix typo in BinderProperties
Fix typo in BinderProperties
2023-09-01 20:45:36 -04:00
omercelik
fbecaaa5ca GH-2788: Outer context bean needed for AOT
OuterContext bean is added to application context for AOT.
This bean is needed when the actuator dependency is added.

Resolves https://github.com/spring-cloud/spring-cloud-stream/issues/2788
2023-08-15 15:36:49 -04:00
buildmaster
6c28820e8e Going back to snapshots 2023-08-10 01:30:10 +00:00
buildmaster
4743859cd7 Update SNAPSHOT to 4.1.0-M1 2023-08-10 01:26:38 +00:00
Oleg Zhurakousky
b4e976f371 GH-2783 Ensure proper cashing of StreamBridge function
Resolves #2783
2023-08-09 15:58:47 +02:00
Soby Chacko
93b584d20e Fix BindersHealthContributor thread safety issues
Resolves https://github.com/spring-cloud/spring-cloud-stream/issues/2780
2023-07-25 16:59:23 -04:00
Soby Chacko
50c461fb30 Fix test for the second binding in the previous commit
Resolves #2772
Resooves #2770
2023-07-17 13:29:22 +02:00
Soby Chacko
b83b2c6aa4 GH-2770: sendto header and key extraction
When sendto header is used for dynamic destinations
and a partition key extractor is given for binder based
partitioning, then the partition key extractor is not invoked
when publishing the message. Addressing this issue.

Resolves https://github.com/spring-cloud/spring-cloud-stream/issues/2770
2023-07-17 13:01:35 +02:00
Soby Chacko
efe6c87d48 Avoid StreamBridge double partition finding
- In StreamBridge send method, there is a path, in which it
   tries to find the partition information twice, causing it
   to throw errors when using patition key expresson that
   involves the payload. This is because, the second time it
   tries to find the partition, the payload is already converted
   into byte[]. This second partition finding is unncessary.

Resolves https://github.com/spring-cloud/spring-cloud-stream/issues/2759
2023-06-21 13:55:25 -04:00
Soby Chacko
3235492304 Checkstyle fix 2023-06-16 16:11:21 -04:00
manyasi06
09a47b06a1 add test for improving coverage defaultbinder 2023-06-16 15:04:10 +02:00
Soby Chacko
63d2bd3256 Updating to 4.1.0-SNAPSHOT 2023-06-14 14:22:10 -04:00
Soby Chacko
2093cb6a99 Multi output partition issues
- When using reactive functions, partition selector strategy does not
   use the configured partition count for multiple outbounds. This is
   because we take the first configured output binding and apply it's
   partition counts on all the outbound reactive streams (Tuples).
   Addressing this issue by properly applying the correct partition handling
   per output binding.

Resolves https://github.com/spring-cloud/spring-cloud-stream/issues/2750
2023-06-14 17:41:22 +02:00
Oleg Zhurakousky
abf5aab2aa GH-2744 Wrap shared beans loading in Throwable
Resolves #2744
2023-06-07 14:24:04 +02:00
Oleg Zhurakousky
2b95f26d64 Polishing previous PR
Resolves #2748
2023-06-07 14:06:27 +02:00
Ivan Shapoval
8d99e80e87 Fix for function auto-detection when input/output-bindings are defined 2023-06-07 10:10:44 +02:00
Oleg Zhurakousky
1e5b41cfee GH-SCF-1045 Fix type discovery in DefaultPollableMessageSource 2023-06-06 09:54:28 +02:00
Soby Chacko
9a773c8647 Cleaning up tests
- Remove unused components from CustomPartitionedProducerTest
2023-06-02 12:40:11 -04:00
Soby Chacko
4f6361c6c4 Troubleshooting CI test failures 2023-06-02 12:06:57 -04:00
Chris Bono
99ae05314a Instrument BinderChildContextInitializerTests to debug failure in CI
- The BinderChildContextInitializerTests is failing in Jenkins but not locally. This adds temporary sout to the test in order to see what the issue is in the child context creation.
2023-06-01 15:45:23 -04:00
Oleg Zhurakousky
2ab71f2f32 Fix function auto-detection when single function and input/output-bindings are defined 2023-05-31 18:37:15 +02:00
Oleg Zhurakousky
5dc2decda2 Cleanup POMs, upgrade versions 2023-05-30 10:05:01 +02:00
Oleg Zhurakousky
8f5e6692c1 Removed explicit Kotlin versioning from POM 2023-05-26 17:23:52 +02:00
buildmaster
0b7d773b30 Bumping versions to 4.0.4-SNAPSHOT after release 2023-05-24 18:47:37 +00:00
buildmaster
16cf46d74f Going back to snapshots 2023-05-24 18:47:37 +00:00
buildmaster
1550366414 Update SNAPSHOT to 4.0.3 2023-05-24 18:43:23 +00:00
Soby Chacko
1b3fc7074b Reactive Kafka Binder errors when concurrency > 1 (#2734)
* Reactive Kafka Binder errors when concurrency > 1

When using Reactive Kafka binder, it is allowed to have concurrency > 1.
There is a check in FunctionConfiguration that throws an error if concurrency
is > 1, when using reactive types. Since it is allowed to do so with
Reative Kafka binder, switch this conversion into a warning log message.

Resolves https://github.com/spring-cloud/spring-cloud-stream/issues/2726

* Update core/spring-cloud-stream/src/main/java/org/springframework/cloud/stream/function/FunctionConfiguration.java

Co-authored-by: Gary Russell <grussell@vmware.com>

* Update core/spring-cloud-stream/src/main/java/org/springframework/cloud/stream/function/FunctionConfiguration.java

Co-authored-by: Gary Russell <grussell@vmware.com>

* Update core/spring-cloud-stream-integration-tests/src/test/java/org/springframework/cloud/stream/function/ImplicitFunctionBindingTests.java

Co-authored-by: Gary Russell <grussell@vmware.com>

---------

Co-authored-by: Gary Russell <grussell@vmware.com>
2023-05-15 16:09:45 -04:00
oliverfuehrer
29c3cd7cdd Dynamic partition improvements in Kafka binder
Resolves https://github.com/spring-cloud/spring-cloud-stream/issues/2706

  - Update partition count changes in Kafka dynamically during runtime
  - Checkstyle fixes
  - PartitionHandler changes
  - Improved handling of expression with 'payload' in the logic
  - Removed getter/setter for PartitionHandler and use ReflectionUtils within Test
  - Renamed property to 'dynamicPartitionUpdatesEnabled' and improved documentation (also one line per sentence)
  - Improved/renamed test to use embeddedkafka and really test update behaviour
  - Javadoc
2023-05-09 10:14:12 -04:00
Soby Chacko
e19bdd4381 Allow BindableFunctionProxyFactory to be used from outside
Make the top-level constructor of BindableFunctionProxyFactory public
so that external clients could access it.

Resolves https://github.com/spring-cloud/spring-cloud-stream/issues/2721
2023-05-03 16:06:41 -04:00
Oleg Zhurakousky
a922bf3aca Made deprecated method private in OutputDestination 2023-04-21 11:34:43 +02:00
Soby Chacko
33486848da Verifying binder name/type on bindings endpoint
Adding tests for https://github.com/spring-cloud/spring-cloud-stream/issues/2716
2023-04-20 14:45:48 -04:00
Soby Chacko
3abf06345a Binder name in actuator binding endpoints
- Fixing an issue where binder name is broken in bindings endpoint
   when default-binder property is provided with multiple binders
   on the classpath.

Resolves https://github.com/spring-cloud/spring-cloud-stream/issues/2716
2023-04-20 13:19:40 -04:00
Chris Bono
3990bb485e GH-2705: AOT support complex binding properties
- Sets the conversion service on AOT child binder
  contexts to allow complex properties to be
  bound in extended binding props

Fixes #2705
2023-04-18 09:32:21 -04:00
Oleg Zhurakousky
3c29149a14 GH-2707 Add support for function post processing 2023-04-13 13:53:06 +02:00
Chris Bono
a01bf30d38 GH-2655: AOT support user declared binders
- Adds support for AOT child context generation
  for user-declared binder configurations.

Fixes #2655
2023-04-04 20:50:55 -04:00
buildmaster
ea37eed9be Bumping versions 2023-03-29 17:33:29 +00:00
buildmaster
b2f2b51b90 Bumping versions 2023-03-28 17:27:48 +00:00
buildmaster
58c028f339 Bumping versions to 4.0.3-SNAPSHOT after release 2023-03-28 14:51:23 +00:00