[英]How to create a shared subscription using spring JMS
JMS 2.0 specification introduced the concept of shared durable subscriptions. JMS 2.0规范引入了共享持久订阅的概念。 I have a use case where I have to create subscriptions programmatically upon server start up.
我有一个用例,必须在服务器启动时以编程方式创建订阅。 We have clustered JBoss servers.
我们已经集群了JBoss服务器。 Hence each JBoss will have similar configurations and every JBoss will have applications which will create durable subscribers(messaging provider is WMQ).
因此,每个JBoss将具有相似的配置,每个JBoss将具有可创建持久订阅者的应用程序(消息提供者为WMQ)。 Since durable subscriptions have to have a unique name, I thought of using shared subscriptions.
由于持久订阅必须具有唯一的名称,因此我考虑使用共享订阅。 Now the problem is that spring's 4.0.6.RELEASE has support for new features in JMS 2.0, however I did not find a way to create shared durable subscriptions via spring.
现在的问题是spring的4.0.6.RELEASE支持JMS 2.0中的新功能,但是我找不到通过spring创建共享的持久订阅的方法。 We use spring's DefaultMessageListenerContainer to create the listeners.
我们使用spring的DefaultMessageListenerContainer创建监听器。 Am I doing it right?
我做对了吗? I appreciate any suggestions that you might have.
感谢您提出的任何建议。
That feature will be available as from Spring 4.1.RC2 that will be released today. 该功能将从春季发布的Spring 4.1.RC2开始提供。 A new
destination-type
will be available called sharedDurableTopic
, check the current build of the doc for more details. 将提供一个新的
destination-type
称为sharedDurableTopic
,检查文档的当前版本以获取更多详细信息。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.