Skip to content

Commit

Permalink
Add extra description for queue arguments
Browse files Browse the repository at this point in the history
  • Loading branch information
calini committed Jan 27, 2025
1 parent b0f26da commit f6dae12
Showing 1 changed file with 21 additions and 2 deletions.
23 changes: 21 additions & 2 deletions internal/impl/amqp09/input.go
Original file line number Diff line number Diff line change
Expand Up @@ -82,11 +82,30 @@ You can access these metadata fields using xref:configuration:interpolation.adoc
Description("Whether the declared queue will auto-delete.").
Default(false),
service.NewStringMapField(queueDeclareArgumentsField).
Description("Optional arguments specific to the server's implementation of the queue that can be sent for queue types which require extra parameters.").
Description(`
Optional arguments specific to the server's implementation of the queue that can be sent for queue types which require extra parameters.
== Arguments
- "x-queue-type" - Is used to declare quorum and stream queues. Accepted values are: 'classic' (default), 'quorum', 'stream', 'drop-head', 'reject-publish' and 'reject-publish-dlx'.
- "x-max-length" - Maximum number of messages, is a non-negative integer value.
- "x-max-length-bytes" - Maximum number of messages, is a non-negative integer value.
- "x-overflow" - Sets overflow behaviour. Possible values are: 'drop-head' (default), 'reject-publish', 'reject-publish-dlx'.
- "x-message-ttl" - TTL period in milliseconds. Must be a string representation of the number.
- "x-expires" - Expiration policy, describes the expiration period in milliseconds. Must be a positive integer.
- "x-max-age" - Controls the retention of a stream. Must be a strin, valid units: (Y, M, D, h, m, s) e.g. '7D' for a week.
- "x-stream-max-segment-size-bytes" - Controls the size of the segment files on disk (default 500000000). Must be a positive integer.
- "x-queue-version" - declares the Classic Queue version to use. Expects an integer, either 1 or 2.
- "x-consumer-timeout" - Integer specified in milliseconds.
- "x-single-active-consumer" - Enables Single Active Consumer, Expects a Boolean.
See https://github.com/rabbitmq/amqp091-go/blob/b3d409fe92c34bea04d8123a136384c85e8dc431/types.go#L282-L362 for more information on available arguments.`).
Advanced().
Optional().
Example(map[string]any{
"x-queue-type": "quorum",
"x-queue-type": "quorum",
"x-max-length": 1000,
"x-max-length-bytes": 4096,
}),
).
Description(`Allows you to passively declare the target queue. If the queue already exists then the declaration passively verifies that they match the target fields.`).
Expand Down

0 comments on commit f6dae12

Please sign in to comment.