def METHOD_NAME(settings):
    from sentry.ingest.consumer.factory import get_ingest_consumer
    from sentry.ingest.types import ConsumerType
    from sentry.utils.batching_kafka_consumer import create_topics
    # Relay is configured to use this topic for all ingest messages. See
    # `template/config.yml`.
    cluster_name = "default"
    topic_event_name = "ingest-events"
    if scope_consumers[topic_event_name] is not None:
        # reuse whatever was already created (will ignore the settings)
        return scope_consumers[topic_event_name]
    # first time the consumer is requested, create it using settings
    admin = kafka_admin(settings)
    admin.delete_topic(topic_event_name)
    create_topics(cluster_name, [topic_event_name])
    # simulate the event ingestion task
    group_id = "test-consumer"
    consumer = get_ingest_consumer(
        consumer_type=ConsumerType.Attachments,
        group_id=group_id,
        auto_offset_reset="earliest",
        strict_offset_reset=False,
        max_batch_size=1,
        max_batch_time=10,
        num_processes=1,
        input_block_size=1,
        output_block_size=1,
        force_topic=topic_event_name,
        force_cluster=cluster_name,
    )
    scope_consumers[topic_event_name] = consumer
    return consumer