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

Support destroying existing consumers #190

Open
rnowling-memphis opened this issue Jul 28, 2023 · 0 comments
Open

Support destroying existing consumers #190

rnowling-memphis opened this issue Jul 28, 2023 · 0 comments
Assignees
Labels
Feature Request New feature or request

Comments

@rnowling-memphis
Copy link
Contributor

rnowling-memphis commented Jul 28, 2023

Currently, to destroy a consumer, you first have to create a consumer object.:

print("Create consumer")
consumer = await memphis.consumer(station_name=STATION,
                                  consumer_name="test-consumer-2",
                                  consumer_group="",
                                  start_consume_from_sequence=1)
await consumer.destroy()

This can be problematic if you don't have the original parameters. For example, if the start_consumer_from_sequence was 50, you'd get the following error:

memphis: consumer already exists with different uneditable configuration parameters (StartConsumeFromSequence/LastMessages)

It would useful to support deleting a consumer without having to first create it. Something like:

await memphis.destroy_consumer(station_name="station", consumer_name="consumer", consumer_group="group")

This would make it easier to support recovery and time travel (replaying messages) for streaming engines that expect to be able to own and set the starting sequence number.

@rnowling-memphis rnowling-memphis added the Feature Request New feature or request label Jul 28, 2023
@rnowling-memphis rnowling-memphis self-assigned this Jul 28, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature Request New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant