|
|
Line 1: |
Line 1: |
− | == What is Record Recycler==
| + | {{note|no longer part of SMILA}} |
− | | + | |
− | 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 [[SMILA/Documentation/QueueWorker|Queue Worker]] specific tasks like sending record into queue. For Tasks information see page See [[SMILA/Documentation/QueueWorker/Tasks|Router/Listener Tasks]]
| + | |
− | | + | |
− | == Interface ==
| + | |
− | | + | |
− | <source lang="java">
| + | |
− | 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;
| + | |
− | }
| + | |
− | </source>
| + | |
− | | + | |
− | == Management Agent ==
| + | |
− | JMX Agent name is org.eclipse.smila.connectivity.queue.worker.jms.RecordRecycler
| + | |
− | | + | |
− | Infetface
| + | |
− | <source lang="java">
| + | |
− | public interface RecordRecyclerAgent {
| + | |
− | void recycleAsync(final String partitionId, final String configurationId, final String xquery) throws RecordRecyclerException;
| + | |
− | }
| + | |
− | </source>
| + | |
− | | + | |
− | '''Due partitions and XQuery are not completely supported now, agent interface was temporary simplified'''
| + | |
− | <source lang="java">
| + | |
− | public void recycleByConfiguration(final String configurationId);
| + | |
− | </source>
| + | |
− | | + | |
− | 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
| + | |
− | <source lang="java">
| + | |
− | recycleByConfiguration(Recycler1)
| + | |
− | </source>
| + | |
− | | + | |
− | | + | |
− | | + | |
− | | + | |
− | == 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. [[http://java.sun.com/j2ee/sdk_1.3/techdocs/api/javax/jms/Message.html | spec]]
| + | |
− | | + | |
− | For Record Recycler it operates with DataSourceID property
| + | |
− | | + | |
− | == Tasks ==
| + | |
− | See [[SMILA/Documentation/QueueWorker/Tasks|Router/Listener/Recycler Tasks]] page for tasks configuration.
| + | |
− | | + | |
− | == Samples ==
| + | |
− | <source lang="xml">
| + | |
− | <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>
| + | |
− | </source>
| + | |
− | | + | |
− | Exact configuration usage now is identical to [[SMILA/Documentation/QueueWorker/Router|Router]]
| + | |
− | | + | |
− | See also [[SMILA/Documentation/QueueWorker/ConfigurationSamples|samples]] page, to understand how [[SMILA/Documentation/QueueWorker/Tasks]] works.
| + | |
− | | + | |
− | [[Category:SMILA]]
| + | |