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

Zilla unable to produce to Kafka when removing the north/south cache blocks #1353

Open
suman-gh-user opened this issue Dec 18, 2024 · 1 comment
Labels
bug Something isn't working

Comments

@suman-gh-user
Copy link

suman-gh-user commented Dec 18, 2024

Hi Team,

As zilla uses cache layer to cache all the messages from Kafka in order to be available to consume from Zilla. We are using the REST Proxy use case and we just only want to produce to Kafka using Zilla REST proxy but don't want consume through Zilla so we don't want to cache those messages in the Zilla container. But, removing the cache blocks from zilla.yaml config is not working it's failing to produce to kafka.

Steps to reproduce the behaviour:

  1. Remove the north & south cache block from zilla.yaml
  2. Deploy zilla and try to produce.

Zilla.yaml

name: Zilla-CC

bindings:
  north_tcp_server:
    type: tcp
    kind: server
    options:
      host: 0.0.0.0
      port:
        - 7114
    routes:
      - when:
          - port: 7114
        exit: north_http_server
  north_http_server:
    type: http
    kind: server
    routes:
      - when:
          - headers:
              :scheme: http
              :authority: localhost:7114
        exit: north_http_kafka_mapping
  north_http_kafka_mapping:
    type: http-kafka
    kind: proxy
    routes:
      - when:
          - method: POST
            path: /items
        exit: north_kafka_cache_client        
        with:
          capability: produce
          topic: item-snapshots
          key: ${idempotencyKey}
  north_kafka_cache_client:
    type: kafka
    kind: cache_client
    exit: south_kafka_cache_server
  south_kafka_cache_server:
    type: kafka
    kind: cache_server
    options:
      bootstrap:
        - item-snapshots
    exit: south_kafka_client
  south_kafka_client:
    type: kafka
    kind: client
    options:
      servers:
        - ${{env.KAFKA_BOOTSTRAP_SERVER}}
      sasl:
        mechanism: plain
        username: ${{env.SASL_USERNAME}}
        password: ${{env.SASL_PASSWORD}}
    exit: south_tls_client
  south_tls_client:
    type: tls
    kind: client 
    exit: south_tcp_client 
  south_tcp_client:
    type: tcp
    kind: client
telemetry:
  exporters:
    stdout_logs_exporter:
      type: stdout

Zilla Logs:

[client] item-snapshots META
[client] item-snapshots DESCRIBE
[client] item-snapshots[2] PRODUCE aborted (58 bytes)
[client] item-snapshots[5] PRODUCE aborted (58 bytes)
[client] item-snapshots[0] PRODUCE aborted (58 bytes)
[client] item-snapshots DESCRIBE
[client] item-snapshots META
@suman-gh-user suman-gh-user added the bug Something isn't working label Dec 18, 2024
@ankitk-me
Copy link
Contributor

ankitk-me commented Dec 20, 2024

As per design for http-kafka binding, cache layer is required to support headers, validation, conversions, fan-in and few more features that might not be feasible to support without cache layer. Redesigning this flow is not a practical option.

We suggest including kafka cache server and client but remove bootstrap topic from kafka_cache_server options. This will enable zilla to support only produce capability without fetching events to populate cache.

Example:

kafka_cache_server:
    type: kafka
    kind: cache_server
    options:
      bootstrap:
        - items-snapshots
    exit: kafka_client

update above mentioned binding to:

kafka_cache_server:
    type: kafka
    kind: cache_server
    exit: kafka_client

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants