Forum Discussion
6 Replies
- cstewartFormer Employee
Yes, what events are you looking to listen for?
SnapLogic has built-in HTTP/S listener for incoming events, as well as being able to listen for events with things such as the Salesforce Publisher/Subscriber, JMS Producer/Consumer, Kafka Consumer/Producer, file poller and others.- muniyappanmaniNew Contributor
Found the solution sctewart . Thanks for the help
- prashantkNew Contributor
Hey Stewart, Can you point me to the snap that has the HTTP listener (is it the HTTP router)?
Also, If one wants to build a custom integration (listener), how does one go about doing that? I could not find any documentation on this. Thanks!- cstewartFormer Employee
If you create a Triggered Task from a pipeline, it is inherently uses the HTTP listener capability in the SnapLogic platform, available on Groundplex as well as a Cloud-trigger. (and Ultra tasks for real-time tasks)
If you actually want to build a Snap which connects persistently to an endpoint, like a messaging provider or similar, then you can look at the documentation for Snap development at developer.snaplogic.com and take a look in the section here in the community to learn more.- prashantkNew Contributor
Hey Stewart, Thank you for the suggested approach. The Triggered Task definitely worked for me.
However for the custom snap that I am working on, its not working as expected. I tried the following:
I created/implemented a snap that outputs a binary where in the execute method I created a HttpServer with appropriate context & handler. The idea being - when this snap is used in a pipeline, it will stay alive as long as the the listener is required (similar to what the SAP IDoc Listener does - https://docs-snaplogic.atlassian.net/wiki/spaces/SD/pages/1438551/SAP+IDoc+Listener)
The issue is that the snap finishes execution within few seconds.
Any Idea how can I keep it alive? (until someone stops/suspends the pipeline)
Thanks!