Skip to content

pika does not support connection recovery #84

@n0str

Description

@n0str

Provide smth like this
pika/pika#858

while True:
    connection = pika.BlockingConnection(parameters)

    channel = connection.channel()
    channel.basic_consume(on_message, 'queue')

    try:
        channel.start_consuming()
    except pika.exceptions.ConnectionClosed:
        LOGGER.info('Connection closed. Recovering')
        continue
    except KeyboardInterrupt:
        channel.stop_consuming()

    connection.close()
    break```

Append this code and create issue for SDK

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions