use of org.eclipse.hono.client.kafka.producer.MessagingKafkaProducerConfigProperties in project hono by eclipse.
the class KafkaBasedTelemetrySenderTest method setUp.
/**
* Sets up the fixture.
*/
@BeforeEach
public void setUp() {
vertxMock = mock(Vertx.class);
when(vertxMock.eventBus()).thenReturn(mock(EventBus.class));
tenant = new TenantObject("the-tenant", true);
kafkaProducerConfig = new MessagingKafkaProducerConfigProperties();
kafkaProducerConfig.setProducerConfig(new HashMap<>());
}
use of org.eclipse.hono.client.kafka.producer.MessagingKafkaProducerConfigProperties in project hono by eclipse.
the class KafkaBasedCommandResponseSenderTest method setUp.
/**
* Sets up the fixture.
*/
@BeforeEach
public void setUp() {
kafkaProducerConfig = new MessagingKafkaProducerConfigProperties();
kafkaProducerConfig.setProducerConfig(new HashMap<>());
}
use of org.eclipse.hono.client.kafka.producer.MessagingKafkaProducerConfigProperties in project hono by eclipse.
the class KafkaBasedCommandSenderTest method setUp.
/**
* Sets up fixture.
*
* @param vertx The vert.x instance to use.
*/
@BeforeEach
void setUp(final Vertx vertx) {
this.vertx = vertx;
consumerConfig = new MessagingKafkaConsumerConfigProperties();
mockConsumer = new KafkaMockConsumer(OffsetResetStrategy.LATEST);
producerConfig = new MessagingKafkaProducerConfigProperties();
producerConfig.setProducerConfig(Map.of("client.id", "application-test-sender"));
span = TracingMockSupport.mockSpan();
tracer = TracingMockSupport.mockTracer(span);
mockProducer = KafkaClientUnitTestHelper.newMockProducer(true);
final var producerFactory = CachingKafkaProducerFactory.testFactory(vertx, (n, c) -> KafkaClientUnitTestHelper.newKafkaProducer(mockProducer));
commandSender = new KafkaBasedCommandSender(vertx, consumerConfig, producerFactory, producerConfig, tracer);
tenantId = UUID.randomUUID().toString();
deviceId = UUID.randomUUID().toString();
}
use of org.eclipse.hono.client.kafka.producer.MessagingKafkaProducerConfigProperties in project hono by eclipse.
the class KafkaBasedEventSenderTest method setUp.
/**
* Sets up the fixture.
*/
@BeforeEach
public void setUp() {
vertxMock = mock(Vertx.class);
when(vertxMock.eventBus()).thenReturn(mock(EventBus.class));
kafkaProducerConfig = new MessagingKafkaProducerConfigProperties();
kafkaProducerConfig.setProducerConfig(Map.of("hono.kafka.producerConfig.bootstrap.servers", "localhost:9092"));
}
use of org.eclipse.hono.client.kafka.producer.MessagingKafkaProducerConfigProperties in project hono by eclipse.
the class AbstractKafkaBasedDownstreamSenderTest method setUp.
/**
* Sets up the fixture.
*/
@BeforeEach
public void setUp() {
vertxMock = mock(Vertx.class);
when(vertxMock.eventBus()).thenReturn(mock(EventBus.class));
config = new MessagingKafkaProducerConfigProperties();
config.setProducerConfig(Map.of("hono.kafka.producerConfig.bootstrap.servers", "localhost:9092"));
tenant = new TenantObject(TENANT_ID, true);
final var mockProducer = KafkaClientUnitTestHelper.newMockProducer(true);
sender = newSender(mockProducer);
}
Aggregations