Skip to content

Support for additional queue arguments #64

@klokare

Description

@klokare

Is your feature request related to a problem? Please describe.

The Streams Documentation describes addtional queue arguments like

  • x-max-length-bytes
  • x-max-age
  • x-stream-max-segment-size-bytes
  • etc.

But the StreamQueueSpecification does not have these options.

type StreamQueueSpecification struct {
	Name               [string](https://pkg.go.dev/builtin#string)
	MaxLengthBytes     [int64](https://pkg.go.dev/builtin#int64)
	InitialClusterSize [int](https://pkg.go.dev/builtin#int)
}

Is there another way to set these options during/post Queue creation AmqpManagement.DeclareQueue? If not, may we add as a feature request?

Describe the solution you'd like

Perhaps composable QueueSpecifications that satisfy IQueueSpecification:

streamSpec := StreamQueueSpecification{Name: "mystream"}
advStreamSpec := AdvancedStreamQueueSpecification{MaxAge: 20}

queueSpec :=MakeQueueSpecification(streamSpec, advStreamSpec)

or a chained approach

streamSpec := StreamQueueSpecification{Name: "mystream"}
streamSpec = streamSpec.WithMaxAge(20) // Returns a StreamQueueSpecification with the x-max-age added to the buildArguments map.

Describe alternatives you've considered

I could use the older 0.9.1 or Streams clients to create the stream and then use this client to interact with it.

Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions