1

So, I'm using Quarkus along with the Microprofile Reactive Messaging framework (with the SmallRye Kafka connectors), and the RxJava2 Flowable streams object for reactive message receiving/sending. I have a microservice that uses the @Incoming and @Outgoing annotations to properly use channels to pull from back topics and push messages to topics.

However, now I want to modify this so I can still pull from a Kafka topic and now send a JSON payload to a REST endpoint. As far as I'm aware there is no Quarkus HTTP compatible SmallRye connector. Does anyone happen to know of any methods to get this to work?

Example function

    @Incoming("pre-check")
    @Outgoing("post-check")
    @Broadcast
    public Flowable<CustomMessage> publishToApi(CustomMessage customMessage) {

        LOGGER.info("Message received from topic = {}", customMessage);

        if (customMessage.ready) {
            return Flowable.just(customMessage);
        }
        else {
            return Flowable.empty();
        }
    }
animusdx
  • 380
  • 3
  • 16

1 Answers1

1

Remove @Outgoing and use any HTTP client to process the message to send it to some server

Or make the outgoing channel the response of your client

OneCricketeer
  • 179,855
  • 19
  • 132
  • 245
  • Sorry for the late response, but what do you mean by making the outgoing channel the response of the client? Ideally this would be a constant stream of messages coming in from a topic and going out by HTTP but at least in Quarkus I'm not sure how to. achieve this. I'm aware of the Camel connectors but I'm not sure if it would apply in this case. – animusdx Jun 23 '20 at 13:49