JMS Topic vs Queues

前端 未结 9 2117
广开言路
广开言路 2020-12-04 04:48

I was wondering what is the difference between a JMS Queue and JMS Topic.

ActiveMQ page says

Topics

In JMS a Topic implements <

9条回答
  •  醉酒成梦
    2020-12-04 05:09

    If you have N consumers then:

    JMS Topics deliver messages to N of N JMS Queues deliver messages to 1 of N

    You said you are "looking to have a 'thing' that will send a copy of the message to each subscriber in the same sequence as that in which the message was received by the ActiveMQ broker."

    So you want to use a Topic in order that all N subscribers get a copy of the message.

提交回复
热议问题