I am trying to publish a message using ActiveMQ with Spring.
I have written a producer and consumer class.

when I run the program, I get the below message/error.

Failed to start JMX connector Cannot bind to URL [rmi://localhost:1099/jmxrmi]: javax.naming.NameAlreadyBoundException: jmxrmi [Root exception is java.rmi.AlreadyBoundException: jmxrmi]. Will restart management to re-create JMX connector, trying to remedy this issue.

Unable to fix it. Request anyone who has com across this scenario to post solutions.

Thanks,
Priya.