Appearance
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
Namein its flow; an emptyNamefails 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 (
MaxItemsInQueuereached): a warning is written, the record is dropped andOutputis not called. - Duplicate (the queue's
FilterPropertyvalue is still remembered): the record is not queued, the queue component'sAlready existspin is called with it, and thenOutputis called as well. - Otherwise the record is queued (Priority queue: with the priority read from the queue's
PriorityProperty) andOutputis called synchronously. Warm-up calls go straight toOutput.
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 ofOutput, the consumer may already be processing it. - A persistable queue writes the record to disk before the writer continues, so
Outputmeans "safely queued".
Example
json
{ "Name": "orders" }Http listener → Queue writer (orders) → Http response ; elsewhere in the flow: Reqular queue (orders) → Database writer