The Talon Manual

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

  • Defining a bus named "sample-bus" with a "new-orders-channel".
  • An application that uses the "sample-bus" and joins the "new-orders-channel" (note the usage of join="true")

 

Code Block
<model>
<?xml version="1.0"?>
<model xmlns="http://www.neeveresearch.com/schema/x-ddl" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
 
  <!-- Define buses and channels that will be shared between applications-->
  <buses>
    <bus name="sample-bus">
	  <provider>activemq</provider>
      <address>localhost</address>
      <port>61616</port>
  	  <channels>
        <channel name="new-orders-channel">
          <qos>Guaranteed</qos>
          <key>NEWORDERS/${Region}/${Department}</key>
        </channel>
      <channels>
    </bus>
  </buses>
  
  <!-- Apps will reference the buses they use in their messaging config -->
  <apps>
    <app name="sample-app" mainClass="com.sample.SampleApp">
      <messaging>
		<factories>
          <factory name="com.sample.messages.OrderMessagesFactory" />
        </factories>
		<buses>
          			<bus name="sample-bus">
				<channels>
					<channel name="new-orders-channel" join="true"/>
						<filter>Region=US|Canada</filter>
					</channel>
				</channels>
	        </bus>

       		</buses>
      <messaging>
    </app>
  </apps>
</model>

...

A channel filter filters variable parts of a channel key to filter what is received over a message channel. It is used to determine the subscriptions issued on behalf of the application.

 

Channel filter take the following form: 
var1=val1[|val2][;var2=val3]

...