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


##########
components/camel-nats/src/main/java/org/apache/camel/component/nats/NatsConfiguration.java:
##########
@@ -90,6 +90,12 @@ public class NatsConfiguration {
     private boolean traceConnection;
     @UriParam(label = "advanced")
     private HeaderFilterStrategy headerFilterStrategy = new 
DefaultHeaderFilterStrategy();
+    @UriParam(label = "common", defaultValue = "false")
+    private boolean jetstreamEnabled = false;
+    @UriParam(label = "common")
+    private String jetstreamName;
+    @UriParam(label = "common", defaultValue = "true")

Review Comment:
   This is likely an advanced option, when would you set this to false ?



##########
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:
   This code in this else block needs to be in a try .. catch (exception) 
exchange.setExchange(e) callback done(true) idiom that are used with camel 
routing engine.



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