You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@kafka.apache.org by "Sriharsha Chintalapani (JIRA)" <ji...@apache.org> on 2015/01/16 20:04:35 UTC

[jira] [Commented] (KAFKA-1871) Kafka Producer constructor hungs in case of wrong 'serializer.class' property

    [ https://issues.apache.org/jira/browse/KAFKA-1871?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14280669#comment-14280669 ] 

Sriharsha Chintalapani commented on KAFKA-1871:
-----------------------------------------------

[~igor.quickblox] is the serializer.class doesn't exist? if so you should get an exception like this
java.lang.ClassNotFoundException: main.java.com.services.kafka.MessageEntityToJsonSerializer
	at java.net.URLClassLoader$1.run(URLClassLoader.java:366)
	at java.net.URLClassLoader$1.run(URLClassLoader.java:355)


> Kafka Producer constructor hungs in case of wrong 'serializer.class' property
> -----------------------------------------------------------------------------
>
>                 Key: KAFKA-1871
>                 URL: https://issues.apache.org/jira/browse/KAFKA-1871
>             Project: Kafka
>          Issue Type: Bug
>          Components: clients, producer 
>    Affects Versions: 0.8.1.1
>         Environment: AWS Linux
>            Reporter: Igor Khomenko
>            Assignee: Jun Rao
>             Fix For: 0.8.1.2
>
>
> I have next code:
> {code}
> Properties props = new Properties();
> props.put("metadata.broker.list", Services.getConfigInstance().getKafkaBrokerList());
> props.put("serializer.class", "main.java.com.services.kafka.MessageEntityToJsonSerializer");
> props.put("request.required.acks", "0");
> ProducerConfig config = new ProducerConfig(props);
> if (log.isLoggable(Level.INFO)) {
>     log.log(Level.INFO, "Connecting to Kafka...props: " + props);
> }
> producer = new Producer<String, MessageEntity>(config);
> if (log.isLoggable(Level.INFO)) {
>     log.log(Level.INFO, "Connected to Kafka");
> }
> {code}
> It just hungs on 'new Producer' in case of wrong 'serializer.class' property



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)