I am using the dependency in my pom.xml
<dependency>
<groupId>org.amqphub.quarkus</groupId>
<artifactId>quarkus-qpid-jms</artifactId>
</dependency>
my yml properties file
quarkus:
qpid-jms: amqp:url:port
username: username
password: password
I have a class like
import javax.enterprise.context.ApplicationScoped;
import javax.inject.Inject;
import javax.jms.ConnectionFactory;
import javax.jms.JMSContext;
import javax.jms.JMSRuntimeException;
import javax.jms.Session;
import org.apache.camel.Exchange;
import org.apache.camel.Proccesor;
@ApplicationScoped
public class JMSProducer implements Processor {
@Inject
ConnectionFactory connectionFactory;
@Override
public void process(Exchange exchange) throws Exception {
try (JMSContext context = connectionFactory.createContext(Session.AUTO_ACKNOWLEDGE)){
context.createProducer().send(context.createQueue("my_queue"), exchange.getMessage().getBody(String.class));
} catch (JMSRuntimeException ex) {}
}
}
After this I call this class as a bean in a procces of my apache camel route.
I'm new to these issues, I hope you can help me.