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

17th
Sep 2016
vbalaut
@vbalaut
Sep 17 2016 02:42
is this group where cloud data flow queries can be discussed ?
Marcos Barbero
@marcosbarbero
Sep 17 2016 02:46
@vbalaut yes, the guys from this project often show up here
vbalaut
@vbalaut
Sep 17 2016 02:46
@marcosbarbero Thanks
Marcos Barbero
@marcosbarbero
Sep 17 2016 02:46
you’re welcome
vbalaut
@vbalaut
Sep 17 2016 02:47
I am trying to setup DLQ in spring cloud data flow using kafka binder and it is not working
dataflow:>stream create --definition ":someTesstTopic > custom-transform | log " --name ticktran
Created new stream 'ticktran'
dataflow:>stream deploy ticktran --properties "app.log.spring.cloud.stream.bindings.input.consumer.headerMode=raw,app.custom-transform.spring.cloud.stream.bindings.input.consumer.headerMode=raw,app.custom-transform.spring.cloud.stream.kafka.bindings.input.consumer.enableDlq"
Deployed stream 'ticktran'
and when by custom-transform code will send RunTimeException, I am expecting a new kafka topic will create for error but that is not generating,
I am affraid if I am doing something wrong
Marcos Barbero
@marcosbarbero
Sep 17 2016 02:49
I’m not really aware how data flow works, let’s see if someone shows up to clarify your doubts :D anyhow, it’s friday (some places saturday already) so it can get some delay to be answered
vbalaut
@vbalaut
Sep 17 2016 02:49
thanks,
ccit-spence
@ccit-spence
Sep 17 2016 06:08
Is there an example somewhere of using Feign to consume Spring Data Rest Endpoints?
Johan van den Berg
@johanvdb
Sep 17 2016 09:28
Morning. Anyone have any examples on disabling hazelCast multicast on dev machines but allowing it in production? We end up affecting each other if we share a cache in production. I am using hazel for both leadership and cache, and have placed a hazelcast.xml in root of classpath but it is ignoring me flatly, and a config bean approach to disable multicast also not working.
ccit-spence
@ccit-spence
Sep 17 2016 10:00
@johanvdb I know nothing about Hazelcast. Could you do something with a profile and choose a different hazelcast config location via the profile loaded. spring.hazelcast.config=classpath:config/my-hazelcast.xml
ccit-spence
@ccit-spence
Sep 17 2016 10:12
The problem I am trying to figure out is if I have a FeignClient setup to return PagedResources<Resources<Something>> getSomething(); How do I write a fallback method to return something other than null
If I return null I get fallback failed java.lang.NullPointerException: null
Chris Phillipson
@fastnsilver
Sep 17 2016 17:24

i found out the hard way (fighting much angst against fluid documentation and versions) that only this combo of maven deps seems to work when mixing camden with brooklyn dependency management in a spring cloud stream kafka service:

<!-- Spring Cloud Stream -->
        <dependency>
            <groupId>org.springframework.cloud</groupId>
            <artifactId>spring-cloud-stream</artifactId>
        </dependency>
        <dependency>
            <groupId>org.springframework.cloud</groupId>
            <artifactId>spring-cloud-starter-stream-kafka</artifactId>
            <exclusions>
                <exclusion>
                    <artifactId>spring-boot-starter-logging</artifactId>
                    <groupId>org.springframework.boot</groupId>
                </exclusion>
            </exclusions>
        </dependency>
        <dependency>
            <groupId>org.springframework.kafka</groupId>
            <artifactId>spring-kafka</artifactId>
            <version>1.1.0.M2</version>
        </dependency>
        <dependency>
            <groupId>org.springframework.integration</groupId>
            <artifactId>spring-integration-kafka</artifactId>
            <version>2.0.1.RELEASE</version>
        </dependency>
        <dependency>
            <groupId>org.apache.kafka</groupId>
            <artifactId>kafka_2.11</artifactId>
            <version>0.10.0.1</version>
            <exclusions>
                <exclusion>
                    <groupId>org.slf4j</groupId>
                    <artifactId>slf4j-log4j12</artifactId>
                </exclusion>
            </exclusions>
        </dependency>
        <dependency>
            <groupId>org.springframework.cloud</groupId>
            <artifactId>spring-cloud-stream-test-support</artifactId>
            <scope>test</scope>
        </dependency>

that last dependency is crucial if you want to avoid zkclient searching in vain for a zookeeper instance you typically don’t have in unit tests, and nowhere i could find in available documentation about the need for it.

Spencer Gibb
@spencergibb
Sep 17 2016 17:31
What BOM are you importing? @fastnsilver
Dave Syer
@dsyer
Sep 17 2016 17:43
Camden contains Brooklyn, so the first statement doesn't make sense to me
The boms are the only important thing
And you should definitely not need to explicitly adds kafka or spring integration
Dave Syer
@dsyer
Sep 17 2016 17:49
Plus "that last dependency" is standard test stuff documented here: http://docs.spring.io/spring-cloud-stream/docs/Brooklyn.BUILD-SNAPSHOT/reference/htmlsingle/#_testing
(Actually the docs don't mention the dependencies you need which is a weakness.)
Johan van den Berg
@johanvdb
Sep 17 2016 19:18
@ccit-spence You are a star thank you :) Specifying the files finally allowed me to provide local configs for devs that disables any hazelcast discovery but allows me to specify a production quality configuration for server environments.
Chris Phillipson
@fastnsilver
Sep 17 2016 20:37
@dsyer so there's 2 BOMs I use, the one here: http://projects.spring.io/spring-cloud/ (Camden.RC1) in a parent POM and then this one: https://cloud.spring.io/spring-cloud-stream/ (Brooklyn.RC1) in a child module. Can I get away w/ just one? The added deps are per existing docs (to use .0.10) save the test scoped dep.
Dave Syer
@dsyer
Sep 17 2016 21:11
I guess if it's all driven by a requirement to use a version of Kafka that isn't the default, then I don't know anything, and should stay out of the discussion (but really it shouldn't be this verbose if we support it, is my opinion).
Brooklyn.RC1 is included in Camden.RC1 so I don't know why you would think otherwise though.
ccit-spence
@ccit-spence
Sep 17 2016 21:21
Is wanting to use a feign client with Spring Data Rest even a good idea? Thinking about the concept of HATEOAS Feign seems to take the model down a level in maturity. Is that why it is difficult to use Feign with SDR?
@johanvdb Happy to help!
pradeepkusingh
@pradeepkusingh
Sep 17 2016 22:51
@dsyer - we are using spring boot+ cloud - ZUUL+ Eureka.. seeing lot of 502 bad gateway errors.
and unable to find any reason for above error
servers are healthy and eureka should take care of healthy vs non-healthy instances..
still we are seeing large number of errors
and need some kind of guidence how to proceed ?
pradeepkusingh
@pradeepkusingh
Sep 17 2016 23:23
Another question I have is when I configured Peer to Peer Eureka.. I don't see that all servers are coming in ribbon list of servers.
DynamicServerListLoadBalancer for client VIDEO-PROD-A initialized: DynamicServerListLoadBalancer:{NFLoadBalancer:name=VIDEO-PROD-A,current list of Servers=[video-services-rs-main.g1.app:83a82648bd294ec795ddb2ddd02f3ec8, video-services-rs-main.g1.app.cloud:6b0da0f0b99746a0abe9caf6edca21c4],Load balancer stats=Zone stats: {g1=[Zone:g1; Instance count:2; Active connections count: 0; Circuit breaker tripped count: 0; Active connections per server: 0.0;]
in Eureka I can see zone g2 servers also registered..
but why ribbon server list doesn't have both of them ??