Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to read a workqueue stream using the latest nats cli #920

Open
vamshiaruru opened this issue Nov 9, 2023 · 0 comments
Open

Unable to read a workqueue stream using the latest nats cli #920

vamshiaruru opened this issue Nov 9, 2023 · 0 comments
Labels
defect Suspected defect such as a bug or regression

Comments

@vamshiaruru
Copy link

Observed behavior

When trying to read a workqueue stream, I get the following error:

nats: error: multiple non-filtered consumers not allowed on workqueue stream (10099)

The command I used:

nats stream view EVENTS # events is the name of the queue

Reference discussion: nats-io/nats-server#4778

Expected behavior

Expected to read the messages in the stream

Server and client version

CLI client version: v0.1.1
NATS server version nats-server: v2.10.4

Host environment

Mac OS 14.1.1

Steps to reproduce

Create a stream with the following config

	cfg := jetstream.StreamConfig{
		Name:        "EVENTS",
		Subjects:    []string{"events.>"},
		Storage:     jetstream.FileStorage,
		Retention:   jetstream.WorkQueuePolicy,
		AllowDirect: true,
	}

Create a consumer using the following config

	cons1, err := stream.CreateOrUpdateConsumer(ctx, jetstream.ConsumerConfig{
		Name:          "durable-1",
		Durable:       "durable-1",
		AckPolicy:     jetstream.AckExplicitPolicy,
		DeliverPolicy: jetstream.DeliverAllPolicy,
		FilterSubject: "events.>",
	})

Now try to read the messages using the cli.

@vamshiaruru vamshiaruru added the defect Suspected defect such as a bug or regression label Nov 9, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
defect Suspected defect such as a bug or regression
Projects
None yet
Development

No branches or pull requests

1 participant