nandorsoma commented on code in PR #6987:
URL: https://github.com/apache/nifi/pull/6987#discussion_r1151199811


##########
nifi-nar-bundles/nifi-jms-bundle/nifi-jms-processors/src/main/java/org/apache/nifi/jms/processors/PublishJMS.java:
##########
@@ -199,36 +219,50 @@ protected void rendezvousWithJms(ProcessContext context, 
ProcessSession processS
                     }
                 }
 
-                switch (context.getProperty(MESSAGE_BODY).getValue()) {
-                    case TEXT_MESSAGE:
-                        try {
-                            publisher.publish(destinationName, 
this.extractTextMessageBody(flowFile, processSession, charset), 
attributesToSend);
-                        } catch(Exception e) {
-                            publisher.setValid(false);
-                            throw e;
+                if (context.getProperty(RECORD_READER).isSet()) {
+                    final RecordReaderFactory readerFactory = 
context.getProperty(RECORD_READER).asControllerService(RecordReaderFactory.class);
+                    final RecordSetWriterFactory writerFactory = 
context.getProperty(RECORD_WRITER).asControllerService(RecordSetWriterFactory.class);
+
+                    final MessagePublisher messagePublisher = 
aMessagePublisher()

Review Comment:
   Same as above.



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to