Consuming message from Tibco EMS with Quarkus

78 Views Asked by At

I'm working with a Quarkus application where I need to consume messages from Tibco EMS and then process these messages. Below is the snippet of my current implementation:

Session session = connection.createSession();
Destination destination = session.createQueue(configurationProperties.queueFlight());
MessageConsumer consumer = session.createConsumer(destination);

consumer.setMessageListener(message -> {
  FlightData flightData = flightDataConverter.toFlightData(message);
  // TODO: send to kafka
});

This code is part of a method that's called at the start of the Quarkus application. It successfully receives messages from Tibco EMS. However, my goal is to enhance this process by implementing a reactive approach, possibly using Mutiny.

I'm seeking advice on whether it's possible to refactor this code to a reactive model with Mutiny, and if so, how I might go about it. Any suggestions or examples would be greatly appreciated.

Thanks!

0

There are 0 best solutions below