4.3. Message Endpoint
来源:互联网 发布:sql添加语句怎么写 编辑:程序博客网 时间:2024/06/05 17:23
Overview
A message endpoint is the interface between an application and a messaging system. As shown in Figure 4.3, “Message Endpoint Pattern”, you can have a sender endpoint, sometimes called a proxy or a service consumer, which is responsible for sending In messages, and a receiver endpoint, sometimes called an endpoint or a service, which is responsible for receiving In messages.
Figure 4.3. Message Endpoint Pattern
Types of endpoint
Apache Camel defines two basic types of endpoint:
Consumer endpoint — Appears at the start of a Apache Camel route and reads In messages from an incoming channel (equivalent to a receiver endpoint).Producer endpoint — Appears at the end of a Apache Camel route and writes In messages to an outgoing channel (equivalent to a sender endpoint). It is possible to define a route with multiple producer endpoints.
Endpoint URIs
In Apache Camel, an endpoint is represented by an endpoint URI, which typically encapsulates the following kinds of data:
Endpoint URI for a consumer endpoint — Advertises a specific location (for example, to expose a service to which senders can connect). Alternatively, the URI can specify a message source, such as a message queue. The endpoint URI can include settings to configure the endpoint.Endpoint URI for a producer endpoint — Contains details of where to send messages and includes the settings to configure the endpoint. In some cases, the URI specifies the location of a remote receiver endpoint; in other cases, the destination can have an abstract form, such as a queue name.
An endpoint URI in Apache Camel has the following general form:
ComponentPrefix:ComponentSpecificURI
Where ComponentPrefix is a URI prefix that identifies a particular Apache Camel component (see for details of all the supported components). The remaining part of the URI, ComponentSpecificURI, has a syntax defined by the particular component. For example, to connect to the JMS queue, Foo.Bar, you can define an endpoint URI like the following:
jms:Foo.Bar
To define a route that connects the consumer endpoint, file://local/router/messages/foo
, directly to the producer endpoint, jms:Foo.Bar, you can use the following Java DSL fragment:
from("file://local/router/messages/foo").to("jms:Foo.Bar");
Alternatively, you can define the same route in XML, as follows:
<camelContext id="CamelContextID" xmlns="http://camel.apache.org/schema/spring"> <route> <from uri="file://local/router/messages/foo"/> <to uri="jms:Foo.Bar"/> </route></camelContext>
- 4.3. Message Endpoint
- Message Endpoint
- WCF后续之旅(16): 消息是如何分发到Endpoint的--消息筛选(Message Filter)
- A SOAP 1.2 message is not valid when sent to a SOAP 1.1 only endpoint.
- 解决:A SOAP 1.2 message is not valid when sent to a SOAP 1.1 only endpoint.
- [原创]WCF后续之旅(16): 消息是如何分发到Endpoint的--消息筛选(Message Filter)
- Endpoint Security
- [WCF] Endpoint
- USB: Endpoint
- Endpoint 理解
- oss endpoint
- message
- message
- message
- Message
- Message
- Message
- Message
- Codefroces455A Boredom
- Django 调试工具:Django Debug Toolbar
- Java语法基础-2
- 【hihocoder [Offer收割]编程练习赛9 B】【水题】水陆距离
- 数据分析系统Hive(第一部分)
- 4.3. Message Endpoint
- hdoj 5635 LCP Array (模拟)
- XMLHTTPRequest/Ajax请求 和普通请求的区别
- CSS的引入方式
- 【hihocoder [Offer收割]编程练习赛9 C】【简单DP】三等分
- 4.4. Pipes and Filters
- 设计模式
- 好未来2017秋招笔试:字符串中找出连续最长的数字串
- 最短路径算法之SPFA算法