---
id: queues--queue-writer
title: "Queue writer"
summary: "Producer for a queue of the same flow: adds each incoming record to a queue owned by a queue component (Reqular queue or Priority queue), then passes the record on. Use it to hand work from one part of a flow to the queue's consumer, or to feed one queue from several places."
audience: user
keywords: "input, output, name"
---
# Queue writer

Producer for a queue of the same flow: adds each incoming record to a queue owned by a queue component (Reqular queue or Priority queue), then passes the record on. Use it to hand work from one part of a flow to the queue's consumer, or to feed one queue from several places.

## Pins

| Pin | Kind | Types | Description |
|---|---|---|---|
| Input | input | any | Record to enqueue. |
| Output | output | same as input | The same record and metadata, called right after the record was handed to the queue. It is not called by the queue consumer. |

## Configuration

| Field | Type | Default | Description |
|---|---|---|---|
| `Name` | string (max 128) | `myqueue` | Required. Name of the target queue, exactly as configured on the queue component that owns it. |

## Behaviour

- At start the writer registers for `Name` in its flow; an empty `Name` fails the start. If the queue's item type and the writer's input type differ, the flow fails to start with a message naming both types.
- The queue is looked up on the first record; if no queue component with that name exists in the flow, the record fails with "The queue <Name> does not exist in the flow".
- Full queue (`MaxItemsInQueue` reached): a warning is written, the record is dropped and `Output` is **not** called.
- Duplicate (the queue's `FilterProperty` value is still remembered): the record is not queued, the queue component's `Already exists` pin is called with it, and then `Output` is called as well.
- Otherwise the record is queued (Priority queue: with the priority read from the queue's `PriorityProperty`) and `Output` is called synchronously. Warm-up calls go straight to `Output`.

## Notes

- Queues belong to their flow: a writer can only reach queues of the same flow. For flow-to-flow communication use Start flow or Port client / Port listener.
- The record is queued as the same instance that is passed to `Output`; don't change it downstream of `Output`, the consumer may already be processing it.
- A persistable queue writes the record to disk before the writer continues, so `Output` means "safely queued".

## Example

```json
{ "Name": "orders" }
```

Http listener → **Queue writer** (`orders`) → Http response ; elsewhere in the flow: Reqular queue (`orders`) → Database writer
