Skip to content

Conversation

@gpauloski
Copy link
Collaborator

Description

Simplify the Producer/Subscriber interfaces by removing the "closing a topic" logic, and make topic a required argument to methods.

Fixes N/A

Type of Change

  • Breaking Change (fix or enhancement which changes existing semantics of the public interface)
  • Enhancement (new features or improvements to existing functionality)
  • Bug (fixes for a bug or issue)
  • Internal (refactoring, style changes, testing, optimizations)
  • Documentation update (changes to documentation or examples)
  • Package (dependencies, versions, package metadata)
  • Development (CI workflows, pre-commit, linters, templates)
  • Security (security related changes)

Testing

N/A

Pull Request Checklist

Please confirm the PR meets the following requirements.

  • Tags added to PR (e.g., breaking, bug, enhancement, internal, documentation, package, development, security).
  • Code changes pass pre-commit (e.g., mypy, ruff, etc.).
  • Tests have been added to show the fix is effective or that the new feature works.
  • New and existing unit tests pass locally with the changes.
  • Docs have been updated and reviewed if relevant.

This is to prefer be explicit when sending objects to a stream and to
match the signatures of Redis publish() or Kafka-python send().
A publisher shim to a third-party message broker should not really
be responsible to closing subscribers to the third-party message broker.
This is because it's reasonable to expect the publisher and subscribers
may come and go over time. This previous implementation detail of the
Publisher/Subscriber protocol made specific instances unnecessarily
coupled to each other.

In the future, we may move this funtionality up to the higher level
StreamProducer/StreamConsumer interfaces rather than required it to be
implemented in every shim.
@gpauloski gpauloski added the enhancement New features or improvements to existing functionality label Jan 30, 2024
@gpauloski gpauloski merged commit 3101ef2 into main Jan 30, 2024
@gpauloski gpauloski deleted the streaming-refactor branch January 30, 2024 23:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New features or improvements to existing functionality

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants