How JMS destinations relate to service integration destinations
Most WebSphere® Application Server applications use the JMS APIs to access the services provided by the service integration bus. JMS defines JMS destinations, which are the Java objects to which JMS applications send messages and from which JMS applications receive messages. The attributes of a JMS destination include the address of the destination that the messaging provider uses. For the service integration messaging provider, this address is a service integration destination name (a queue name or topic space name) and a bus name. In this way, a JMS destination can identify a service integration bus destination.
Typically, a JMS application obtains a JMS destination from JNDI lookup of the destination JNDI name. However, a JMS application can also obtain a JMS destination in other ways, for example, from the JMSReplyTo property of a JMS message.
JMS destinations - queues and topics
- JMS queue destination
- Used for point-to-point messaging, in which producing applications
(producers) send messages to a queue. The messaging provider stores
just one copy of each message until a consuming application (consumer)
receives the message. If there are several consumers, only one consumer
receives a copy of the message; if there are no consumers, the message
is queued.
In service integration, a JMS queue destination object has a queue name property and a bus name property (it also has other properties).
- JMS topic destination
- Used for publish/subscribe messaging, in which producing applications
(publishers) send messages (publications) to a topic. The messaging
provider delivers a copy of each publication to each consuming application
(subscriber). If there are no subscribers, service integration discards
the publication.
Another difference from point-to-point messaging is that subscribers can consume messages from multiple similar topics by including wildcards in a topic name (publishers cannot include wildcards in a topic name).
In service integration, a JMS topic destination object has a topic name, a topic space name, and a bus name property (it also has other properties).
JMS destinations - relationship with service integration destinations
In service integration, a JMS destination identifies a service integration destination. Its queue name or topic space name property is the name of the service integration destination. Its bus name property is the name of the service integration bus that contains the destination.
You can omit the bus name property when you define the JMS destination. If you do then the JMS destination identifies the service integration destination in the local bus; that is, whichever bus the JMS application connects to. This can be convenient where there is only one service integration bus or where all buses contain a destination with the same name.
- Service integration queue destination
- 佇列目的地代表訊息佇列,用於點對點傳訊。在特定匯流排成員(應用程式伺服器或應用程式伺服器叢集)中,會將服務整合佇列目的地本地化。
當生產者將訊息傳送到佇列目的地時,服務整合匯流排會將訊息遞送給這個匯流排成員中的某個傳訊引擎。
然後傳訊引擎就會將訊息遞送給消費者。必要的話,傳訊引擎會將訊息放在佇列中,直到消費者準備好接收它。
Typically, a JMS queue destination identifies a service integration queue destination; that is, its bus name property matches the local bus name and its queue name property matches the name of a service integration queue destination in the local bus.
- Service integration topic space destination
- 主題空間目的地代表一組「發佈和訂閱」主題,用於發佈/訂閱傳訊。 特定訊息(發佈)的主題是訊息的一項內容。 服務整合主題空間目的地不會在特定匯流排成員中本地化。服務整合會維護主題空間中的訂閱清單,且會對照清單來比對每一項發佈。當新的發佈符合主題空間中的一或多項訂閱時,服務整合會向每位訂閱者遞送一份發佈資訊。必要的話,服務整合可以將發佈訊息放在佇列中,直到訂閱者準備好接收它。如果新的發佈不符合任何訂閱,服務整合會捨棄發佈資訊。
Typically, a JMS topic destination identifies a service integration topic space destination; that is, its bus name property matches the local bus name and its topic space name property matches the name of a service integration topic space destination in the local bus. When a JMS application sends a message to the JMS topic destination, service integration sets the destination topic property of the message to the topic name property of the JMS topic destination and then sends the message to the service integration topic space destination.
- Service integration foreign destination
- 外部目的地代表另一個匯流排中所定義的目的地(外部匯流排)。您可以在點對點傳訊使用外部目的地。如果需要置換外部匯流排中個別目的地的安全設定或傳訊預設值,便可使用外部目的地。 外部匯流排可以是另一個服務整合匯流排或 IBM MQ 網路(也就是一或多個交互連接的 IBM MQ 佇列管理程式或佇列共用群組)。 當生產者將訊息傳送到外部目的地時,服務整合會將訊息遞送給外部匯流排。然後外部匯流排負責根據其目的地的定義,將訊息適當排入佇列中。
A JMS destination can identify a service integration foreign destination; that is, its bus name and queue or topic space name properties can match the foreign bus name and queue or topic space name of the foreign destination. However, this is not always necessary. If there is no service integration foreign destination with a matching foreign bus name and a matching destination (queue or topic space) name, service integration sends the message to the specified foreign bus anyway.