# Multiple response from UDF

**URL:** <https://community.influxdata.com/t/multiple-response-from-udf/2979>\
**Category:** Kapacitor\
**Tags:** kapacitor\
**Created:** [November 6, 2017, 10:01am UTC](https://community.influxdata.com/t/multiple-response-from-udf/2979 "2017-11-06T10:01:06Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![eeishaan](https://avatars.discourse-cdn.com/v4/letter/e/a87d85/32.png) [@eeishaan](https://community.influxdata.com/u/eeishaan)\
**Post date:** [November 6, 2017, 10:01am UTC](https://community.influxdata.com/t/multiple-response-from-udf/2979/1 "2017-11-06T10:01:06Z")

</div>

I have a process UDF that accepts `batch` input and provides a `stream` output.  
Is it possible to send multiple responses for the same input point?

i.e. can I call `Agent.write_response` function multiple times in the `end_batch` method?

My UDF makes a bunch of HTTP requests. I want to send the response of those requests to the InfluxDB (via InfluxDBOut Node) ASAP and don’t want to send the collated response.  
Thus providing `batch` output is out of the question.  
Currently, I am not able to see anything after the first point in my db.

---

<div class="post-metadata">

**Author:** ![croooow](https://sea1.discourse-cdn.com/flex023/user_avatar/community.influxdata.com/croooow/32/1313_2.png) [@croooow](https://community.influxdata.com/u/croooow)\
**Post date:** [December 28, 2017, 9:12pm UTC](https://community.influxdata.com/t/multiple-response-from-udf/2979/2 "2017-12-28T21:12:45Z")

</div>

Did you manage to make any progress on this issue? I seem to have run into a [similar problem](https://community.influxdata.com/t/influxdbout-only-writes-the-first-time-tickscript-runs/3331) with a batch to stream UDF and `InfluxDBOut()`.

I “solved” the problem by running an Influx client in my UDF. I write to influx by calling a function from my `Point()` function. I really hate that as a solution given that it should be trivial to have Kapacitor handle this directly. Unfortunately, documentation and examples are sorely lacking and community support here or on github just doesn’t close the gap. I’m happy to share code or notes on what we’ve learned.
