Class BasicConsumerConfigBuilder

    • Constructor Detail

      • BasicConsumerConfigBuilder

        public BasicConsumerConfigBuilder()
      • BasicConsumerConfigBuilder

        public BasicConsumerConfigBuilder​(java.lang.String bootstrapServers)
      • BasicConsumerConfigBuilder

        public BasicConsumerConfigBuilder​(java.lang.String bootstrapServers,
                                          java.lang.String groupId)
    • Method Detail

      • getBootstrapServers

        @NonNull
        public @NonNull java.lang.String getBootstrapServers()
        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).

      • setBootstrapServers

        public void setBootstrapServers​(@NonNull
                                        @NonNull java.lang.String bootstrapServers)
        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:
        bootstrapServers - the bootstrap servers
      • getGroupId

        public java.lang.String getGroupId()
        Set the group.id property.

        A unique string that identifies the consumer group this consumer belongs to. This property is required if the consumer uses either the group management functionality by using subscribe(topic) or the Kafka-based offset management strategy.

      • setGroupId

        public void setGroupId​(java.lang.String groupId)
        Set the group.id property.

        A unique string that identifies the consumer group this consumer belongs to. This property is required if the consumer uses either the group management functionality by using subscribe(topic) or the Kafka-based offset management strategy.

        Parameters:
        groupId - the groupId to set