Question

I'm working on a project where one of the requirements is to connect to a server using ssl/tls and subscribe to messages. I have setup a tls outbound-endpoint and can connect to the server. I have a spring bean that performs custom handshaking and part of that is subscribing to content from the server. Once subscribed I should receive messages asynchronously without having to poll for them. Is there a way to do this in Mule 3.3? Thanks for the help.

Was it helpful?

Solution 2

I used a quartz inbound endpoint and setup an endpoint polling job and polled my endpoint. See the config below:

<flow name="QuartzPollingFlow">
    <quartz:inbound-endpoint repeatCount="-1" repeatInterval="1000" jobName="myPoller">
        <quartz:endpoint-polling-job>
            <quartz:job-endpoint timeout="300" ref="SecureTcpEndpoint"/>
        </quartz:endpoint-polling-job>
        </quartz:inbound-endpoint>
    <flow-ref name="ProcessingFlow"/>
</flow>

OTHER TIPS

It seems you have a specific use case in which you can't use HTTPS. Mule does provide support for TCP connection, but I couldn't find the option to make the the secure TCP connection (which I beleive will be over SSL).

You can always write your custom endpoint connector code in a java component and call that java component using Quartz (for polling)

<flow name="polling-flow" doc:name="polling-flow">
    <quartz:inbound-endpoint jobName="polling"
        repeatInterval="5000" responseTimeout="10000" doc:name="Quartz">
        <quartz:event-generator-job>
            <quartz:payload>call-custom-component-to-poll-secure-tcp</quartz:payload>
        </quartz:event-generator-job>
    </quartz:inbound-endpoint>
    <component doc:name="Java" class="com.company.CustomSecureTCPCode"></component>
    <!-- do whatever you want to with the payload received from calling the endpoint -->                
</flow>
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top