KafkaConsumerSubscribeCb Property
General info
Label |
Custom Subscribe |
Description |
Custom subscription and further initialization of a consumer. |
Data type |
String |
Default value |
"return function(client, topics)end" |
Type |
Regular |
Code |
13166 |
Symbolic name |
MODEL_PROP_KAFKACONSUMERSUBSCRIBECB |
Lua access code |
syslib.model.properties.KafkaConsumerSubscribeCb |
Available since |
1.84 |
- Parent properties
Attributes
| Name | Tooltip |
|---|---|
| PROP_CONFIGURABLE | The property is configurable and can be changed with DataStudio and the various inmation APIs. |
| PROP_VISIBLE | The property is visible in DataStudio and can be read by the inmation APIs. |
| PROP_HAS_DEFAULT | The property has a default value as standard. |
Examples
Read from or write to the KafkaConsumerSubscribeCb property.
-- Read from the KafkaConsumerSubscribeCb
syslib.getvalue("<OBJECT FULL PATH>.KafkaConsumerProperties.KafkaConsumerSubscribeCb")
-- Write to the KafkaConsumerSubscribeCb
syslib.setvalue("<OBJECT FULL PATH>.KafkaConsumerProperties.KafkaConsumerSubscribeCb", "return function(client, topics)end")
TcpConfig tcpcfg = new TcpConfig() { HostNameOrIp = "localhost", Port = 6512 };
SecurityCredentials sc = new SecurityCredentials() { ProfileName = "<username>", Password = "<password>" };
StatelessInterface sli = new StatelessInterface(tcpcfg);
// Read from the KafkaConsumerSubscribeCb
Result result = sli.ReadValue(sc, new ReadItem("<OBJECT FULL PATH>.KafkaConsumerProperties.KafkaConsumerSubscribeCb"));
// Write to the KafkaConsumerSubscribeCb
Result result = sli.WriteValue(sc, new WriteItem("return function(client, topics)end", "<OBJECT FULL PATH>.KafkaConsumerProperties.KafkaConsumerSubscribeCb"));