You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@activemq.apache.org by hobojoe <st...@prattgorman.com> on 2019/07/16 15:28:22 UTC

JMS Producer Routing type

I have a Spring JMS message producer
(org.springframework.jms.core.JmsTemplate) that I initialize like this,

sender.setConnectionFactory(new CachingConnectionFactory(
                      new
ActiveMQConnectionFactory(brokerUrl,artemisUser,unMaskedUserNamePassword))
              );
              
and then use jmsTemplate.convertAndSend to publish the message.


Do I have to worry about specifying MULTICAST/ANYCAST for message producers?
I don't think I understand
routing as it pertains to producers very well. If someone can help me
understand this I sure would 
appreciate it.

sg



--
Sent from: http://activemq.2283324.n4.nabble.com/ActiveMQ-User-f2341805.html

Re: JMS Producer Routing type

Posted by yw yw <wy...@gmail.com>.
Hi,

Which convertAndSend do you use?
If you use the one with destinationName of String type, the pubSubDomain
resolves it into queue if false(default) or topic if true. If you use the
one with destination of Destination type, it depends on the type you pass,
either ActiveMQQueue or ActiveMQTopic.
Regarding routing type, a JMS Queue is using Anycast in a point-to-point
manager and a JMS Topic is using Multicast in a publish-subscriber manager.
Please see
https://activemq.apache.org/components/artemis/documentation/2.0.0/address-model.html
for
details.


hobojoe <st...@prattgorman.com> 于2019年7月17日周三 上午2:04写道:

> I have a Spring JMS message producer
> (org.springframework.jms.core.JmsTemplate) that I initialize like this,
>
> sender.setConnectionFactory(new CachingConnectionFactory(
>                       new
> ActiveMQConnectionFactory(brokerUrl,artemisUser,unMaskedUserNamePassword))
>               );
>
> and then use jmsTemplate.convertAndSend to publish the message.
>
>
> Do I have to worry about specifying MULTICAST/ANYCAST for message
> producers?
> I don't think I understand
> routing as it pertains to producers very well. If someone can help me
> understand this I sure would
> appreciate it.
>
> sg
>
>
>
> --
> Sent from:
> http://activemq.2283324.n4.nabble.com/ActiveMQ-User-f2341805.html
>