Skip to content
New issue

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

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

Already on GitHub? # to your account

JetStream EventBus with retention: 2 (WorkQueue): Sensor fails to subscribe #3377

Open
mweibel opened this issue Nov 28, 2024 · 0 comments
Open
Labels
bug Something isn't working

Comments

@mweibel
Copy link
Contributor

mweibel commented Nov 28, 2024

Describe the bug

apiVersion: argoproj.io/v1alpha1
kind: EventBus
metadata:
  name: eventbus
spec:
  jetstream:
    replicas: 1
    version: 2.10.10
    persistence:
      storageClassName: standard
      volumeSize: 1Gi
    streamConfig: |
      replicas: 1
      retetention: 2

Creating this EventBus in argo-events 1.9.3 results in an error when the sensor tries to start the consumer:

{"level":"error","ts":1732789254.9938796,"logger":"argo-events.sensor","caller":"sensors/listener.go:307",
"msg":"failed to subscribe to eventbus","sensorName":"my-sensor",
"triggerName":"my-service-trigger","connection":"JetstreamTriggerConn{Sensor:my-sensor,Trigger:my-service-trigger}",
"error":"Failed to subscribe to subject default.my-event-source.mwf using group group-428796809: 
nats: consumer must be deliver all on workqueue stream",
"stacktrace":"github.com/argoproj/argo-events/pkg/sensors.(*SensorContext).listenEvents.func2.6.1\n\t/home/runner/work/argo-events/argo-events/pkg/sensors/listener.go:307"}

To Reproduce
Steps to reproduce the behavior:

  1. Create that event bus and appropriate EventSource/Sensors
  2. Check logs of sensor

Expected behavior
Sensor is able to connect and subscribe.

Environment (please complete the following information):

  • Kubernetes: v1.26.6 (local kind cluster)
  • Argo Events: v1.9.3

Additional context
v1.9.2 works, possibly the merge of #3151 caused that issue. Seems like the following code would need to change based on the retention policy:

subscriptions[subscriptionIndex], err = conn.JSContext.PullSubscribe(subject, durableName, nats.AckExplicit(), nats.DeliverNew())

But I haven't investigated if we do have access to this or we'd need a new setting on the sensor instead.


Message from the maintainers:

If you wish to see this enhancement implemented please add a 👍 reaction to this issue! We often sort issues this way to know what to prioritize.

@mweibel mweibel added the bug Something isn't working label Nov 28, 2024
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant