ravjotbrar commented on code in PR #16702: URL: https://github.com/apache/camel/pull/16702#discussion_r1905894496
########## components/camel-paho-mqtt5/src/main/java/org/apache/camel/component/paho/mqtt5/PahoMqtt5Consumer.java: ########## @@ -155,6 +160,23 @@ public Exchange createExchange(MqttMessage mqttMessage, String topic) { paho.setHeader(PahoMqtt5Constants.CAMEL_PAHO_MSG_PROPERTIES, mqttMessage.getProperties()); exchange.setIn(paho); + if (getEndpoint().getConfiguration().isManualAcksEnabled()) { + exchange.getExchangeExtension().addOnCompletion(new Synchronization() { + @Override + public void onComplete(Exchange exchange) { + try { + PahoMqtt5Consumer.this.client.messageArrivedComplete(mqttMessage.getId(), mqttMessage.getQos()); + } catch (MqttException e) { + throw new RuntimeException(e); + } + } + + @Override + public void onFailure(Exchange exchange) { + LOG.error("Error: " + exchange.getExchangeId(), exchange.getException()); Review Comment: Ah gotcha. Fixed. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: commits-unsubscr...@camel.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org