SHARE
TWEET

Untitled

a guest Sep 14th, 2017 69 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. Event event;
  2. jmsTemplate.convertAndSend(topic, event);
  3.    
  4. public MessageConverter jacksonJmsMessageConverter() {
  5.         MappingJackson2MessageConverter converter = new MappingJackson2MessageConverter();
  6.         converter.setTargetType(MessageType.TEXT);
  7.         converter.setTypeIdPropertyName("_type");
  8.         return converter;
  9.     }
  10.    
  11. @Bean
  12.         public DefaultMessageListenerContainer listenerContainer() {
  13.             DefaultMessageListenerContainer container = new DefaultMessageListenerContainer();
  14.             container.setConnectionFactory(connectionFactory());
  15.             container.setDestinationName(COMMENT_QUEUE);
  16.             container.setPubSubDomain(true);
  17.             container.setMessageListener(new AcListenerSubscriber());
  18.             container.start();
  19.  
  20.             return container;
  21.         }
RAW Paste Data
Top