Client

The client acts as a router between brokers, consumers and producers. Consumers and producers connect to the client and it handles connections to the brokers for them. It transparently handles connection failures, leader switches and translates topic/partitions to respective broker connections.

Constructors

this
this(BrokerAddress[] bootstrapBrokers, string clientId, Configuration config)
Undocumented in source.

Members

Functions

addNewConsumer
void addNewConsumer(Consumer consumer)
Undocumented in source. Be warned that the author may not have intended to support it.
addNewProducer
void addNewProducer(Producer producer)
Undocumented in source. Be warned that the author may not have intended to support it.
addToBrokerless
void addToBrokerless(Queue queue, bool notify)
Undocumented in source. Be warned that the author may not have intended to support it.
connectionLost
void connectionLost(BrokerConnection conn)
Undocumented in source. Be warned that the author may not have intended to support it.
getPartitions
int[] getPartitions(string topic)
Undocumented in source. Be warned that the author may not have intended to support it.
getTopics
string[] getTopics()
Undocumented in source. Be warned that the author may not have intended to support it.
refreshMetadata
void refreshMetadata()

Refreshes the metadata and stores it in the cache. Call it before using the getTopics/getPartitions to get the most recent metadata. Metadata is also refreshed internally on the first use and on each consumer/producer failure.

removeConsumer
void removeConsumer(Consumer consumer)
Undocumented in source. Be warned that the author may not have intended to support it.

Manifest constants

__isWeakIsolatedType
enum __isWeakIsolatedType;
Undocumented in source.

Properties

clientId
auto clientId [@property getter]
Undocumented in source. Be warned that the author may not have intended to support it.
clientId
string clientId [@property setter]
Undocumented in source. Be warned that the author may not have intended to support it.
config
const(Configuration) config [@property getter]
Undocumented in source. Be warned that the author may not have intended to support it.

Meta