使用者队列未使用虚拟主题中的消息 [英] Messages in Virtual Topic not consumed by consumer queue
问题描述
我正在尝试使用activemq中的队列来使来自虚拟主题的消息出队.我尝试发送一些消息,但该消息显示在已排队的消息"下的主题中,但无法使用.
我创建的虚拟主题名称为VirtualTopic.AA,使用者称为Consumer.client1.VirtualTopic.AA.
在Consumer.client1.VirtualTopic.AA中,我可以看到有一个使用者,但是它不能从虚拟主题中出消息.
有人知道为什么会这样吗?我需要在xml文件的配置中更改一些设置吗?
使用Spring的JmsTemplate发布到虚拟主题时,需要通过将pubSubDomain
属性设置为"true"来为主题配置它. >
来自 JmsTemplate文档:
如果要使用动态目标创建,则必须使用"pubSubDomain"属性指定要创建的JMS目标的类型.对于其他操作,这不是必需的.点对点(队列)是默认域.
并且在
I am trying to use a queue in activemq to dequeue messages from a virtual topic. I tried sending some messages and it is showing up in the topic under "message enqueued" but it is not able to be consumed. The virtual topic name that i created was VirtualTopic.AA and the consumer is called Consumer.client1.VirtualTopic.AA. In the consumer.client1.VirtualTopic.AA, i can see that there is a consumer but it is just not able to dequeue messages from the virtual topic. Anyone knows why this is happening ? Do i need to change some settings in the configuration in the xml file ? When you publish to a virtual topic using Spring's JmsTemplate, you need to configure it for a topic by setting the From the JmsTemplate documentation: If you want to use dynamic destination creation, you must specify the type of JMS destination to create, using the "pubSubDomain" property. For other operations, this is not necessary. Point-to-Point (Queues) is the default domain. And in JmsDestinationAccessor#setPubSubDomain: pubSubDomain - "true" for the Publish/Subscribe domain (Topics), "false" for the Point-to-Point domain (Queues)
这篇关于使用者队列未使用虚拟主题中的消息的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!pubSubDomain
property to "true".