Skip to content
This repository has been archived by the owner on Apr 11, 2024. It is now read-only.

[kafka] Match messages received on Produce requests with the described messages in the AsyncAPI doc #10

Closed
smoya opened this issue Jun 28, 2021 · 3 comments · Fixed by #21
Labels
enhancement New feature or request good first issue Good for newcomers

Comments

@smoya
Copy link
Collaborator

smoya commented Jun 28, 2021

From Kafka documentation, this is all the info the Produce Request (Took version 8 as example):

Produce Request (Version: 8) => transactional_id acks timeout_ms [topic_data] 
  transactional_id => NULLABLE_STRING
  acks => INT16
  timeout_ms => INT32
  topic_data => name [partition_data] 
    name => STRING
    partition_data => index records 
      index => INT32
      records => RECORDS

The app also knows the broker address the request was made to, It also has the mappings between Brokers and local ports.

At a glance, I see the app could find the channel by checking the topic name on the Produce Request, match it with channels within the AsyncAPI doc with an Operation type of subscribe.

However, this solution won't scale that much since we are assuming operations and messages are a 1:1 relationship, but this is subject to change in version 3 of the spec.
Would it make sense to introduce some identifier in the message so we can validate directly looking by that identifier?

@smoya smoya added enhancement New feature or request good first issue Good for newcomers labels Jun 28, 2021
@github-actions
Copy link

Welcome to AsyncAPI. Thanks a lot for reporting your first issue. Please check out our contributors guide and the instructions about a basic recommended setup useful for opening a pull request.

Keep in mind there are also other channels you can use to interact with AsyncAPI community. For more details check out this issue.

@magicmatatjahu
Copy link
Collaborator

I think that this issue is related asyncapi/spec#458 and messageId will be very handy in this case.

@smoya
Copy link
Collaborator Author

smoya commented Jul 23, 2021

Yup, it is. Once messageId becomes a thing, it will be more easy to identify instead of guessing

@smoya smoya closed this as completed in #21 Jul 26, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request good first issue Good for newcomers
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants