@Component
public class SchedRouteBuilder extends RouteBuilder {
@Override
public void configure() throws Exception {
// Define a global exception handler
onException(Exception.class)
.process(new Processor() {
@Override
public void process(Exchange exchange) throws Exception {
Exception exception = exchange.getProperty(Exchange.EXCEPTION_CAUGHT, Exception.class);
exception.printStackTrace();
}
})
.handled(true);
from("direct:message-producer")
.to("paho-mqtt5:{{topicname}}?brokerUrl=tcp://{{brokeraddress}}:{{brokerport}}");
}
}
lunedì 3 giugno 2024
Apache Camel global exception handler
Iscriviti a:
Commenti sul post (Atom)
How to deploy Podman images to OpenShift Container Platform (CRC on localhost)
I have a microservice on localhost and I want to deploy its Podman image on OCP, which I am running using CRC on localhost. 1. Get the...
-
Precondizione: La precondizione di un metodo e' una condizione che deve essere verificata prima che quel metodo sia invocato. Le preco...
-
My intent is to configure SSO on Keycloak and Liferay. I have createad a docker-compose environment with Keycloak: #####################...
Nessun commento:
Posta un commento