# Logstash vs building a custom data stream

**URL:** https://discuss.elastic.co/t/logstash-vs-building-a-custom-data-stream/85674
**Category:** Elasticsearch
**Created:** [May 14, 2017, 9:00am UTC](https://discuss.elastic.co/t/logstash-vs-building-a-custom-data-stream/85674 "2017-05-14T09:00:07Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![Julian\_3](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/julian_3/32/103539_2.png) [@Julian\_3](https://discuss.elastic.co/u/Julian_3)
#### Post date: [May 14, 2017, 9:00am UTC](https://discuss.elastic.co/t/logstash-vs-building-a-custom-data-stream/85674/1 "2017-05-14T09:00:07Z")

</div>

Thought i would propose a question to the "guru's" and see what the general thought would be......

I have a stream of data coming from some proprietary software of "transactions" which i want to put into ES. now this stream is through a java plugin which i write and control. In theory i can do almost anything with it. The two possible options i have come up with

# 1 take the data and use log4J and write to a log file. then from there i use logstash with FileBeat (filters etc) to get that data loaded into transactions

Pros: if logstash stops/ starts i dont lose any logs as it starts from where it last processed  
Cons: extra puzzle pieces to break and have to get working.  
more disk IO and resources being used to write/ read the log file

#2 in my plugin i use the elasticsearch rest api and or bulk api to push straight into ES  
Pros : less to break and easier on resources (i think)  
Cons: if ES goes down i will lose data in the stream but thats not "critical" to me as data is being used for a monitoring perspective so i don't need 100% of the data. Loss is acceptable.

On the volume side of things its quite low for ES at around 1 million records a day......  
Interested to see what anyone thinks of my little problem 🙂

-Julian

---

<div class="post-metadata">

### Author: ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)
#### Post date: [May 14, 2017, 9:06am UTC](https://discuss.elastic.co/t/logstash-vs-building-a-custom-data-stream/85674/2 "2017-05-14T09:06:10Z")

</div>

I'd go with #1. It means that you can also change where you send things in future with no changes to the java app.

---

<div class="post-metadata">

### Author: ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)
#### Post date: [June 11, 2017, 9:08am UTC](https://discuss.elastic.co/t/logstash-vs-building-a-custom-data-stream/85674/3 "2017-06-11T09:08:27Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
