Github user mosermw commented on a diff in the pull request:

    https://github.com/apache/nifi/pull/2458#discussion_r167255119
  
    --- Diff: 
nifi-nar-bundles/nifi-jms-bundle/nifi-jms-processors/src/main/java/org/apache/nifi/jms/processors/PublishJMS.java
 ---
    @@ -131,4 +143,10 @@ protected JMSPublisher 
finishBuildingJmsWorker(CachingConnectionFactory connecti
             session.read(flowFile, in -> StreamUtils.fillBuffer(in, 
messageContent, true));
             return messageContent;
         }
    +
    +    private String extractTextMessageBody(FlowFile flowFile, 
ProcessSession session) {
    +        final StringWriter writer = new StringWriter();
    +        session.read(flowFile, in -> IOUtils.copy(in, writer, 
Charset.defaultCharset()));
    --- End diff --
    
    Oh, I didn't think about that approach!  I like it.  I'll make the changes.


---

Reply via email to