How to listen to topic using spring boot jms

前端 未结 3 1166
被撕碎了的回忆
被撕碎了的回忆 2021-01-05 07:19

I am trying to listen to topic using the below snippet. However its listening to queue by default. There is no xml config in this case. I am completely relying on annotation

3条回答
  •  孤独总比滥情好
    2021-01-05 07:32

    In Spring Boot's Application.properties, try setting the following property:

    spring.jms.pub-sub-domain=true
    

    Then, use this property for the container factory that you are using to listen to the topic.

提交回复
热议问题