[ 
https://issues.apache.org/jira/browse/NIFI-2630?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16358457#comment-16358457
 ] 

ASF GitHub Bot commented on NIFI-2630:
--------------------------------------

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

    https://github.com/apache/nifi/pull/2458#discussion_r167240898
  
    --- 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 --
    
    We probably want to expose the character set as a property. At a minimum, 
we should be explicit in defining which character set would be used (UTF-8 
perhaps) instead of relying on the default charset, as this would produce 
different results from environment to environment.


> Allow PublishJMS processor to create TextMessages
> -------------------------------------------------
>
>                 Key: NIFI-2630
>                 URL: https://issues.apache.org/jira/browse/NIFI-2630
>             Project: Apache NiFi
>          Issue Type: Improvement
>          Components: Extensions
>    Affects Versions: 0.6.0
>            Reporter: James Anderson
>            Assignee: Michael Moser
>            Priority: Minor
>              Labels: patch
>         Attachments: 
> 0001-NIFI-2630-Allow-PublishJMS-processor-to-create-TextM.patch
>
>
> Create a new configuration option for PublishJMS that allows the processor to 
> be configured to emit instances of TextMessages as well as BytesMessage.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to