Navigation:  Messaging and Streaming > Publish-Subscribe > Configuration >

About Destinations

Previous pageReturn to chapter overviewNext page

WebORB messaging destinations must be configured in the WEB-INF/flex/messaging-config.xml file (despite of the reference to 'flex' in the file path, messaging destinations apply to and used by all supported publish/subscribe clients). A messaging destination is a concept enabling targeted message distribution, i.e. two messages sent to two different messaging destinations will be delivered only to the subscribers of the corresponding destination.

 

Consider the following examples of messaging destinations:

 

Sample polling destination:

<destination id="SamplePollingDestination">
 <properties>
   <server>
     <durable>false</durable>
   </server>
   <message-service-handler>weborb.messaging.v3.MessagingServiceHandler</message-service-handler>
   <message-storage-policy>weborb.messaging.v3.MemoryStoragePolicy</message-storage-policy>
 </properties>
 <channels>
   <channel ref="my-polling-amf"/>
 </channels>        
</destination>

 

Sample RTMP destination:

<destination id="SampleRTMPDestination">
 <properties>
   <server>
     <durable>false</durable>
   </server>
   <message-service-handler>weborb.messaging.v3.MessagingServiceHandler</message-service-handler>
   <message-storage-policy>weborb.messaging.v3.MemoryStoragePolicy</message-storage-policy>
 </properties>
 <channels>
   <channel ref="weborb-rtmp-messaging"/>
 </channels>
</destination>

 

Messaging Service Handler

Messages published to and retrieved from a WebORB messaging destination are processed by a class implementing the weborb.v3types.core.IServiceHandler interface. The class is referred to as a messaging service handler and is specified in the <message-service-handler> element shown in the destinations above. It is responsible for handling subscriptions, processing the incoming messages and delivering them to the subscribers. WebORB includes the following implementations of the messaging service handlers:

 

WebORB's Internal Message Routing (default handler) - this handler has a configurable policy for storing messages received from publishers and retrieving messages for delivery to subscribers. The default implementation of the storage policy stores messages in memory, however, the policy can be overridden to save messages in a database or any other persistent storage.
JMS Message Routing (JMS handler) - maps a destination to a JMS destination (queue or topic). Routes messages received from the publishers to the configured JMS destination. Also acts as an intermediary between the subscribers and the JMS destination. Messages received from the queue/topic are automatically routed to the subscribers.