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

Update Kafka producer and consumer to use Apache's Java Map construct… #48

Merged
merged 1 commit into from
Nov 15, 2018

Conversation

sherwinschiu
Copy link
Contributor

…or to bypass classloader.

For #47

@@ -270,6 +271,9 @@ case class KafkaProducerConfig(
"metrics.sample.window.ms" -> metricsSampleWindow.toMillis.toString
)

def toJavaMap: java.util.Map[String, Object] =
toMap.filter(_._2 != null).mapValues(_.asInstanceOf[AnyRef]).asJava
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is filtering null necessary? I believe optional are only ssl related configs and I think at least some of them accept null as valid value

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I get a NullPointerException for the partitioner when sending a message, unless I manage the partition value myself. This does not happen when using the properties version of the config and narrowed it down to this one difference.

@Avasil Avasil merged commit 8b7c517 into monix:master Nov 15, 2018
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

Successfully merging this pull request may close these issues.

2 participants