haubur opened a new issue, #4155:
URL: https://github.com/apache/iggy/issues/4155

   ### Bug description
   
   `IggyConsumerConfig` allows to set both `stream_name`, `topic_name` AND 
`stream_id`, `topic_id`. 
   
   The 'id's are of type `Identifier` and usually derived/ generated from the 
`name` strings.
   So they have a one to one mapping. Internally, streams and topics are 
identified via `id`s.
   
   If a `IggyConsumerConfig` sets both individually (not matching) calling 
`build` calls
   
https://github.com/apache/iggy/blob/2019e145d66620e1f364e4966b8ac237f981b2a5/core/sdk/src/stream_builder/build/build_stream_topic.rs#L42
   potentially adding a new stream/ topic from the id, while the consumer's 
`init()` call binds the consumer derives the topic/stream_id to connect to from 
the `stream_name`, `topic_name`. Potentially, binding to another stream/topic 
compared to the one previously configured on the server.
   
   **Proposed fix (breaking API change):** Remove `id`s from public API surface.
   
   ---
   
   One nit, that I would like to subsume here:
   `IggyStreamConfig` holds both `IggyConsumerConfig` and `IggyProducerConfig` 
but methods such as `stream_name` etc. always return the names from the 
producer config, even though consumer and producer configs can point to 
different stream/ topics.
   
   **Proposed fix:** Remove methods from IggyStreamConfig, they are callable 
from IggyConsumerConfig and IggyProducerConfig already.
   
   ### Affected area / component
   
   _No response_
   
   ### Deployment
   
   None
   
   ### Versions
   
   _No response_
   
   ### Hardware / environment
   
   _No response_
   
   ### Sample code
   
   _No response_
   
   ### Logs
   
   _No response_
   
   ### Iggy server config
   
   _No response_
   
   ### Reproduction
   
   _No response_
   
   ### Contribution
   
   - [x] I'm willing to submit a pull request to fix this bug
   
   ### Good first issue
   
   - [ ] I think this could be a good first issue for a new contributor


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to