Skip to content

Support destroying existing consumers  #190

@rnowling-memphis

Description

@rnowling-memphis

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.

Metadata

Metadata

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions