Java: how to unsubscribe a durable subscriber from Spring's DMLC?

断了今生、忘了曾经 提交于 2019-12-13 02:45:18

问题


In plain JMS we can do: session.unsubscribe("name of the durable subscription"); but how do we do it through DMLC? Couldn't find any specific method for this purpose in it.


回答1:


To my knowledge, there is no Spring specific way of sending an "unsubscribe" command to the MQ server, however you always have the option of obtaining an underlying JMS Session by extending the DefaultMessageListenerContainer class and calling getSession() or createSession(). After all Spring is just a convenient abstraction over the top of JMS and doesn't prevent you from using the JMS API directly if required.



来源:https://stackoverflow.com/questions/11408631/java-how-to-unsubscribe-a-durable-subscriber-from-springs-dmlc

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!