Producer

Undocumented in source.

Constructors

this
this(Client client, string topic, int partition, Compression compression, int compressionLevel)
this
this(Client client, string topic, int partition, Compression compression)
this
this(Client client, string topic, int partition)

Destructor

~this
~this()
Undocumented in source.

Members

Functions

commitMessage
void commitMessage()

Commits previously reserved space and builds up the message

pushMessage
void pushMessage(const(ubyte)[] key, const(ubyte)[] value)

Pushes the message to the cluster

reserveMessage
void reserveMessage(int keySize, int valueSize)

Reserves the space for the next message using specified key and value sizes. This may be used to avoid double-copy. Instead of filling the user's buffer and passing it to pushMessage(), the user may call the reserveMessage() and fill the data directly in the internal buffer using reservedKey and reservedValue slices. This function is used internally by pushMessage() function.

throwException
void throwException(Exception ex)

Throws an exception in the producer task. This is used to pass the connection exceptions to the user.

Manifest constants

__isWeakIsolatedType
enum __isWeakIsolatedType;
Undocumented in source.

Properties

partition
int partition [@property getter]
Undocumented in source. Be warned that the author may not have intended to support it.
queue
queue [@property getter]
Undocumented in source. Be warned that the author may not have intended to support it.
reservedKey
ubyte[] reservedKey [@property getter]

Slice from the internal buffer for the key. Note that reserveMessage() must be called first

reservedValue
ubyte[] reservedValue [@property getter]

Slice from the internal buffer for the value. Note that reserveMessage() must be called first

topic
string topic [@property getter]
Undocumented in source. Be warned that the author may not have intended to support it.
workerType
WorkerType workerType [@property getter]
Undocumented in source. Be warned that the author may not have intended to support it.

Inherited Members

From IWorker

workerType
WorkerType workerType [@property getter]
Undocumented in source.
topic
string topic [@property getter]
Undocumented in source.
partition
int partition [@property getter]
Undocumented in source.
throwException
void throwException(Exception ex)

throws exception in the worker task

Meta