(pillow_id, couch_db, default_topic=None)
return ConstructedPillow(
        name=pillow_id,
        checkpoint=checkpoint,
        change_feed=change_feed,
        processor=processor,
        change_processed_event_handler=PillowCheckpointEventHandler(
            checkpoint=checkpoint, checkpoint_frequency=100,
        ),
    )
Generic pillow for inserting Couch documents into Kafka.

    Reads from:
      - CouchDB

    Writes to:
      - Kafka
Generic pillow for inserting Couch documents into Kafka.
Generic pillow for inserting Couch documents into Kafka .
def get_change_feed_pillow_for_db(pillow_id, couch_db, default_topic=None):
    """Generic pillow for inserting Couch documents into Kafka.

    Reads from:
      - CouchDB

    Writes to:
      - Kafka
    """
    processor = KafkaProcessor(
        data_source_type=data_sources.SOURCE_COUCH,
        data_source_name=couch_db.dbname,
        default_topic=default_topic,
    )
    change_feed = CouchChangeFeed(couch_db)
    checkpoint = PillowCheckpoint(pillow_id, change_feed.sequence_format)
    return ConstructedPillow(
        name=pillow_id,
        checkpoint=checkpoint,
        change_feed=change_feed,
        processor=processor,
        change_processed_event_handler=PillowCheckpointEventHandler(
            checkpoint=checkpoint, checkpoint_frequency=100,
        ),
    )
def get_change_feed_pillow_for_db ( pillow_id , couch_db , default_topic = None ) : processor = KafkaProcessor ( data_source_type = data_sources . SOURCE_COUCH , data_source_name = couch_db . dbname , default_topic = default_topic , ) change_feed = CouchChangeFeed ( couch_db ) checkpoint = PillowCheckpoint ( pillow_id , change_feed . sequence_format ) return ConstructedPillow ( name = pillow_id , checkpoint = checkpoint , change_feed = change_feed , processor = processor , change_processed_event_handler = PillowCheckpointEventHandler ( checkpoint = checkpoint , checkpoint_frequency = 100 , ) , )