I need to transform my csv file to XML with elements with prefixes "api".
I have WSO2 ESB configuration like this:
<?xml version="1.0" encoding="UTF-8"?>
<definitions xmlns="http://ws.apache.org/ns/synapse">
<proxy name="c"
transports="https http local vfs"
startOnLoad="true"
trace="enable">
<description/>
<target>
<inSequence>
<smooks config-key="sm">
<input type="text"/>
<output type="xml"/>
</smooks>
<log level="full"/>
</inSequence>
<outSequence/>
<faultSequence>
<log level="full"/>
</faultSequence>
</target>
<parameter name="transport.vfs.ActionAfterProcess">MOVE</parameter>
<parameter name="transport.PollInterval">5</parameter>
<parameter name="transport.vfs.MoveAfterProcess">file://D:\test\out</parameter>
<parameter name="transport.vfs.FileURI">file://D:\test</parameter>
<parameter name="transport.vfs.MoveAfterFailure">file://D:\test\fail</parameter>
<parameter name="transport.vfs.FileNamePattern">.*.csv</parameter>
<parameter name="transport.vfs.ContentType">text/plain</parameter>
<parameter name="transport.vfs.ActionAfterFailure">MOVE</parameter>
</proxy>
<localEntry key="sm">
<smooks-resource-list xmlns="http://www.milyn.org/xsd/smooks-1.1.xsd"
xmlns:core="http://www.milyn.org/xsd/smooks/smooks-core-1.3.xsd"
xmlns:csv="http://www.milyn.org/xsd/smooks/csv-1.2.xsd">
<resource-config selector="org.xml.sax.driver">
<resource>org.milyn.csv.CSVReader</resource>
<param name="fields">code,name</param>
<param name="rootElementName">api:root</param>
<param name="recordElementName">api:rec</param>
</resource-config>
</smooks-resource-list>
</localEntry>
<sequence name="fault">
<log level="full">
<property name="MESSAGE" value="Executing default "fault" sequence"/>
<property name="ERROR_CODE" expression="get-property('ERROR_CODE')"/>
<property name="ERROR_MESSAGE" expression="get-property('ERROR_MESSAGE')"/>
</log>
<drop/>
</sequence>
<sequence name="main">
<log/>
<drop/>
</sequence>
</definitions>
Without prefix api it works, else - not.
Where I just did not added namespaces - it's did not help me.
Anybody can help? Thanks.
Related
I am working on simple Wso2 RabbitMQ integration. My inbound endpoints consume the message and send it to the sequence. The sequence then stores the message. Another on failure sequence currently logging the error. I am trying to send the message on the queue again from the sequence.
SalesOrderQueueInboundEP
<?xml version="1.0" encoding="UTF-8"?>
<inboundEndpoint name="SalesOrderQueueInboundEP" onError="SalesOrderQueueErrorSeq" protocol="rabbitmq" sequence="SalesOrderQueueProcessSeq" suspend="false" xmlns="http://ws.apache.org/ns/synapse">
<parameters>
<parameter name="sequential">true</parameter>
<parameter name="coordination">true</parameter>
<parameter name="rabbitmq.connection.factory">AMQPConnectionFactory</parameter>
<parameter name="rabbitmq.server.host.name">localhost</parameter>
<parameter name="rabbitmq.server.port">5672</parameter>
<parameter name="rabbitmq.server.user.name">guest</parameter>
<parameter name="rabbitmq.server.password">guest</parameter>
<parameter name="rabbitmq.queue.name">SalesOrderQueue</parameter>
<parameter name="rabbitmq.exchange.name">amq.direct</parameter>
<parameter name="rabbitmq.message.content.type">application/xml</parameter>
</parameters>
</inboundEndpoint>
SalesOrderQueueProcessSeq
<?xml version="1.0" encoding="UTF-8"?>
<sequence name="SalesOrderQueueProcessSeq" trace="disable" xmlns="http://ws.apache.org/ns/synapse">
<log description="Log payload" level="full"/>
<property expression="json-eval($)" name="body_json_property" scope="default" type="STRING"/>
<sequence key="SalesDBSeq"/>
</sequence>
SalesOrderQueueErrorSeq
<?xml version="1.0" encoding="UTF-8"?>
<sequence name="SalesOrderQueueErrorSeq" trace="disable" xmlns="http://ws.apache.org/ns/synapse">
<log description="Log error details in case of failure" level="full">
<property name="MESSAGE" value="An unexpected error occurred."/>
<property expression="$ctx:SYNAPSE_REST_API" name="REST_API"/>
<property expression="$ctx:ERROR_CODE" name="ERROR_CODE"/>
<property expression="$ctx:ERROR_MESSAGE" name="ERROR_MESSAGE"/>
<property expression="$ctx:ERROR_DETAIL" name="ERROR_DETAIL"/>
<property expression="$ctx:ERROR_EXCEPTION" name="ERROR_EXCEPTION"/>
</log>
</sequence>
#NMRhman,
I believe that you need to roll back the transaction if the messages go to the error sequence.
Can you add the following to the inbound sequence?
<parameter name="rabbitmq.queue.auto.ack">false</parameter>
<parameter name="rabbitmq.queue.auto.delete">false</parameter>
Also, add the following property which instructs to rollback the message in the error sequence.
<property name="SET_ROLLBACK_ONLY" value="true" scope="default" type="STRING"/>
Modified sequences as follows.
SalesOrderQueueInboundEP
<?xml version="1.0" encoding="UTF-8"?>
<inboundEndpoint name="SalesOrderQueueInboundEP" onError="SalesOrderQueueErrorSeq" protocol="rabbitmq" sequence="SalesOrderQueueProcessSeq" suspend="false" xmlns="http://ws.apache.org/ns/synapse">
<parameters>
<parameter name="sequential">true</parameter>
<parameter name="coordination">true</parameter>
<parameter name="rabbitmq.connection.factory">AMQPConnectionFactory</parameter>
<parameter name="rabbitmq.server.host.name">localhost</parameter>
<parameter name="rabbitmq.server.port">5672</parameter>
<parameter name="rabbitmq.server.user.name">guest</parameter>
<parameter name="rabbitmq.server.password">guest</parameter>
<parameter name="rabbitmq.queue.name">SalesOrderQueue</parameter>
<parameter name="rabbitmq.queue.auto.ack">false</parameter>
<parameter name="rabbitmq.queue.auto.delete">false</parameter>
<parameter name="rabbitmq.exchange.name">amq.direct</parameter>
<parameter name="rabbitmq.message.content.type">application/xml</parameter>
</parameters>
</inboundEndpoint>
SalesOrderQueueErrorSeq
<?xml version="1.0" encoding="UTF-8"?>
<sequence name="SalesOrderQueueErrorSeq" trace="disable" xmlns="http://ws.apache.org/ns/synapse">
<log description="Log error details in case of failure" level="full">
<property name="MESSAGE" value="An unexpected error occurred."/>
<property expression="$ctx:SYNAPSE_REST_API" name="REST_API"/>
<property expression="$ctx:ERROR_CODE" name="ERROR_CODE"/>
<property expression="$ctx:ERROR_MESSAGE" name="ERROR_MESSAGE"/>
<property expression="$ctx:ERROR_DETAIL" name="ERROR_DETAIL"/>
<property expression="$ctx:ERROR_EXCEPTION" name="ERROR_EXCEPTION"/>
</log>
<property name="SET_ROLLBACK_ONLY" value="true" scope="default" type="STRING"/>
<drop/>
</sequence>
Please try the above and share your feedback.
Issue: i have a proxy service which consumes only XML message, but sometimes if we are getting XML message with not proper format,just syntax error,our proxy should send that message to a different queue,the message should not loss.
i have followed the below link but unable to get the expected output
https://www.yenlo.com/blog/guaranteed-message-deliveries-part-3-monitoring-the-redelivery-policy
Below is my proxy:
<?xml version="1.0" encoding="UTF-8"?>
<proxy name="RollbackProxy" startOnLoad="true" transports="jms" xmlns="http://ws.apache.org/ns/synapse">
<target>
<inSequence>
<log description="" level="full">
<property name="****************" value="******************************"/>
</log>
</inSequence>
<outSequence/>
<faultSequence>
<property name="SET_ROLLBACK_ONLY" scope="axis2" type="STRING" value="true"/>
<log category="ERROR" level="full">
<property expression="$ctx:ERROR_CODE" name="error_code"/>
<property expression="$ctx:ERROR_MESSAGE" name="error_message"/>
<property expression="$ctx:ERROR_DETAIL" name="error_detail"/>
</log>
</faultSequence>
</target>
<parameter name="transport.jms.Destination">QueueName</parameter>
<parameter name="transport.jms.ContentType">
<rules xmlns="">
<jmsProperty>contentType</jmsProperty>
<default>application/xml</default>
</rules>
</parameter>
<parameter name="transport.jms.ConnectionFactory">myQueueConnectionFactory</parameter>
</proxy>
axis2.xml and activemq.xml i have properly updated.
we are using active MQ.
Can somebody guide me on this?
Thanks in Advance
I have some questions because documentation is not clear..
How should I setup WSO2 ESB environment to be able to read and write messages form WSO2 MessageBroker.
I followed ConfigurewithWSO2MessageBroker
I have ESB and MB on same server (MB has Offset=2)
/repository/conf/axis2/axis2.xml
....
<transportReceiver name="jms" class="org.apache.axis2.transport.jms.JMSListener">
<parameter name="JMSTopic" locked="false">
<parameter name="java.naming.factory.initial" locked="false">org.wso2.andes.jndi.PropertiesFileInitialContextFactory</parameter>
<parameter name="java.naming.provider.url" locked="false">repository/conf/jndi.properties</parameter>
<parameter name="transport.jms.ConnectionFactoryJNDIName" locked="false">TopicConnectionFactory</parameter>
<parameter name="transport.jms.ConnectionFactoryType" locked="false">topic</parameter>
</parameter>
<parameter name="JMSQueue" locked="false">
<parameter name="java.naming.factory.initial" locked="false">org.wso2.andes.jndi.PropertiesFileInitialContextFactory</parameter>
<parameter name="java.naming.provider.url" locked="false">repository/conf/jndi.properties</parameter>
<parameter name="transport.jms.ConnectionFactoryJNDIName" locked="false">QueueConnectionFactory</parameter>
<parameter name="transport.jms.ConnectionFactoryType" locked="false">queue</parameter>
</parameter>
<parameter name="default" locked="false">
<parameter name="java.naming.factory.initial" locked="false">org.wso2.andes.jndi.PropertiesFileInitialContextFactory</parameter>
<parameter name="java.naming.provider.url" locked="false">repository/conf/jndi.properties</parameter>
<parameter name="transport.jms.ConnectionFactoryJNDIName" locked="false">QueueConnectionFactory</parameter>
<parameter name="transport.jms.ConnectionFactoryType" locked="false">queue</parameter>
</parameter>
</transportReceiver>
...
and sender part
<transportSender name="jms" class="org.apache.axis2.transport.jms.JMSSender">
<parameter name="default" locked="false">
<parameter name="java.naming.factory.initial" locked="false">org.wso2.andes.jndi.PropertiesFileInitialContextFactory</parameter>
<parameter name="java.naming.provider.url" locked="false">repository/conf/jndi.properties</parameter>
<parameter name="transport.jms.ConnectionFactoryJNDIName" locked="false">ConnectionFactory</parameter>
</parameter>
</transportSender>
jndi.properties files
connectionfactory.QueueConnectionFactory = amqp://admin:admin#clientID/carbon?brokerlist='tcp://gst-esb-qa-01:5674'
connectionfactory.TopicConnectionFactory = amqp://admin:admin#clientID/carbon?brokerlist='tcp://gst-esb-qa-01:5674'
connectionfactory.ConnectionFactory = amqp://admin:admin#clientID/carbon?brokerlist='tcp://gst-esb-qa-01:5674'
queue.myQueue = myQueue
queue.testQueue= testQueue
topic.MyTopic = MyTopic
My proxy
<proxy name="SendMessagetoJMSProxy" transports="http" startOnLoad="true">
<target>
<endpoint>
<address uri="jms:/myQueue?&transport.jms.DestinationType=queue"/>
</endpoint>
<inSequence>
<log level="custom">
<property name="STATE" value="message is sent to queue"/>
</log>
<property name="OUT_ONLY" value="true"/>
<property name="FORCE_SC_ACCEPTED" value="true" scope="axis2"/>
</inSequence>
<outSequence/>
</target>
</proxy>
my SOAP UI call
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ser="http://services.samples" xmlns:xsd="http://services.samples/xsd">
<soapenv:Header/>
<soapenv:Body>
<ser:dummy>
<xsd:symbol>IBM</xsd:symbol>
</ser:dummy>
</soapenv:Body>
</soapenv:Envelope>
According to doc I should see the message in JMS Message Broker BUT I get
Error while building Passthrough stream
TID[-1234] [ESB] [2017-05-16 12:52:47,137] ERROR {org.apache.synapse.transport.passthru.util.RelayUtils} - Error while building Passthrough stream org.apache.axiom.om.impl.builder.StAXOMBuilder.lookahead(StAXOMBuilder.java:711) org.apache.axiom.soap.impl.llom.SOAPBodyImpl.hasLookahead(SOAPBodyImpl.java:191) org.apache.axiom.soap.impl.llom.SOAPBodyImpl.getFirstElementLocalName(SOAPBodyImpl.java:217) org.apache.axiom.soap.impl.llom.SOAPBodyImpl.hasFault(SOAPBodyImpl.java:99) org.apache.axiom.soap.impl.llom.SOAPEnvelopeImpl.hasFault(SOAPEnvelopeImpl.java:305) org.apache.synapse.transport.passthru.util.DeferredMessageBuilder.getDocument(DeferredMessageBuilder.java:189) org.apache.synapse.transport.passthru.util.RelayUtils.builldMessage(RelayUtils.java:137) org.apache.synapse.transport.passthru.util.RelayUtils.buildMessage(RelayUtils.java:100) org.apache.synapse.mediators.AbstractListMediator.buildMessage(AbstractListMediator.java:140) org.apache.synapse.mediators.AbstractListMediator.mediate(AbstractListMediator.java:83) org.apache.synapse.mediators.AbstractListMediator.mediate(AbstractListMediator.java:59) org.apache.synapse.mediators.base.SequenceMediator.mediate(SequenceMediator.java:158) org.apache.synapse.core.axis2.ProxyServiceMessageReceiver.receive(ProxyServiceMessageReceiver.java:210) org.apache.axis2.engine.AxisEngine.receive(AxisEngine.java:180) org.apache.synapse.transport.passthru.ServerWorker.processEntityEnclosingRequest(ServerWorker.java:403) org.apache.synapse.transport.passthru.ServerWorker.run(ServerWorker.java:151) org.apache.axis2.transport.base.threads.NativeWorkerPool$1.run(NativeWorkerPool.java:172) java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) java.lang.Thread.run(Thread.java:745)
AND
Endpoint : AnonymousEndpoint with address jms:/myQueue?&transport.jms.DestinationType=queue will be marked SUSPENDED as it failed
First question :
java.naming.provider.url param in axis2.xml is it relative to [ESB Home] location ?
Im my case server folder structure looks like ...
maybe that should look like ....????
<parameter name="java.naming.provider.url" locked="false">file:/home/wso2admin/wso2esb-5.0.0/repository/conf/jndi.properties</parameter>
SECOND :
is this error related to Message Builder and Formater ????
any help would be nice ...couse Im stuck for days ...
First Question:java.naming.provider.url param in axis2.xml is it relative to [ESB Home] location ?
No, you dont need to add ESB home location.
Second Question: is this error related to Message Builder and Formater ????
Yes, you are getting an error with message builders.
Just verify whether you added client jars and verify your proxy. Please create a proxy as follow and try it.
Sample Proxy:
<proxy name="QueueProxy" startOnLoad="true" transports="jms">
<target>
<inSequence>
<property name="OUT_ONLY" value="true"/>
<property name="FORCE_SC_ACCEPTED" value="true" scope="axis2"/>
<send>
<endpoint>
<address uri="jms:/MyQueue?transport.jms.ConnectionFactoryJNDIName=QueueConnectionFactory&java.naming.factory.initial=org.wso2.andes.jndi.PropertiesFileInitialContextFactory&java.naming.provider.url=repository/conf/jndi.properties"/>
</endpoint>
</send>
</inSequence>
</target>
</proxy>
Reference: https://docs.wso2.com/display/ESB500/ESB+as+a+JMS+Producer
Please try the below proxy and check the URL format you are using
<proxy xmlns="http://ws.apache.org/ns/synapse" name="StockQuoteProxy" transports="http">
<target>
<inSequence>
<property action="set" name="OUT_ONLY" value="true"/>
<send>
<endpoint>
<address uri="jms:/myQueue?transport.jms.ConnectionFactoryJNDIName=QueueConnectionFactory&java.naming.factory.initial=org.apache.activemq.jndi.ActiveMQInitialContextFactory&java.naming.provider.url=tcp://localhost:61616&transport.jms.DestinationType=queue"/>
</endpoint>
</send>
</inSequence>
<outSequence>
<send/>
</outSequence>
</target>
<publishWSDL uri="file:repository/samples/resources/proxy/sample_proxy_1.wsdl"/>
for more
https://docs.wso2.com/display/ESB500/ESB+as+a+JMS+Producer
https://docs.wso2.com/display/MB310/Integrating+WSO2+ESB
Thanks to Rajjaz and Jan ...
I created a proxy
<?xml version="1.0" encoding="UTF-8"?>
<proxy xmlns="http://ws.apache.org/ns/synapse"
name="SendMessagetoJMSProxy"
startOnLoad="true"
statistics="disable"
trace="disable"
transports="http,https">
<target>
<inSequence>
<log level="custom">
<property name="STATE" value="message is sent to myQueue"/>
</log>
<property name="OUT_ONLY" value="true"/>
<property name="FORCE_SC_ACCEPTED" scope="axis2" value="true"/>
</inSequence>
<outSequence/>
<endpoint>
<address uri="jms:/myQueue?transport.jms.ConnectionFactoryJNDIName=QueueConnectionFactory&java.naming.factory.initial=org.wso2.andes.jndi.PropertiesFileInitialContextFactory&java.naming.provider.url=repository/conf/jndi.properties"/>
</endpoint>
</target>
<description/>
</proxy>
also I figure out that if you have define default JMS configuration part in axis2.xml for transportReceiver it is enough to put name of Queue
so this is also working
<?xml version="1.0" encoding="UTF-8"?>
<proxy xmlns="http://ws.apache.org/ns/synapse"
name="SendMessagetoJMSProxy2"
startOnLoad="true"
statistics="disable"
trace="disable"
transports="http,https">
<target>
<inSequence>
<log level="custom">
<property name="STATE" value="message is sent to GST_TMS_ASSOCIATE_LEASE Queue"/>
</log>
<property name="OUT_ONLY" value="true"/>
<property name="FORCE_SC_ACCEPTED" scope="axis2" value="true"/>
</inSequence>
<outSequence/>
<endpoint>
<address uri="jms:/myQueue"/>
</endpoint>
</target>
<description/>
</proxy>
and now I can publish a message to JMS queue with proxy ...
Im little confused (still) where all this log in System logs coming from and why ?!?]1
I am trying to send an email from the WSO2 ESB and configured as per one wos2 blog. I am getting error " MailTransportListener Checking mail for account : synapse.demo.1#gmail.com". I a not sure what is wrong in code and can I also send am email on my personal email id so that I can come to know that everything is working fine.
Synapse Code:
<proxy name="StockQuoteProxy" transports="mailto">
<parameter name="transport.mail.Address">synapse.demo.1#gmail.com</parameter>
<parameter name="transport.mail.Protocol">pop3</parameter>
<parameter name="transport.PollInterval">5</parameter>
<parameter name="mail.pop3.host">pop.gmail.com</parameter>
<parameter name="mail.pop3.port">995</parameter>
<parameter name="mail.pop3.user">synapse.demo.1</parameter>
<parameter name="mail.pop3.password">mailpassword</parameter>
<parameter name="mail.pop3.socketFactory.class">javax.net.ssl.SSLSocketFactory</parameter>
<parameter name="mail.pop3.socketFactory.fallback">false</parameter>
<parameter name="mail.pop3.socketFactory.port">995</parameter>
<parameter name="transport.mail.ContentType">application/xml</parameter>
<target>
<inSequence>
<property name="senderAddress" expression="get-property('transport', 'From')"/>
<log level="full">
<property name="Sender Address" expression="get-property('senderAddress')"/>
</log>
<send>
<endpoint>
<address uri="http://localhost:9000/services/SimpleStockQuoteService"/>
</endpoint>
</send>
</inSequence>
<outSequence>
<property name="Subject" value="Custom Subject for Response" scope="transport"/>
<property name="messageType" value="text/plain" scope="axis2-client"/>
<script language="js"><![CDATA[
mc.setPayloadXML(<ns:text xmlns:ns="http://ws.apache.org/commons/ns/payload">Plain text received!</ns:text>);
]]></script>
<header name="To" expression="fn:concat('mailto:', get-property('senderAddress'))"/>
<log level="full">
<property name="message" value="Response message"/>
<property name="Sender Address" expression="get-property('senderAddress')"/>
</log>
<send/>
</outSequence>
</target>
<publishWSDL uri="file:repository/samples/resources/proxy/sample_proxy_1.wsdl"/>
Thanks for your response. All I want is to send an email once I hit this service. my new code is :
<proxy name="SendEmailService" transports="http" startOnLoad="true" statistics="enable" trace="disable">
<target inSequence="SendEmailService_IN" />
<publishWSDL key="SendEmailService_wsdl"/>
</proxy>
<localEntry key="SendEmailService_wsdl" src="file:repository/conf/employee/OverseaseEmployee.wsdl"/>
<sequence name="SendEmailService_IN">
<property name="Subject" value="Custom Subject for Response" scope="transport"/>
<property name="ContentType" value="text/plain" scope="axis2"/>
<property name="OUT_ONLY" value="true" scope="default" type="STRING"/>
<send>
<endpoint>
<address uri="06.shrikant#gmail.com"/>
</endpoint>
</send>
<parameter name="mail.smtp.user">shrikant</parameter>
<parameter name="transport.mail.Protocol">smtp</parameter>
<parameter name="transport.mail.Address">06.shrikant#gmail.com</parameter>
<parameter name="mail.smtp.port">587</parameter>
<parameter name="mail.smtp.password">pass</parameter>
<parameter name="transport.mail.ContentType">text/plain</parameter>
<parameter name="mail.smtp.starttls.enable">true</parameter>
<parameter name="mail.smtp.auth">true</parameter>
<parameter name="mail.smtp.from">06.shrikant#gmail.com</parameter>
<parameter name="mail.smtp.host">smtp.gmail.com</parameter>
<send/>
</sequence>
Here is a working proxy to call a service and send the response to an email address. Here, transports="http,https" should be changed depending on how you want to call the proxy service.
<?xml version="1.0" encoding="UTF-8"?>
<proxy xmlns="http://ws.apache.org/ns/synapse"
name="MyPxy"
transports="http,https"
statistics="disable"
trace="disable"
startOnLoad="true">
<target>
<inSequence>
<send>
<endpoint>
<address uri="http://www.mocky.io/v2/57cd173e1200008620bb7826"/>
</endpoint>
</send>
</inSequence>
<outSequence>
<property name="Subject"
value="Custom Subject for Response"
scope="transport"/>
<property name="ContentType" value="text/plain" scope="axis2"/>
<property name="OUT_ONLY" value="true" scope="default" type="STRING"/>
<send>
<endpoint>
<address uri="mailto:toemailuser#gmail.com"/>
</endpoint>
</send>
<respond/>
</outSequence>
</target>
<parameter name="mail.smtp.user">fromemailuser</parameter>
<parameter name="transport.mail.Protocol">smtp</parameter>
<parameter name="transport.mail.Address">fromemailuser#gmail.com</parameter>
<parameter name="mail.smtp.port">587</parameter>
<parameter name="mail.smtp.password">pass</parameter>
<parameter name="transport.mail.ContentType">text/plain</parameter>
<parameter name="mail.smtp.starttls.enable">true</parameter>
<parameter name="mail.smtp.auth">true</parameter>
<parameter name="mail.smtp.from">fromemailuser#gmail.com</parameter>
<parameter name="mail.smtp.host">smtp.gmail.com</parameter>
<description/>
</proxy>
You can refer this blog for sending email with wso2 esb http://elilsivanesan.blogspot.com/2016/06/mail-transport-with-wso2-esb.html
I have created a simple vfs proxy which consumes a file and places it on the JMS queue. I want to be able to pick up one file at a time. I have my pollinterval set for every 10 minutes.
Are there any properties or settings I am missing to control this functionality?
Sample Proxy Below
<proxy xmlns="http://ws.apache.org/ns/synapse" name="VFSImportProxy" transports="https,http,vfs" statistics="disable" trace="disable" startOnLoad="true">
<target>
<inSequence>
<log separator="," />
<sequence key="smooks_sequence" />
<property name="OUT_ONLY" value="true" scope="default" type="STRING" />
<send>
<endpoint key="MessageStore_EP" />
</send>
</inSequence>
<outSequence />
<faultSequence />
</target>
<parameter name="transport.PollInterval">600000</parameter>
<parameter name="transport.vfs.ActionAfterProcess">MOVE</parameter>
<parameter name="transport.vfs.FileURI">vfs:sftp://locationpickup/local2</parameter>
<parameter name="transport.vfs.MoveAfterProcess">smb://location/archive</parameter>
<parameter name="transport.vfs.MoveAfterFailure">smb://location/failed</parameter>
<parameter name="transport.vfs.FileNamePattern">.*.txt</parameter>
<parameter name="transport.vfs.ContentType">text/plain</parameter>
<parameter name="transport.vfs.ActionAfterFailure">MOVE</parameter>
<enableSec />
</proxy>
Yes, the parameter name is transport.vfs.FileProcessCount and it's available in version 4.8.0 and up.
https://docs.wso2.com/display/ESB480/VFS+Transport