Jump to: navigation, search

Difference between revisions of "SMILA/Documentation/QueueWorker/Listener"

Line 8: Line 8:
 
== Configuration ==
 
== Configuration ==
 
Schema: "org.eclipse.smila.connectivity.queue.worker/schemas/QueueWorkerConfig.xsd"
 
Schema: "org.eclipse.smila.connectivity.queue.worker/schemas/QueueWorkerConfig.xsd"
Location: "configuration/org.eclipse.smila.connectivity.queue.worker/ListenerConfig.xml"
+
Location: "configuration/org.eclipse.smila.connectivity.queue.worker.jms/ListenerConfig.xml"
  
 
Configuration is a list of listening rules.
 
Configuration is a list of listening rules.

Revision as of 08:06, 7 August 2009

What is Listener

The main goal of Listener is to get Record from JMS queue and process by BPEL workflow but it also make any Queue Worker specific tasks like resending Record into new JMS Queue, see Router/Listener Tasks.

Interface

there is no public interface. Its only possible to manually change workers quantity for every Rule by JMX management API/console. It may be useful for workload balancing.

Configuration

Schema: "org.eclipse.smila.connectivity.queue.worker/schemas/QueueWorkerConfig.xsd" Location: "configuration/org.eclipse.smila.connectivity.queue.worker.jms/ListenerConfig.xml"

Configuration is a list of listening rules. There are only three difference with Router rules:

  • <Source BrokerId="broker1" Queue="SMILA.connectivity"/> - source queue reference (BrokerID should be specified in Broker Connection Service configuration).
  • WaitMessageTimeout - timeout (in seconds) for attempts to pull JMS message from queue, default value is 1 second.
  • Workers - startup number of threads to listen queue under this rule, by default it is 1 thread.

Condition

Each listener Rule is a set of Queue consumers (workers) grouped by value of Condition tag. Condition is a String whose syntax is based on a subset of the SQL92 conditional expression syntax pointed in JMS specification ( [| spec] ) and it's absolutely the same syntax that used in Router Condition tag.

There are two JMS properties supported during all queue related processes in router/listener

  • Operation
  • DataSourceID

Custom JMS properties may be added/used in conditions, look at the samples.

Tasks

See Router/Listener Tasks page for tasks configuration.

Samples

See samples page.