Commit Graph

194 Commits

Author SHA1 Message Date
buildmaster
4a991fd994 Bumping versions 2024-01-28 02:32:58 +00:00
buildmaster
adf69a3256 Bumping versions 2024-01-26 02:32:37 +00:00
buildmaster
b07377207c Bumping versions to 4.0.6-SNAPSHOT after release 2024-01-25 21:09:15 +00:00
buildmaster
5859a1758d Going back to snapshots 2024-01-25 21:09:15 +00:00
buildmaster
16728e6b2b Update SNAPSHOT to 4.0.5 2024-01-25 21:04:50 +00:00
Soby Chacko
0aae39707e GH-2883: CCE from custom error channel bean
Resolves https://github.com/spring-cloud/spring-cloud-stream/issues/2883

When an applicaiton provides a custom errorChannel bean that is not of type
`PublishSubscribeChannel`, the application fails to start with a CCE. This is
because `BindingServiceConfiguration` uses a hard cast on `PublishSubscribeChannel`
without pre-checking the channel type. Fixing this issue.
2024-01-22 17:26:04 -05:00
Soby Chacko
09b408416b Fix compile issues 2024-01-19 16:07:34 -05:00
Soby Chacko
e55de656eb GH-2885: Channel used by StreamBridge missing name
Fixes https://github.com/spring-cloud/spring-cloud-stream/issues/2885

The `DirectWithAttributesChannel` used by `StreamBridge` is missing naming
information. Adding the proper application context and component name data
to the channel so that it is able to construct a name when queried.
2024-01-19 15:59:28 -05:00
Soby Chacko
d63f873c30 GH-2794: AMCB ObjectMaper serialization issues
Fixes https://github.com/spring-cloud/spring-cloud-stream/issues/2794

The custom ObjectMapper used in AMCB is unable to serialize java.time.Duration
values. To fix this, the ObjectMapper needs to register the JavaTimeModule from
the jackson-datatype-jsr310 libarary.

Adding a test to verify the fix.
2023-12-21 17:24:07 -05:00
Oleg Zhurakousky
1e1bcec914 GH-2728 Reverse order of propagation of beans between parent and child context
Resolves #2728
2023-12-04 18:01:56 +01:00
Oleg Zhurakousky
4c66ed77c9 Add test for empty JSON 2023-11-30 19:01:47 +01:00
kurt
3575c9937d StreamBridge's dynamic destinations should be closed on shutdown.
- if not, we might lose some messages on shutdown especially in case of kafka async mode producing.

Resolves #2835
2023-10-20 16:04:57 +02:00
Soby Chacko
eebbe7a5bb GH-2815: StreamBridge partitioning fixes
- When native encoding is used, StreamBridge is not setting
   partitioning interceptor which calls the PartitionHandler.
   This is a regression issue and adding the interceptor explicitly
   when native encoding is used.

Resolves https://github.com/spring-cloud/spring-cloud-stream/issues/2815
Resolves #2831
2023-10-18 15:07:44 +02:00
Soby Chacko
39cca4766a 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:02:22 -04:00
Soby Chacko
b8c45b646a 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:12:05 +02:00
Soby Chacko
8fdf5637de Make AbstractBindingLifecycle public
See this discussion for details:
https://github.com/spring-cloud/spring-cloud-stream/pull/2793#issuecomment-1715420091
2023-09-19 18:55:14 -04:00
omercelikceng
d96939493b Cloud Stream Core RuntimeHints
- Adding missing runtime hints for Stream Binding (InputBindingLifecycle and OutputBindingLifecycle)

Resolves spring-cloud#2793
2023-09-19 17:36:53 -04:00
omercelik
8b33104b8d 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 17:01:29 -04:00
Debugging Sparrow
9570e55a65 Fix typo in BinderProperties
Fix typo in BinderProperties
2023-09-05 13:15:01 -04:00
omercelik
09f791d968 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:42:47 -04:00
Oleg Zhurakousky
fce5df6c57 GH-2783 Ensure proper cashing of StreamBridge function
Resolves #2783
2023-08-09 16:01:16 +02:00
buildmaster
afe3666962 Bumping versions to 4.0.5-SNAPSHOT after release 2023-07-27 20:02:52 +00:00
buildmaster
69bffeb7a6 Going back to snapshots 2023-07-27 20:02:52 +00:00
buildmaster
f0d66cf8b6 Update SNAPSHOT to 4.0.4 2023-07-27 19:58:30 +00:00
Soby Chacko
77dac3ffa9 Fix BindersHealthContributor thread safety issues
Resolves https://github.com/spring-cloud/spring-cloud-stream/issues/2780
2023-07-26 09:29:45 -04:00
Soby Chacko
de61594a91 Disable BinderChildContextInitializerTests temporarily
Due to some apparent timing issue on CI, disable this test temporarily
2023-07-26 09:26:56 -04:00
Soby Chacko
2467db0aa9 Fix test for the second binding in the previous commit
Resolves #2772
Resooves #2770
2023-07-17 13:31:07 +02:00
Soby Chacko
5bf152915d 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:31:01 +02:00
Soby Chacko
3e9688144c 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:57:44 -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