diff --git a/src/ingestion/topics.ts b/src/ingestion/topics.ts index 05c6de36..a76767cb 100644 --- a/src/ingestion/topics.ts +++ b/src/ingestion/topics.ts @@ -3,4 +3,4 @@ export const KAFKA_PERSON = 'clickhouse_person' export const KAFKA_PERSON_UNIQUE_ID = 'clickhouse_person_unique_id' export const KAFKA_SESSION_RECORDING_EVENTS = 'clickhouse_session_recording_events' export const KAFKA_EVENTS_WAL = 'events_write_ahead_log' -export const KAFKA_EVENTS_INGESTION_HANDOFF = 'events_ingestion_handoff' +export const KAFKA_EVENTS_PLUGIN_INGESTION = 'events_plugin_ingestion' diff --git a/src/server.ts b/src/server.ts index 9442ce31..b05bec21 100644 --- a/src/server.ts +++ b/src/server.ts @@ -20,7 +20,7 @@ import { startSchedule } from './services/schedule' import { ConnectionOptions } from 'tls' import { DB } from './db' import { DateTime } from 'luxon' -import { KAFKA_EVENTS_INGESTION_HANDOFF, KAFKA_EVENTS_WAL } from './ingestion/topics' +import { KAFKA_EVENTS_PLUGIN_INGESTION, KAFKA_EVENTS_WAL } from './ingestion/topics' export async function createServer( config: Partial = {}, @@ -86,7 +86,7 @@ export async function createServer( if (!serverConfig.KAFKA_CONSUMPTION_TOPIC) { // When ingesting events, listen to the "INGESTION_HANDOFF" topic, otherwise listen to the "WAL" and discard serverConfig.KAFKA_CONSUMPTION_TOPIC = serverConfig.PLUGIN_SERVER_INGESTION - ? KAFKA_EVENTS_INGESTION_HANDOFF + ? KAFKA_EVENTS_PLUGIN_INGESTION : KAFKA_EVENTS_WAL } diff --git a/tests/clickhouse/e2e.test.ts b/tests/clickhouse/e2e.test.ts index 51ac85f2..78996480 100644 --- a/tests/clickhouse/e2e.test.ts +++ b/tests/clickhouse/e2e.test.ts @@ -9,7 +9,7 @@ import { delay, UUIDT } from '../../src/utils' import { resetTestDatabaseClickhouse } from '../helpers/clickhouse' import { resetKafka } from '../helpers/kafka' import { delayUntilEventIngested } from '../shared/process-event' -import { KAFKA_EVENTS_INGESTION_HANDOFF } from '../../src/ingestion/topics' +import { KAFKA_EVENTS_PLUGIN_INGESTION } from '../../src/ingestion/topics' jest.setTimeout(60000) // 60 sec timeout @@ -18,7 +18,7 @@ const extraServerConfig: Partial = { KAFKA_HOSTS: process.env.KAFKA_HOSTS || 'kafka:9092', WORKER_CONCURRENCY: 2, PLUGIN_SERVER_INGESTION: true, - KAFKA_CONSUMPTION_TOPIC: KAFKA_EVENTS_INGESTION_HANDOFF, + KAFKA_CONSUMPTION_TOPIC: KAFKA_EVENTS_PLUGIN_INGESTION, LOG_LEVEL: LogLevel.Log, } diff --git a/tests/clickhouse/process-event.test.ts b/tests/clickhouse/process-event.test.ts index 41167ddf..a6a9b6a6 100644 --- a/tests/clickhouse/process-event.test.ts +++ b/tests/clickhouse/process-event.test.ts @@ -2,7 +2,7 @@ import { PluginsServerConfig, Event } from '../../src/types' import { resetTestDatabaseClickhouse } from '../helpers/clickhouse' import { resetKafka } from '../helpers/kafka' import { createProcessEventTests } from '../shared/process-event' -import { KAFKA_EVENTS_INGESTION_HANDOFF } from '../../src/ingestion/topics' +import { KAFKA_EVENTS_PLUGIN_INGESTION } from '../../src/ingestion/topics' jest.setTimeout(180_000) // 3 minute timeout @@ -10,7 +10,7 @@ const extraServerConfig: Partial = { KAFKA_ENABLED: true, KAFKA_HOSTS: process.env.KAFKA_HOSTS || 'kafka:9092', PLUGIN_SERVER_INGESTION: true, - KAFKA_CONSUMPTION_TOPIC: KAFKA_EVENTS_INGESTION_HANDOFF, + KAFKA_CONSUMPTION_TOPIC: KAFKA_EVENTS_PLUGIN_INGESTION, } describe('process event (clickhouse)', () => { diff --git a/tests/helpers/kafka.ts b/tests/helpers/kafka.ts index 6c4ca51b..031ffae8 100644 --- a/tests/helpers/kafka.ts +++ b/tests/helpers/kafka.ts @@ -4,7 +4,7 @@ import { delay, UUIDT } from '../../src/utils' import { defaultConfig, overrideWithEnv } from '../../src/config' import { KAFKA_EVENTS, - KAFKA_EVENTS_INGESTION_HANDOFF, + KAFKA_EVENTS_PLUGIN_INGESTION, KAFKA_EVENTS_WAL, KAFKA_PERSON, KAFKA_PERSON_UNIQUE_ID, @@ -28,7 +28,7 @@ export async function resetKafka(extraServerConfig: Partial await createTopics(kafka, [ KAFKA_EVENTS, - KAFKA_EVENTS_INGESTION_HANDOFF, + KAFKA_EVENTS_PLUGIN_INGESTION, KAFKA_EVENTS_WAL, KAFKA_SESSION_RECORDING_EVENTS, KAFKA_PERSON, @@ -50,7 +50,7 @@ export async function resetKafka(extraServerConfig: Partial await producer.connect() console.info('subscribing consumer') - await consumer.subscribe({ topic: KAFKA_EVENTS_INGESTION_HANDOFF }) + await consumer.subscribe({ topic: KAFKA_EVENTS_PLUGIN_INGESTION }) console.info('running consumer') await consumer.run({ eachMessage: async (payload) => {