List of usage examples for org.springframework.jms.listener.adapter MessageListenerAdapter setMessageConverter
public void setMessageConverter(@Nullable MessageConverter messageConverter)
From source file:uk.gov.nationalarchives.discovery.taxonomy.batch.config.DeleteMsgConfiguration.java
@Bean MessageListenerAdapter deleteListenerAdapter(DeleteDocMessageConsumer deleteDocMessageConsumer) { MessageListenerAdapter messageListenerAdapter = new MessageListenerAdapter(deleteDocMessageConsumer); messageListenerAdapter.setMessageConverter(null); return messageListenerAdapter; }
From source file:uk.gov.nationalarchives.discovery.taxonomy.batch.config.CategorisationMsgConfiguration.java
@Bean MessageListenerAdapter categorisationListenerAdapter( CategoriseDocMessageConsumer categoriseDocMessageConsumer) { MessageListenerAdapter messageListenerAdapter = new MessageListenerAdapter(categoriseDocMessageConsumer); messageListenerAdapter.setMessageConverter(null); return messageListenerAdapter; }
From source file:org.springframework.flex.messaging.jms.JmsAdapter.java
/** * /*from w w w .j a va 2 s.co m*/ * {@inheritDoc} */ public void afterPropertiesSet() { Assert.notNull(this.connectionFactory, "connectionFactory is required"); Assert.notNull(this.destination, "destination or destination name is required"); this.jmsTemplate.setConnectionFactory(this.connectionFactory); MessageConverter converterToSet = this.messageConverter; if (converterToSet == null || !(converterToSet instanceof FlexMessageConverter)) { converterToSet = new FlexMessageConverter(converterToSet); } this.jmsTemplate.setMessageConverter(converterToSet); MessageListenerAdapter messageListenerAdapter = new MessageListenerAdapter(); messageListenerAdapter.setMessageConverter(converterToSet); messageListenerAdapter.setDelegate(this); this.messageListenerContainer.setConnectionFactory(this.connectionFactory); this.messageListenerContainer.setMessageListener(messageListenerAdapter); this.messageListenerContainer.setAutoStartup(false); if (this.destination instanceof Destination) { this.jmsTemplate.setDefaultDestination((Destination) this.destination); this.messageListenerContainer.setDestination((Destination) this.destination); } else { this.jmsTemplate.setPubSubDomain(this.pubSubDomain); this.jmsTemplate.setDefaultDestinationName((String) this.destination); this.messageListenerContainer.setPubSubDomain(this.pubSubDomain); this.messageListenerContainer.setDestinationName((String) this.destination); } this.jmsTemplate.afterPropertiesSet(); this.messageListenerContainer.afterPropertiesSet(); }