JmsConfig { @JmsListener(destination = "trading.rate.latest?consumer.retroactive=true") public void receiveMessage(RatesUpdatedEvent event) { log.debug("Received: {}", event); bus.publishEvent(event); }  @Bean // Serialize message content to json using TextMessage MessageConverter jacksonJmsMessageConverter(ObjectMapper mapper); @Bean JmsListenerContainerFactory<?> myFactory(DefaultJmsListenerContainerFactory factory); @JmsListener(destination = "trading.rate.latest?consumer.retroactive=true") void receiveMessage(RatesUpdatedEvent event);  }
@Test public void testReceiveMessage() throws Exception { Symbol from = new Symbol("FROM", "from", "fcountry", null); Symbol to = new Symbol("TO", "to", "tcountry", null); RatesUpdatedEvent event = new RatesUpdatedEvent() .setRates(List.of(new Rate(from, to, new BigDecimal("25.5"), parse("2017-09-23T19:11:01+02:00")))); jmsConfig.receiveMessage(event); verify(ratesStompHandler).send(any()); }