---
title: Elastic Agent to Logstash to Elasticsearch: Logstash Persistent Queue (PQ) for buffering
description: Info on configuring Elastic Agent: Fleet and Elastic Agent Guide, Configuring outputs for Elastic Agent. For info on Logstash plugins: Elastic Agent input,...
url: https://docs-v3-preview.elastic.dev/elastic/docs-content/pull/4236/manage-data/ingest/ingest-reference-architectures/lspq
products:
  - Elastic Agent
  - Logstash
---

# Elastic Agent to Logstash to Elasticsearch: Logstash Persistent Queue (PQ) for buffering
![Image showing Elastic Agent collecting data](https://docs-v3-preview.elastic.dev/elastic/docs-content/pull/4236/manage-data/images/ingest-ea-lspq-es.png)

<definitions>
  <definition term="Ingest model">
    Elastic Agent to Logstash persistent queue to Elasticsearch
  </definition>
  <definition term="Use when">
    Your data flow may encounter network issues, bursts of events, or downstream unavailability, and you need the ability to buffer the data before ingestion.
  </definition>
</definitions>


## Resources

Info on configuring Elastic Agent:
- [Fleet and Elastic Agent Guide](https://docs-v3-preview.elastic.dev/elastic/docs-content/pull/4236/reference/fleet)
- [Configuring outputs for Elastic Agent](https://docs-v3-preview.elastic.dev/elastic/docs-content/pull/4236/reference/fleet/elastic-agent-output-configuration)

For info on Logstash plugins:
- [Elastic Agent input](https://docs-v3-preview.elastic.dev/elastic/logstash-docs-md/tree/main/lsr/plugins-inputs-elastic_agent)
- [Elasticsearch output plugin](https://docs-v3-preview.elastic.dev/elastic/logstash-docs-md/tree/main/lsr/plugins-outputs-elasticsearch)

For info on using Logstash for buffering and data resiliency, check out this section in the [Logstash Reference](https://docs-v3-preview.elastic.dev/elastic/logstash/tree/main/reference):
- [Logstash Persistent Queues (PQ)](https://docs-v3-preview.elastic.dev/elastic/logstash/tree/main/reference/persistent-queues)

Info on Elasticsearch:
- [Elasticsearch Guide](https://docs-v3-preview.elastic.dev/elastic/elasticsearch/tree/main/reference)