lib/phobos/producer.rb in phobos-2.0.2 vs lib/phobos/producer.rb in phobos-2.1.0
- old
+ new
@@ -75,11 +75,11 @@
def kafka_client
producer_store[:kafka_client]
end
def create_sync_producer
- client = kafka_client || configure_kafka_client(Phobos.create_kafka_client)
+ client = kafka_client || configure_kafka_client(Phobos.create_kafka_client(:producer))
sync_producer = client.producer(**regular_configs)
if Phobos.config.producer_hash[:persistent_connections]
producer_store[:sync_producer] = sync_producer
end
sync_producer
@@ -106,10 +106,10 @@
ensure
producer&.shutdown unless Phobos.config.producer_hash[:persistent_connections]
end
def create_async_producer
- client = kafka_client || configure_kafka_client(Phobos.create_kafka_client)
+ client = kafka_client || configure_kafka_client(Phobos.create_kafka_client(:producer))
async_producer = client.async_producer(**async_configs)
producer_store[:async_producer] = async_producer
end
def async_producer