I can't get it working!
I have this configuration class
@EnableJms
@Configuration
class QConfig {
@Bean
fun jmsConnectionFactory(): ConnectionFactory {
val factory = JmsConnectionFactory()
factory.username = "guest"
factory.password = "guest"
factory.remoteURI = "amqp://localhost:5672"
return SingleConnectionFactory(factory)
}
}
Where JmsConnectionFactory is org.apache.qpid.jms.JmsConnectionFactory
I send a message with jmsTemplate.convertAndSend("hello-q", "Hello world message!")
And try to receive it with
@JmsListener(destination = "hello-q")
fun receive(message: String) {
println("[x] Listener received: $message")
}
Logs and RabbitMQ management say connections are established successfully. However, the sent messages do not appear in the management app.
I tried publishing messages with the management app as well but they do not appear on the screen = they are not caught with @JmsListener