conduitio-labs / conduit-connector-nats-jetstream

Conduit connector for NATS JetStream

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Bug: Source connector stop working after NATS reconnection

nassor opened this issue · comments

Bug description

After the NATS system recreates a connection, the connector ceases to function. This issue has been observed consistently following each instance of NATS connection recreation. Consequently, data transmission and communication processes stop working, leading to major operational setbacks.

Steps to reproduce

  1. Start the connector and NATS server.
  2. Create a pipeline file with NATS Jetstream as the source and log as the destination.
  3. Use NATS benchmark to create some load: nats bench test --js --pub 1 --size 16 --msgs 10
  4. Run conduit and observe logs of messages received working.
  5. Stop NATS server
  6. Stop NATS benchmark
  7. Start NATS server
  8. Start NATS benchmark
  9. Observe logs of messages received NOT working.

Version

0.3.1

Pipeline that I have been using for testing:

pipelines/test.yaml

version: 1.0
pipelines:
  nats-to-log:
    status: running
    description: >
      nats to log
    connectors:
      nats-source:
        type: source
        plugin: standalone:nats@latest
        settings:
          subject: test
          urls: nats://127.0.0.1:4222
      log-dest:
        type: destination
        plugin: builtin:log
        settings:

Problem fixed: https://github.com/nassor/conduit-connector-nats-jetstream/tree/fix/jetstream-reconnection in this fork+branch

I still need to fix the tests to create a PR.