title: Spring JmsTemplate - add custom Property
body: <p>I am using the Spring API's <code>JmsTemplate</code> and <code>MappingJackson2MessageConverter</code> (version: <code>spring-jms-4.3.4.RELEASE.jar</code>) to publish messages 
   to an ActiveMQ topic as shown in the below code.</p>
  
  <p><strong>TopicPublisher class:</strong></p>
  
  <pre><code>@Component
  public class TopicPublisher {
  
      @Autowired
      private JmsTemplate jmsTemplate;
  
      @Autowired
      private MessageConverter messageConverter;
  
      public void send() {
          Product product = new Product();
          product.setName("abcd");
          product.setPrice(10);
  
          jmsTemplate.setMessageConverter(messageConverter);
          jmsTemplate.convertAndSend("product.topic", product);
      }
  }
  </code></pre>
  
  <p><strong>MappingJackson2MessageConverter class:</strong></p>
  
  <pre><code>@Configuration
  public class JMSTextMessageConverter {
  
      @Bean
      public MessageConverter jacksonJmsMessageConverter() {
          MappingJackson2MessageConverter mappingJackson2MessageConverter 
               = new MappingJackson2MessageConverter();
          mappingJackson2MessageConverter.setTargetType(MessageType.TEXT);
          mappingJackson2MessageConverter.setTypeIdPropertyName("_type");
          return mappingJackson2MessageConverter;
      }   
  }
  </code></pre>
  
  <p>Now, I want to set few custom headers to the JMS message being published to the topic.
  I googled and could not find any example which does this. Can you help ?</p>