1)recap
The Message
interface is the root interface of all JMS messages. It defines the message header and the acknowledge
method used for all messages.
Most message-oriented middleware (MOM) products treat messages as lightweight entities that consist of a header and a payload. The header contains fields used for message routing and identification; the payload contains the application data being sent.
Within this general form, the definition of a message varies significantly across products. It would be quite difficult for the JMS API to support all of these message models.
With this in mind, the JMS message model has the following goals:
- Provide a single, unified message API
- Provide an API suitable for creating messages that match the format used by provider-native messaging applications
- Support the development of heterogeneous applications that span operating systems, machine architectures, and computer languages
- Support messages containing objects in the Java programming language ("Java objects")
- Support messages containing Extensible Markup Language (XML) pages
JMS messages are composed of the following parts:
- Header - All messages support the same set of header fields. Header fields contain values used by both clients and providers to identify and route messages.
- Properties - Each message contains a built-in facility for supporting application-defined property values. Properties provide an efficient mechanism for supporting application-defined message filtering.
- Body - The JMS API defines several types of message body, which cover the majority of messaging styles currently in use.
2) Message Header
The JMSCorrelationID
header field is used for linking one message with another. It typically links a reply message with its requesting message.
JMSCorrelationID
can hold a provider-specific message ID, an application-specific String
object, or a provider-native byte[]
value.
3)Message Properties
相关推荐
JMS与Spring之二(用message listener container异步收发消息) 在本文中,我们将探讨使用 message listener container 在 Spring 框架中异步收发 JMS 消息的方法。Message listener container 是 Spring 提供的一...
是一个快速的开源消息组件(框架),支持集群,同等网络,自动检测,TCP,SSL,广播,持久化,XA,和J2EE1.4容器无缝结合,并且支持轻量级容器和大多数跨语言客户端上的Java虚拟机。消息异步接受,减少软件多系统集成...
- 使用Message Processor,如Scheduled Message Forwarding Processor (SMFP),将消息从Message Store取出并发送到JMS队列或主题。 按照以下步骤配置WSO2 ESB: 1. **创建Proxy Service**: 在ESB管理控制台中,...
《JMS与Message Queue技术详解》 在Java世界中,JMS(Java Message Service)是一种标准,用于在分布式环境中提供消息传递服务。它允许应用程序创建、发送、接收和读取消息,有效地支持异步通信模式。JMS的核心概念...
接着是“JMSMessage.xml”,此文件可能包含了JMS消息的具体定义,例如消息的类型(文本、对象、二进制等)、消息属性和头信息。Spring的`Message`接口提供了创建和处理JMS消息的方法。如果文件包含消息监听器的配置...
在Spring框架中,Java消息服务(Java Message Service,简称JMS)被广泛用于实现应用程序间的异步通信。本文将深入探讨Spring与JMS的整合,特别是MessageConverter的概念及其作用。 一、Spring JMS概述 Spring提供...
2. **创建和发送消息**:学习如何创建JMSMessage对象,设置消息属性,以及如何使用Producer发送不同类型的JMS消息,如TextMessage、ObjectMessage等。 3. **接收消息**:了解消费者如何通过Session创建Receiver或...
JMS(Java Message Service)是Java平台上的一个标准API,用于处理消息队列,它提供了与平台无关的方式来发送和接收消息。在本场景中,"用jms向WebSphere mq里发送消息"是指使用JMS接口来与WebSphere MQ进行交互,...
ActiveMQ默认使用JMS Message ID,这是一个由broker生成的ID,通常格式为`ID:<brokerName>-<sequenceNumber>-<timestamp>`。这种ID在大多数情况下已经足够,但有时我们可能需要根据业务逻辑生成具有特定含义的...
- **JMSMessage接口的提供商实现**:不同的消息中间件可能会有不同的实现细节。 #### 五、JMS公共工具 **JMS公共工具**提供了构建JMS应用所需的基础设施。 - **受管理的对象**:如`Destination`、`...
Message Owl:Eclipse JMS 队列和主题工具 Message Owl是一个基于的工具,可帮助使用 Eclipse 的人与基于的消息队列进行交互。 Message Owl可以添加到任何已经包含的安装中。 如果您是从头开始,最简单的方法是下载...
Java Message Service(JMS)是Java平台中用于创建、发送、接收和读取消息的应用程序接口。它提供了一种标准的方式来解耦应用程序之间的通信,使得它们可以异步地交换信息,提高了系统的可扩展性和可靠性。在JMS中,...
javax.jms.Message.class javax.jms.MessageConsumer.class javax.jms.MessageEOFException.class javax.jms.MessageFormatException.class javax.jms.MessageListener.class javax.jms.MessageNotReadableException...
javax.jms.Message.class javax.jms.JMSException.class javax.jms.Destination.class javax.jms.DeliveryMode.class javax.jms.Connection.class javax.jms.Session.class javax.jms.ConnectionMetaData.class ...
The book lays out the core of ActiveMQ in clear language, starting with the anatomy of a JMS message and moving quickly through connectors, message persistence, authentication and authorization....
Java消息服务(JMS,Java Message Service)是Java平台中用于在分布式系统中进行可靠的消息传递的标准API。它提供了一种解耦应用程序的方式,使得不同的组件可以异步通信,即使它们可能在不同的时间运行,或者在不同...
【Java Message Service (JMS) 简介】 Java Message Service (JMS) 是Java平台上的一个标准API,专门设计用于在企业级消息系统中进行消息交换。它为Java应用程序提供了一种统一的方式,以便与各种不同的消息中间件...
Java消息服务(Java Message Service,简称JMS)是Java平台中用于企业级应用间异步通信的一种标准API。它允许应用程序创建、发送、接收和读取消息,为分布式计算环境提供可靠的中间件服务。在JMS接收端,我们需要...
- **发送和接收消息**:使用Session创建MessageProducer和MessageConsumer,分别用于发送和接收JMS Message对象。 5. **代码示例** ```java import com.ibm.mq.MQQueueConnectionFactory; import javax.jms.*; ...
### 深入掌握 JMS(Java Message Service) #### JMS 基础概念 - **JMS**(Java Message Service)是一种Java平台中的消息中间件技术标准,它定义了一套标准API,用于应用程序之间的消息传递。JMS的出现极大地简化...