Spring cloud stream with Spring Boot 3+

2.4k Views Asked by At

Are there some compatibility issues with SB3.0.6 and spring-cloud-stream:4.0.2? We migrated from 2.7.8 to 3.0.6 and there is problem to "autodetect" channels in AbstractDestination class with same configuration (application.yml) during testing.

Is the library prepared for that? Is there any documentation what is different?

I can see here in release trains in column Spring Boot 2.2.x / 2.1.x but i am not clever from this.

Any comments appreciated.

Regards

1

There are 1 best solutions below

3
Gondri On

i am new on the project but here is what i found:

Project setup:

kotlin
azure service bus
spring boot 3.0.6
spring-cloud-stream:4.0.2
spring-cloud-stream-test-binder:4.0.2

Flow: sending data to some topic 'address.update-file-records.v1' through InputDestination.

input.send(someByteArray, "address.update-file-records.v1")

Bean definition:

@Bean
fun updateAddress(): Consumer<Message<AddressUpdateRequest>> { return Consumer {}}

Where the topic or related method updateAddress is visible in any of application.yml files:

spring:
  cloud:
    stream:
      // looks like this is used to import value in beans using @Value(...)
      property:
        destinations:          
          updateAddress-out-0: 
            address.update-file-records.v1
        function.definition: updateAddress;someOtherMethod

      bindings:    
        updateAddress-in-0:
          destination: address.update-file-records.v1

      servicebus:
        bindings:
          updateAddress-in-0:
            consumer:
              maxConcurrentCalls: ${ans.messaging.client.threads.update-address}