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

Inconsistent consumer/producer interface for different messagebus backends #75

Open
viktormelker opened this issue Dec 10, 2021 · 0 comments

Comments

@viktormelker
Copy link
Contributor

The backends KafkaAvroBackend and MockBackend are inconsistent in how they are set up.

In KafkaAvroBackend:

  • self.producer is an instance of AvroProducer
  • self.consumer is a partial that can instantiate an AvroConsumer
    In MockBackend:
  • self.producer is an instance of a (Mock) Producer
  • self.consumer is an instance of a (Mock) Consumer

It would be good to keep consistency by:

  • Making sure that self.consumer is the same "type" for both backends
  • Making sure that self.consumer and self.producer are both instances or functions. This is not necessary but I think it makes sense and makes it easier for developers since you don't have to keep track of which was implemented in which way.

I suggest that we change self.consumer to always be an instance

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant