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

30th
Mar 2016
Jose Armesto
@fiunchinho
Mar 30 2016 10:25
I know it’s not about spring-cloud, but any of you guys know how to de-register a client in zuul?
Marcos Barbero
@marcosbarbero
Mar 30 2016 12:58
@fiunchinho what you mean? What approach are you using to give a route at zuul? Are you using Eureka as Service Registration & Discovery? Are you adding routes by yourself on yaml/properties file?
Jose Armesto
@fiunchinho
Mar 30 2016 13:02
the problem is the following: I’m using Zuul and Eureka, so whenever a request comes to zuul, it needs to know what’s the name (VIP Address) of that service to fetch the list of servers from eureka. That name is the one that the service used to register itself in Eureka. Ok, now, when Zuul receives a request it creates a Ribbon client to do HTTP requests, and that client is configured and saved in a List of clients. If I access zuul asking for a non-existing service, a Client will be created anyways
If later one I need to register a Client for the name “non-existing”, Zuul will fail saying that that name is already in use
so I need a way to remove that client from the list of registered clients
Marcos Barbero
@marcosbarbero
Mar 30 2016 13:04
The Ribbon’s cache isn’t updated after 3 heartbeats from eureka?
ribbon keeps tracks of the clients in that property, but I don’t know if is updated later on
problem is that it’s private so I can’t access it :/
maybe I’m using the wrong approach?
Marcos Barbero
@marcosbarbero
Mar 30 2016 13:10
Do you know if the eureka client health check is enabled?
Something like that:
eureka:
  client:
    healthcheck:
      enabled: true
Jose Armesto
@fiunchinho
Mar 30 2016 13:11
yes, if an instance is down, is not longer in eureka, but that’s not the problem
the problem is that I can’t register a client using a name that’s already in use
Marcos Barbero
@marcosbarbero
Mar 30 2016 13:14
Later on zuul receives the new map with eureka’s clients and if some of them is down it’s removed from the list, maybe you give not a proper time to things sync up. Or is it taking forever and never gone?
Jose Armesto
@fiunchinho
Mar 30 2016 13:15
but that’s the list of services, which I think is different from the list of Clients and their configurations
the list of services is updated, but even though a service could be down and removed, its client is still kept
Marcos Barbero
@marcosbarbero
Mar 30 2016 13:16
Give me few minutes, I’ll try reproduce your case hehehe
Are you using Angel.SR6 or Brixton.RC1?
Marcos Barbero
@marcosbarbero
Mar 30 2016 13:27

@fiunchinho I made the following scenario:

  1. Requested a service named “marcos” from Zuul
    curl -i http://localhost:8080/marcos/routes 
    HTTP/1.1 404 Not Found
  2. Started up the service named “marcos”
  3. Made the same request as before and got the response
    HTTP/1.1 200 OK
    PS: I removed the json response
    PS2: I played with Brixton.RC1

Is it your scenario?

Jose Armesto
@fiunchinho
Mar 30 2016 13:30
yes, although I was testing this in a project that doesn’t use spring yet
in my case, first request fails because there are no services called marcos, but the Client is registered, so when I start the ‘marcos’ service and try to manually register the service in zuul, it fails
Marcos Barbero
@marcosbarbero
Mar 30 2016 13:31
I see.. are you using Zuul from Netflix, not the spring cloud wrapper?
Jose Armesto
@fiunchinho
Mar 30 2016 13:34
yes
can’t migrate just yet :/
Marcos Barbero
@marcosbarbero
Mar 30 2016 13:54
In that case I can’t help so much, I haven’t played with Zuul directly :(
Maybe there is a gitter room from Netflix/Zuul :)
pradeepkusingh
@pradeepkusingh
Mar 30 2016 18:37
@spencergibb = Do we have some example to implement sessin stickyness using Ribbon/Zuul ?
Spencer Gibb
@spencergibb
Mar 30 2016 18:38
sticky sessions? like http sessions?
pradeepkusingh
@pradeepkusingh
Mar 30 2016 18:39
yes.. one of our requirement
Spencer Gibb
@spencergibb
Mar 30 2016 18:40
no
pradeepkusingh
@pradeepkusingh
Mar 30 2016 18:46
:)
Thanks Spencer
Anatoly Kadyshev
@kadyana
Mar 30 2016 18:53
Hi Spring Cloud Team,
Could you please let me know if it's possible with Spring Cloud Discovery service
to bind a message sender running on a host with a message receiver running on different host and listening to specific UDP port for messages
by using a String which we could call a channel or a message destination?
So that when the message sender asks the service - who is listening on a channel then it gets back host:port of the message receiver?
Marcos Barbero
@marcosbarbero
Mar 30 2016 19:17
Hi guys, I’m playing with spring cloud config bus and facing an issue. My application have to communicate with a different RabbitMQ than Cloud Bus, is there any way to have two AMQP configured is same spring-cloud application?