davsclaus commented on code in PR #18212:
URL: https://github.com/apache/camel/pull/18212#discussion_r2123839011


##########
components/camel-nats/src/main/java/org/apache/camel/component/nats/NatsProducer.java:
##########
@@ -104,18 +112,12 @@ public boolean process(Exchange exchange, AsyncCallback 
callback) {
             });
             return false;
         } else {
-            LOG.debug("Publishing to topic: {}", config.getTopic());
-
-            final NatsMessage.Builder builder = NatsMessage.builder()
-                    .data(body)
-                    .subject(config.getTopic())
-                    .headers(this.buildHeaders(exchange));
-
-            if (ObjectHelper.isNotEmpty(config.getReplySubject())) {
-                final String replySubject = config.getReplySubject();
-                builder.replyTo(replySubject);
+            LOG.debug("Publishing to subject: {}", config.getTopic());

Review Comment:
   Something ala
   ```
               try {
                   // do not copy as we already did the copy
                   addToQueue(copy, false);
               } catch (SedaConsumerNotAvailableException | IOException e) {
                   exchange.setException(e);
                   callback.done(true);
                   return true;
               }
   ```
   
   this is from camel-seda but the catch should just be general Exception



-- 
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

Reply via email to