Notice: This Wiki is now read only and edits are no longer possible. Please see: https://gitlab.eclipse.org/eclipsefdn/helpdesk/-/wikis/Wiki-shutdown-plan for the plan.
Difference between revisions of "SMILA/Documentation/QueueWorker/RecordRecycler"
(New page: == What is Record Recycler== The main goal of Record Recycler is to repeat record processing again. But it's a generic service. It get records list from Blackboard partition using XQuery ...) |
|||
Line 14: | Line 14: | ||
== Management Agent == | == Management Agent == | ||
− | JMX Agent name is org.eclipse.smila.connectivity.queue.worker.RecordRecycler | + | JMX Agent name is org.eclipse.smila.connectivity.queue.worker.jms.RecordRecycler |
Infetface | Infetface | ||
Line 29: | Line 29: | ||
To call record recycling use recycler configuration XML file name as a parameter. For example, there is a configuration file | To call record recycling use recycler configuration XML file name as a parameter. For example, there is a configuration file | ||
− | "configuration/org.eclipse.smila.connectivity.queue.worker/recyclers/Recycler1.xml". | + | "configuration/org.eclipse.smila.connectivity.queue.worker.jms/recyclers/Recycler1.xml". |
it may be used in JMX agent as a | it may be used in JMX agent as a | ||
<source lang="java"> | <source lang="java"> | ||
Line 40: | Line 40: | ||
== 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/recyclers/*" | + | Location: "configuration/org.eclipse.smila.connectivity.queue.worker.jms/recyclers/*" |
Every Record Recycler configuration is a list of routing rules. | Every Record Recycler configuration is a list of routing rules. |
Revision as of 08:11, 7 August 2009
Contents
What is Record Recycler
The main goal of Record Recycler is to repeat record processing again. But it's a generic service. It get records list from Blackboard partition using XQuery and executes any Queue Worker specific tasks like sending record into queue. For Tasks information see page See Router/Listener Tasks
Interface
public interface RecordRecycler { void recycle(String partitionId, String configurationId, final String xquery) throws RecordRecyclerException; void recycleAsync(final String partitionId, final String configurationId, final String xquery) throws RecordRecyclerException; }
Management Agent
JMX Agent name is org.eclipse.smila.connectivity.queue.worker.jms.RecordRecycler
Infetface
public interface RecordRecyclerAgent { void recycleAsync(final String partitionId, final String configurationId, final String xquery) throws RecordRecyclerException; }
Due partitions and XQuery are not completely supported now, agent interface was temporary simplified
public void recycleByConfiguration(final String configurationId);
To call record recycling use recycler configuration XML file name as a parameter. For example, there is a configuration file "configuration/org.eclipse.smila.connectivity.queue.worker.jms/recyclers/Recycler1.xml". it may be used in JMX agent as a
recycleByConfiguration(Recycler1)
Configuration
Schema: "org.eclipse.smila.connectivity.queue.worker/schemas/QueueWorkerConfig.xsd" Location: "configuration/org.eclipse.smila.connectivity.queue.worker.jms/recyclers/*"
Every Record Recycler configuration is a list of routing rules.
Condition
Processing Rule is found 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]
For Record Recycler it operates with DataSourceID property
Tasks
See Router/Listener/Recycler Tasks page for tasks configuration.
Samples
<RecordRecyclerConfig xmlns="http://www.eclipse.org/smila/queue" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../schemas/QueueWorkerConfig.xsd" > <Rule Name="First recycle Rule"> <Condition>DataSourceID='myDataSource'</Condition> <Task> <Send BrokerId="broker1" Queue="SMILA.connectivity" RecordFilter="nothing"/> </Task> </Rule> <Rule Name="Second recycle Rule"> <Condition>NOT(DataSourceID='myDataSource')</Condition> <Task> <Send BrokerId="broker1" Queue="SMILA.connectivity" RecordFilter="nothing"> <SetProperty Name="doAdd">no</SetProperty> </Send> </Task> </Rule> </RecordRecyclerConfig>
Exact configuration usage now is identical to Router
See also samples page, to understand how SMILA/Documentation/QueueWorker/Tasks works.