JMS中queue和topic区别

2008-07-08 13:16

What is the difference between queue and topic?

A connection is created between the client and the server from a connection factory. Connections can be shared by several threads. The user credentials are supplied at this level. It is probably common for a client application to share access to a single connection to the server (unless different security credentials are required for different destinations).
A session is created from a connection. The session may only be used by one thread at one time. The user credentials are inherited from the parent connection. It is probably common for each MessageProducer (TopicPublisher or QueueSender) or MessageConsumer (TopicSubscriber or QueueReceiver) to have their own session due to the threading restriction.
You can look at it like a tree. At the top you have a connection factory, beneath this you have your connections and then beneath the connections you have sessions. The leaves of the tree are the JMS actors (MessageProducers and MessageConsumers).

References: Creating Robust JMS Applications : http://java.sun.com/j2ee/1.4/docs/tutorial/doc/JMS6.html

两种JMS的实现方法:
Topic==>消息主题 是发布/订阅 机制 一个消息产生多个对应 1:N
Queue==>消息队列 是点到点 一个消息产生一个对应 1:1

g

JMS中queue和topic区别相关推荐

  1. ActiveMQ—Queue与Topic区别

    Queue与Topic区别 转自:http://blog.csdn.net/qq_21033663/article/details/52458305 队列(Queue)和主题(Topic)是JMS支持 ...

  2. RocketMQ中的Topic和JMS的queue有什么区别?

    queue就是来源于数据结构的FIFO队列.而Topic是个抽象的概念,每个Topic底层对应N个queue,而数据也真实存在queue上的.

  3. queue与topic的区别

    JMS中定义了两种消息模型:点对点(point to point, queue)和发布/订阅(publish/subscribe,topic).主要区别就是是否能重复消费. 点对点:Queue,不可重 ...

  4. ActiveMQ的queue以及topic两种消息处理机制分析

    转自: http://itindex.net/detail/50057-activemq-queue-topic 上一期介绍了我们项目要用到activeMQ来作为jms总线,并且给大家介绍了activ ...

  5. JMS中的消息通信模型

    1. MQ简介: 消息队列(Message Queue,简称MQ),是应用程序与应用程序之间的一种通信方法.应用程序通过发送和检索出入列队的针对应用程序的数据 - 消息来通信,而无需专用连接来链接它们 ...

  6. queue.Queue和multiprocessing.Queue队列的区别

    queue.Queue和multiprocessing.Queue队列的区别 文章目录 queue.Queue和multiprocessing.Queue队列的区别 前言 一.明显的区别 二.queu ...

  7. JS中同步和异步的区别

    JS中同步和异步的区别 js是一门单线程语言,所谓"单线程",就是指一次只能完成一件任务.如果有多个任务,就必须排队,前面一个任务完成,再执行后面一个任务,以此类推.如果一个任务耗 ...

  8. mybatis与php,浅谈mybatis中的#和$的区别

    浅谈mybatis中的#和$的区别 发布于 2016-07-30 11:14:47 | 236 次阅读 | 评论: 0 | 来源: 网友投递 MyBatis 基于Java的持久层框架MyBatis 本 ...

  9. 关于EF中ApplyCurrentValues和ApplyOriginalValues区别

    关于EF中ApplyCurrentValues和ApplyOriginalValues区别:两者都是编辑数据时使用. //         // 摘要:         //     将 System ...

最新文章

  1. 请还互联网产业一个朗朗乾坤
  2. WinCE的C#编程,对float型进行四舍五入保留两位小数,小数进行四舍五入操作,Math.Round的应用案例。...
  3. [云炬创业管理笔记]第一章测试1
  4. R语言观察日志(part14)--R语言杂记
  5. RocketMQ消费者是如何获取消息的?转疯了!
  6. NLP基础 : HMM 隐马尔可夫模型
  7. 源码解读_入口开始解读Vue源码系列(二)——new Vue 的故事
  8. 学习笔记——逻辑斯蒂回归与最大熵模型
  9. LeetCode(590)——N叉树的后序遍历(JavaScript)
  10. winform设置文本框ctrl+A和双击实现全选
  11. fedora 14 root登陆修改方法
  12. ios睡眠分析 卧床 睡眠_iOS 10 的「就寝」功能如何让我的睡眠变得更有规律
  13. vue设置浏览器顶部小图标
  14. RK3066开发板的唯一码UUID
  15. C++基础之结构体中const的使用场景
  16. CrowdHuman数据集介绍
  17. iMovie教程:如何将照片添加至iMovie剪辑中?
  18. 2013互联网公司找工作--大牛总结(ZJU)
  19. geogebra与matlab,浅谈Geogebra在大学数学教学中的应用
  20. django学习007-MVT的T(模板)的使用

热门文章

  1. 2013\National _C_C++_B\4.高僧斗法
  2. 【Java13】cookiesession(登陆案例(2)),jsp(登录案例(3))
  3. 【机器视觉】 deserialize_measure算子
  4. 【机器视觉】 continue算子
  5. 【Linux】一步一步学Linux——arpd命令(184)
  6. 【Linux】一步一步学Linux——file命令(37)
  7. 【Linux系统编程】Linux 信号列表
  8. 职称不用计算机考试吗,中级职称计算机考试需要什么条件可不用考试
  9. 关于iOS沙盒的目录结构和获取
  10. booloader编写