Spring JMS Template - remove RFH Header information
<p>I am currently working on an application that uses Spring's JMS Messaging (JMSTemplate). The application needs to send a message to a mainframe queue that is not able to decipher the "RFH" header that the JMSTemplate appends to the message. Is there a way to entirely remove all the header information progamatically so the mainframe can just get the raw contents of the message without the header?</p>

<p>Here is my code...</p>

<pre><code>    MQQueueConnectionFactory connectionFactory = new MQQueueConnectionFactory();
    connectionFactory.setHostName( "127.0.0.1" );
    connectionFactory.setPort( 1414 );
    connectionFactory.setChannel( "S_LOCALHOST" );
    connectionFactory.setQueueManager( "QM_LOCALHOST" );
    connectionFactory.setTransportType( 1 );

    UserCredentialsConnectionFactoryAdapter credentials = new UserCredentialsConnectionFactoryAdapter();
    credentials.setUsername( "" );
    credentials.setPassword( "" );
    credentials.setTargetConnectionFactory( connectionFactory );

    JmsTemplate jmsTemplate = new JmsTemplate( credentials );
    jmsTemplate.setPubSubDomain( false );
    jmsTemplate.setDeliveryMode( javax.jms.DeliveryMode.NON_PERSISTENT );
    jmsTemplate.setExplicitQosEnabled( true );
    jmsTemplate.setReceiveTimeout( 60000 );

    jmsTemplate.convertAndSend( "MY.QUEUE", "cobol data" );
</code></pre>

<p>Here is what the message looks like in the Websphere MQ Explorer. How can I remove these values? Is it even possible with Spring JMS? Lemme know if you need any more info...</p>

<p><a href="https://i.stack.imgur.com/gWudN.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/gWudN.png" alt="enter image description here"></a></p>