Uploaded image for project: 'Debezium'
  1. Debezium
  2. DBZ-9368

Fix Debezium Server NATS Jetstream Documentation to prevent/avoid common 503 error

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Done
    • Icon: Minor Minor
    • None
    • None
    • None
    • None

      Feature request or enhancement

      For feature requests or enhancements, provide this information, please:

      Which use case/requirement will be addressed by the proposed feature?

      MANY people have gotten completely stuck with a mystery 503 with using NATS Jetstream with Debezium Server, because the docs are not at all clear/complete/accurate on how to configure it. 

      For debezium.sink.nats-jetstream.subjects, it says the default is ..*

      First, it doesnt give any information about why that is the default. In fact, it is because it has the format of prefix.db.table

      Second, that simply won't work - NATS gives an error if you try to use that (nats: error: could not create Stream: subjects that overlap with jetstream api require no-ack to be true (10052))

      Third, it should provide some info that it needs to align with the 
      debezium.source.topic.prefix setting. If the prefix is test, then the nats-jetstream.subjects needs to be test..
       
      But that is not enough! It actually needs to be test,test.. or test,test.> because the first wildcard-less subject is used for DDL schema changes and the wildcards require there to be either 2 (test..) or 1+ (test.>) subtopics, so when dbz tries to publish to just test, it gets rejected.
       
      So, at the very least, the docs need to be improved. But, I also suggest looking into how to change things such that you only need to provide 1 subject - perhaps the topic.prefix can be automatically prepended to the subjects in the code here?
       
      Or, even, the topic.prefix.> could just be used by default?
       
      Something like that 

              Unassigned Unassigned
              nickchomey Nick Chomey
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Created:
                Updated:
                Resolved: