Class BasicProducerConfigBuilder

    • Constructor Detail

      • BasicProducerConfigBuilder

        public BasicProducerConfigBuilder()
        Deprecated.
      • BasicProducerConfigBuilder

        public BasicProducerConfigBuilder​(java.lang.String bootstrapServers)
        Deprecated.
    • Method Detail

      • getBootstrapServers

        public java.lang.String getBootstrapServers()
        Deprecated.
      • setBootstrapServers

        public void setBootstrapServers​(java.lang.String s)
        Deprecated.
        Set the bootstrap.servers property.

        A list of host/port pairs to use for establishing the initial connection to the Kafka cluster. The client will make use of all servers irrespective of which servers are specified here for bootstrapping; this list only impacts the initial hosts used to discover the full set of servers. This list should be in the form host1:port1,host2:port2,..... Since these servers are just used for the initial connection to discover the full cluster membership (which may change dynamically), this list need not contain the full set of servers (you may want more than one, though, in case a server is down).

        Parameters:
        s - the bootstrap servers
      • getBufferMemory

        public java.lang.Long getBufferMemory()
        Deprecated.
      • setBufferMemory

        public void setBufferMemory​(java.lang.Long m)
        Deprecated.
        Set the buffer.memory property.

        The total bytes of memory the producer can use to buffer records waiting to be sent to the server. If records are sent faster than they can be delivered to the server the producer will either block or throw an exception based on the preference specified by block.on.buffer.full ({code block.on.buffer.full} defaults to false, so an exception will be thrown).

        This setting should correspond roughly to the total memory the producer will use, but is not a hard bound since not all memory the producer uses is used for buffering. Some additional memory will be used for compression (if compression is enabled) as well as for maintaining in-flight requests.

        Parameters:
        m - the buffer memory; default is 33554432L if not specified.
      • setCompressionType

        public void setCompressionType​(ConfigBuilder.CompressionType t)
        Deprecated.
        Set the compression.type property.

        The compression type for all data generated by the producer. The default is none (i.e. no compression). Valid values are none, gzip, snappy, or lz4. Compression is of full batches of data, so the efficacy of batching will also impact the compression ratio (more batching means better compression).

        Parameters:
        t - the compression type; default is ConfigBuilder.CompressionType.none if not specified.
      • getRetries

        public java.lang.Integer getRetries()
        Deprecated.
      • setRetries

        public void setRetries​(java.lang.Integer i)
        Deprecated.
        Set the retries property.

        Setting a value greater than zero will cause the client to resend any record whose send fails with a potentially transient error. Note that this retry is no different than if the client resent the record upon receiving the error. Allowing retries will potentially change the ordering of records because if two records are sent to a single partition, and the first fails and is retried but the second succeeds, then the second record may appear first.

        Parameters:
        i - the number of retries, default is 0 if not specified.
      • setAcks

        public void setAcks​(ConfigBuilder.Acks a)
        Deprecated.
        Set the acks property.

        This specifies number of acknowledgments the producer requires the leader to have received before considering a request complete

        Parameters:
        a - the number of acks; default is ConfigBuilder.Acks.all if not specified for the strongest available guarantee.