These are chat archives for spring-cloud/spring-cloud

10th
Oct 2016
Bruno Simioni
@brunosimioni
Oct 10 2016 00:09
Guys, I'm getting a "org.springframework.messaging.MessageDeliveryException: Dispatcher has no subscribers for channel 'orders-service:local:8081.orders'." exception over here. My code:
@Service
public class OrdersConfirmationSink {

    public interface OrdersConfirmationsSink {
        String ORDERS = "orders";

        @Input(ORDERS)
        SubscribableChannel orders();
    }

    @StreamListener(OrdersConfirmationsSink.ORDERS)
    public void receive(OrderConfirmation msg) {
        System.out.println("Received transformed message " + msg.toString());
    }
}
My config:
spring:
  cloud:
    stream:
      bindings:
        orders:
          destination: orders
It creates a temporary queue, bound to my exchange at rabbitmq. It actually receive a message (integration is working), but when it's about to process the message, it crashes
I'm following the samples, but it is not working, and have no idea how to debug the reason why it is not bound (the subscriber)
any ideias?
spring-boot: 1.4.1.RELEASE and spring-cloud: Camden.RELEASE
Marcos Barbero
@marcosbarbero
Oct 10 2016 00:15
Is there any place in your code where you put @EnableBinding(OrdersConfirmationsSink.class)?
Bruno Simioni
@brunosimioni
Oct 10 2016 00:15
yep, right in companion to @SpringBootApplication
ps: @marcosbarbero your last advice just worked (exporting configurations to spring cloud config server).
Marcos Barbero
@marcosbarbero
Oct 10 2016 00:17
That’s great to know :)
do you have have any @Output channel configured in your code?
Bruno Simioni
@brunosimioni
Oct 10 2016 00:20
No, the @Output side of code (producing messages to rabbitmq) is actually hosted under other application module (different instance of springboot)
this piece of just is just about messaging consumption
Marcos Barbero
@marcosbarbero
Oct 10 2016 00:25
got it
Denis Stepanov
@dstepanov
Oct 10 2016 12:11
Hi, why does the application name gets prefixed by spring.cloud.zookeeper.prefix? I find it strange. I want to use a dependency with a different prefix to do it I need to remove the common prefix, than suddenly spring.application.name has a different value.
Marcin Grzejszczak
@marcingrzejszczak
Oct 10 2016 12:13
hmm prefix is only for common prefixes
Denis Stepanov
@dstepanov
Oct 10 2016 12:16
Strange @Value("${spring.application.name}") String applicationName returns app name with prefix
Marcin Grzejszczak
@marcingrzejszczak
Oct 10 2016 12:31
cause that's what we do
cause otherwise we won't be able to properly register it in Zookeeper AFAIR
Denis Stepanov
@dstepanov
Oct 10 2016 12:58
@marcingrzejszczak I'll move prefix to the app name. Is it valid workaround?
Marcin Grzejszczak
@marcingrzejszczak
Oct 10 2016 12:59
Are you referring to other apps?
yeah so it's not a workaround
basically we're just providing you with a convenience method
Denis Stepanov
@dstepanov
Oct 10 2016 13:03
So basically if I remove spring.cloud.zookeeper.prefix I need to add this prefix to the spring.application.name, and dependency's path if they need it, right?
Marcin Grzejszczak
@marcingrzejszczak
Oct 10 2016 13:03
yes
Denis Stepanov
@dstepanov
Oct 10 2016 13:07
Cool thanks @marcingrzejszczak
Marcin Grzejszczak
@marcingrzejszczak
Oct 10 2016 13:07
np
Dieter Hubau
@Turbots
Oct 10 2016 15:37
anyone know if I can use Spring Boot's new @RestClientTest combined with @FeignClient? I’m trying to mock the calls going to my external REST service but I’m having some troubles
I guess it only works if the client class contains a RestTemplate field
nvm, it says so in the docs
Bill Bauernschmidt
@wbauern
Oct 10 2016 16:20
I am having an issues with making calls through Zuul to proxied https services that are registered in Eureka. This works correctly if I use the deprecated RestClient in Zuul (via zuul.ribbon.restclient.enabled: true) but not with the new default RibbonLoadBalancingHttpClient in Camden. Tracing through the code it appears the new client needs to be explicitly told the proxied service is secure via the ribbon.IsSecure property where the old RestClient uses logic in org.springframework.cloud.netflix.ribbon.ServerIntrospector to determine if the service was registered as secure in Eureka. Is there any way to have the new RibbonLoadBalancingHttpClient use the Eureka registry information in the same way?
Ryan Baxter
@ryanjbaxter
Oct 10 2016 16:54
@wbauern not that i know of
if u want to put together a PR to add that functionality that would be great
Spencer Gibb
@spencergibb
Oct 10 2016 16:57
May be coming in SR1 @ryanjbaxter @wbauern I did some work on that. You could try snapshots
Ryan Baxter
@ryanjbaxter
Oct 10 2016 17:34
cool
pradeepkusingh
@pradeepkusingh
Oct 10 2016 19:04
@spencergibb How can I find out the app spring boot version ?
any actuator end point help ?
Bill Bauernschmidt
@wbauern
Oct 10 2016 21:52
@spencergibb @ryanjbaxter Just tried with the latest snapshot and my calls to https services through Zuul now work correctly again. Thanks for the tip!
Ryan Baxter
@ryanjbaxter
Oct 10 2016 23:35
great!