Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Crc32cIntChecksum - Failed to load Circe JNI library #256

Open
colinbes opened this issue Dec 14, 2020 · 6 comments
Open

Crc32cIntChecksum - Failed to load Circe JNI library #256

colinbes opened this issue Dec 14, 2020 · 6 comments

Comments

@colinbes
Copy link

I am using the jackson dependency in my sbt file

name := "pulsarc"
version := "0.1"
scalaVersion := "2.13.4"
libraryDependencies += "com.sksamuel.pulsar4s" %% "pulsar4s-jackson" % "2.7.0"
libraryDependencies += "ch.qos.logback" % "logback-classic" % "1.2.3"

and am using intellij idea ide. On running (settings use java 8 to run app) my simple test app I get the following error message which is confusing as I am not using Circe library. Is Circe used somewhere behind the scenes?

[pulsar-client-io-1-1] Crc32cIntChecksum - Failed to load Circe JNI library. Falling back to Java based CRC32c provider 
@sksamuel
Copy link
Contributor

sksamuel commented Dec 14, 2020 via email

@sksamuel
Copy link
Contributor

sksamuel commented Dec 14, 2020 via email

@sksamuel
Copy link
Contributor

sksamuel commented Dec 14, 2020 via email

@colinbes
Copy link
Author

No, I have not included circe.

Here's my simple code:


import com.sksamuel.pulsar4s.{Consumer, ConsumerConfig, ProducerConfig, PulsarClient, Subscription, Topic}
import com.sksamuel.pulsar4s.jackson._
import scala.util.{Failure, Success}
case class TestMessage(name: String, value: Int)


object MyApp extends App {

  val pulsarHost = System.getProperty("org.bdesigns.pulsar", "pulsar://localhost:6650")
  val client = PulsarClient(pulsarHost)

  def receive(consumer: Consumer[TestMessage], label: String): Unit = {
    val msg = consumer.receive

    msg match {
      case Success(value) =>
        println(s"${consumer.subscription} Success, $label ${value.value}")
        consumer.acknowledge(value)
      case Failure(exception) =>
        println(s"Failed: ${exception.getMessage}")
    }
  }

  val topic = Topic("persistent://sample/standalone/ns2/b1")

  val producer = client.producer[TestMessage](ProducerConfig(topic))
  val consumerFn = client.consumer[TestMessage](ConsumerConfig(subscriptionName=Subscription("mysub"), topics=Seq(topic)))
//  consumerFn.seek(MessageId.earliest)

  producer.send(TestMessage("msg1", 100))
  receive(consumerFn, "1: received1")

  producer.close()
  consumerFn.close()
  client.close()
}

Looking at link you sent now.

@colinbes
Copy link
Author

Which I assume pulsar itself is using.

You thinking the pulsar java library?

@sksamuel
Copy link
Contributor

sksamuel commented Dec 14, 2020 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants