Giter Club home page Giter Club logo

Comments (10)

spencergibb avatar spencergibb commented on May 25, 2024 1

No I don't

from spring-cloud-gateway.

spencergibb avatar spencergibb commented on May 25, 2024

/cc @dsyer @markfisher @mbogoevici

from spring-cloud-gateway.

cforce avatar cforce commented on May 25, 2024

I realized lookup/discovery for message push routing on client via eureka ClientDiscovery lookup against eureka server. Client reads known metadata fields like broker url, topic, queue, etc that is published by broker-registry-service in the name iof the broker istelf (e.g.rabbitmq/kafka)

Using spring cloud gateway as http gatway to any backend message broker tha would be possible by
extracting destination from url (e.g. /application/topic/ ) and the using the lookup from destination from eureka (metadata) or even coupled with fowarding (http->message queue/topic..) - however mixing protocols seems no good idea to me.

from spring-cloud-gateway.

jchesterpivotal avatar jchesterpivotal commented on May 25, 2024

Apologies for the drive-by necrothreading, I've hit a few cases where I've wished for this capability:

  • Wrapping an HTTP API over Kafka: receiving at a front end proxy, writing into Kafka, picking up from a back end proxy and replaying the HTTP request into the target API.
  • Providing a simple events gateway. Specifically, I'd like to have an easy way to listen for webhooks that then spit out CloudEvents into a Knative Eventing setup.

I've overheard others wondering if this was possible. On some brief spelunking of the code I suspect it would be a fairly hefty project to create this sort of capability, but that's never stopped me from whining before.

from spring-cloud-gateway.

spencergibb avatar spencergibb commented on May 25, 2024

No worries, we spoke about this recently. It could be done with spring integration I'm sure

from spring-cloud-gateway.

dsyer avatar dsyer commented on May 25, 2024

Why not Spring Cloud Stream? It’s kind of trivial. In fact it’s a stock Spring Cloud Dataflow feature isn’t it? Caveat: request-response is not a great messaging pattern, so Spring Cloud Stream makes it hard - you might need to drop down to Spring Integration to do that.

from spring-cloud-gateway.

thangntt avatar thangntt commented on May 25, 2024

No worries, we spoke about this recently. It could be done with spring integration I'm sure

Hi @spencergibb , when release feature?
I am also developing this feature.

from spring-cloud-gateway.

spencergibb avatar spencergibb commented on May 25, 2024

It's not currently being worked on

from spring-cloud-gateway.

thangntt avatar thangntt commented on May 25, 2024

It's not currently being worked on

Hi @spencergibb ,
do you have any idea for this feature?

from spring-cloud-gateway.

RomainWilbert avatar RomainWilbert commented on May 25, 2024

This would be a nice feature, a quick back-pressure implementation. I created a custom filter to do this (with spring kafka), but I have memory issues with large payloads (700ko).

@Override public GatewayFilter apply(Config config) { return (exchange, chain) -> ServerWebExchangeUtils.cacheRequestBodyAndRequest(exchange, (httpRequest) -> ServerRequest.create(exchange.mutate().request(httpRequest).build(), messageReaders).bodyToMono(String.class).doOnNext(requestPayload -> { final DemandeComparaison requestBody = getRequestBody(requestPayload); exchange.getAttributes().put(ServerWebExchangeUtils.CACHED_REQUEST_BODY_ATTR, requestBody); kafkaProducerService.send(config, requestBody); exchange.getResponse().setComplete(); })); }

I use KafkaTemplate so I have to extract the payload but I wish I could stream the payload directly to the topic. I d'ont know much about Spring Cloud Stream but maybe this would be the way ?

from spring-cloud-gateway.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.