0

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

Gondri
  • 173
  • 1
  • 8
  • Thanks for the note on release trains - that section needs an update as Spring Cloud Stream moved away from named release trains and merged with Spring Cloud release train upstream. So, for Boot 3.0.x, you can use the latest Spring Cloud release train that contains the proper Spring Cloud Stream versions. We will update the project site. – sobychacko May 19 '23 at 12:32
  • As to your issue, I wonder if it is related to this comment on this potentially related issue: https://github.com/spring-cloud/spring-cloud-stream/issues/2662#issuecomment-1553279513 – sobychacko May 19 '23 at 12:33
  • If that is not the case, could you provide us with some more info about your app? Maybe a small sample app? – sobychacko May 19 '23 at 12:33

1 Answers1

0

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}            

Gondri
  • 173
  • 1
  • 8
  • I am also trying to change destination name in send method like: 'updateAddress', 'updateAddress-in-0', 'updateAddress-in-0.destination' ... but still same result. I am getting "Cannot invoke "org.springframework.messaging.SubscribableChannel.send(org.springframework.messaging.Message)" because the return value of "org.springframework.cloud.stream.binder.test.InputDestination.getChannelByName(String)" is null" – Gondri May 22 '23 at 08:29
  • So before spring boot 3 i was defining topic, input.send(data,"address.update-file-records.v1"). Now i am looking in the doc of send method i can see there bindingName and destination name, which can be same or different if i set spring.cloud.stream.bindings. So i dont understand now how to specifiy that topic to my binder? Maybe I am totally lost, but still trying to figure out. – Gondri May 22 '23 at 09:30
  • Looks like spring.cloud.stream.function.definition moved to spring.cloud.function.definition. After changing this, its working again. Maybe there was mechanism to load it even if its under spring.cloud.stream.function.definition because we had it there. I can't say. – Gondri May 22 '23 at 11:50