Lagom Kafka Проблема интеграции клиентов

Я работаю над lagom и пытаюсь подключиться к теме, предоставленной службой Lagom в среде Java, отличной от Lagom.

Я подписался на тему, используя:

LagomClientFactory clientFactory = LagomClientFactory.create("legacy-system",LagomClientFactory.class.getClassLoader());

TicketingService ticketTingService = clientFactory.createClient(TicketingService.class,URI.create("http://localhost:11000"));

ticketTingService.ticketEvents().subscribe().atLeastOnce(Flow.<TicketEvent> create().mapAsync(1, e -> {
          return CompletableFuture.completedFuture(Done.getInstance());
 }));

Я скопировал конфигурацию клиента kafka из документа клиента lagom kafka. Теперь я получаю следующее исключение:

[ERROR] [SECURITY][01/24/2018 14:52:03.461] [lagom-client-akka.kafka.default-dispatcher-12] [akka.actor.ActorSystemImpl(lagom-client)] Uncaught error from thread [lagom-client-akka.kafka.default-dispatcher-12]: Direct buffer memory, shutting down JVM since 'akka.jvm-exit-on-fatal-error' is enabled for ActorSystem[lagom-client]
java.lang.OutOfMemoryError: Direct buffer memory
    at java.nio.Bits.reserveMemory(Bits.java:693)
    at java.nio.DirectByteBuffer.<init>(DirectByteBuffer.java:123)
    at java.nio.ByteBuffer.allocateDirect(ByteBuffer.java:311)
    at sun.nio.ch.Util.getTemporaryDirectBuffer(Util.java:241)
    at sun.nio.ch.IOUtil.read(IOUtil.java:195)
    at sun.nio.ch.SocketChannelImpl.read(SocketChannelImpl.java:380)
    at org.apache.kafka.common.network.PlaintextTransportLayer.read(PlaintextTransportLayer.java:110)
    at org.apache.kafka.common.network.NetworkReceive.readFromReadableChannel(NetworkReceive.java:97)
    at org.apache.kafka.common.network.NetworkReceive.readFrom(NetworkReceive.java:71)
    at org.apache.kafka.common.network.KafkaChannel.receive(KafkaChannel.java:154)
    at org.apache.kafka.common.network.KafkaChannel.read(KafkaChannel.java:135)
    at org.apache.kafka.common.network.Selector.pollSelectionKeys(Selector.java:323)
    at org.apache.kafka.common.network.Selector.poll(Selector.java:283)
    at org.apache.kafka.clients.NetworkClient.poll(NetworkClient.java:260)
    at org.apache.kafka.clients.consumer.internals.ConsumerNetworkClient.clientPoll(ConsumerNetworkClient.java:360)
    at org.apache.kafka.clients.consumer.internals.ConsumerNetworkClient.poll(ConsumerNetworkClient.java:224)
    at org.apache.kafka.clients.consumer.internals.ConsumerNetworkClient.poll(ConsumerNetworkClient.java:192)
    at org.apache.kafka.clients.consumer.internals.ConsumerNetworkClient.poll(ConsumerNetworkClient.java:163)
    at org.apache.kafka.clients.consumer.internals.AbstractCoordinator.ensureCoordinatorReady(AbstractCoordinator.java:179)
    at org.apache.kafka.clients.consumer.KafkaConsumer.pollOnce(KafkaConsumer.java:974)
    at org.apache.kafka.clients.consumer.KafkaConsumer.poll(KafkaConsumer.java:938)
    at akka.kafka.KafkaConsumerActor.tryPoll$1(KafkaConsumerActor.scala:213)
    at akka.kafka.KafkaConsumerActor.poll(KafkaConsumerActor.scala:244)
    at akka.kafka.KafkaConsumerActor$$anonfun$receive$1.applyOrElse(KafkaConsumerActor.scala:120)
    at akka.actor.Actor$class.aroundReceive(Actor.scala:502)
    at akka.kafka.KafkaConsumerActor.aroundReceive(KafkaConsumerActor.scala:71)

0 ответов

Другие вопросы по тегам