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.
SMILA/Documentation/QueueWorker/RecordRecycler
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.