I want to write test for something like below;
There is a listener called
state-info-1
insrc/main
.It does some changes to any message it gets and publishes the new message on activemq topic
state-info-2
.I will build a dummy message and publish on to activemq topic
state-info-1
.Finally verify that, the received message on topic
state-info-2
is like i expected.
My Listeners are like;
@JmsListener(destination = "state-info-1", containerFactory = "connFactory")
public void receiveMessage(Message payload) {
// Do Stuff and Publish to state-info-2
}
Is it possible i can write test for this? Or i have to do it in some other way?
Also, i looked at this : https://github.com/spring-projects/spring-boot/blob/master/spring-boot-samples/spring-boot-sample-activemq/src/test/java/sample/activemq/SampleActiveMqTests.java
But this is not what i am expecting.
Any help or push in the right direction will be enough.
Thank you for your time.
Queues
, does not work for activemqTopics
which i use. Does not work when i have propertiesspring.jms.pub-sub-domain=true
. Getsnull
. – Manage