Skip to main content

Notice: this Wiki will be going read only early in 2024 and edits will no longer be possible. Please see: https://gitlab.eclipse.org/eclipsefdn/helpdesk/-/wikis/Wiki-shutdown-plan for the plan.

Jump to: navigation, search

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

(New page: == What is Router== The main goal of Router is to put Record into JMS queue but it also make any Queue Worker specific tasks like executing BPEL piplen...)
 
(Replacing page with '{{note|This has been removed in SMILA 0.9 by the JobManager framework}}')
 
(18 intermediate revisions by 3 users not shown)
Line 1: Line 1:
== What is Router==
+
{{note|This has been removed in SMILA 0.9 by the [[SMILA/Documentation/JobManager|JobManager framework]]}}
 
+
The main goal of Router is to put Record into JMS queue but it also make any [[SMILA/Documentation/QueueWorker|Queue Worker]] specific tasks like executing BPEL piplene.
+
 
+
== Interface ==
+
 
+
<source lang="java">
+
public enum Operation {
+
  ADD,
+
  DELETE,
+
  NONE
+
}
+
</source>
+
 
+
<source lang="java">
+
public interface Router extends QueueWorker {
+
  void route(Record record, Operation operation) throws RouterException;
+
}
+
</source>
+
 
+
== Configuration ==
+
Schema:org.eclipse.eilf.connectivity.queue.worker/schemas/QueueWorkerConfig.xsd
+
 
+
Configuration is a list of routing rules.
+
 
+
== Configuration Sample==
+
<source lang="xml">
+
<RouterConfig xmlns="http://www.eclipse.org/eilf/queue"
+
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+
  xsi:noNamespaceSchemaLocation="schemas/QueueWorkerConfig.xsd"
+
>
+
 
+
  <Rule Name="Default ADD Rule">
+
    <Condition>Operation='ADD'</Condition>
+
    <Task>
+
      <Synchronize Filter="only-attributes"/>
+
      <Send BrokerId="broker1" Queue="EILF.connectivity"/>
+
    </Task>
+
  </Rule>
+
 
+
  <Rule Name="Default DELETE Rule">
+
    <Condition>Operation='DELETE'</Condition>
+
    <Task>
+
      <Synchronize Filter="no-filter"/>
+
      <Send BrokerId="broker1" Queue="EILF.connectivity">
+
        <SetProperty Name="doSomething">really do something</SetProperty>
+
      </Send>
+
    </Task>
+
  </Rule>
+
 
+
</RouterConfig>
+
</source>
+
 
+
[[Category:SMILA]]
+

Latest revision as of 06:00, 24 January 2012

Note.png
This has been removed in SMILA 0.9 by the JobManager framework

Back to the top