public class RoutingData
extends java.lang.Object
Represent a address where a message must be sent.
It is used by ProducerRecord
to know what the destination is.
It contains a mandatory topic name as well as optionals sharding key and tenant group and partitions.
See how to use in DatabusProducer
example
Constructor and Description |
---|
RoutingData(java.lang.String topic)
RoutingData constructor with only topic name parameter
|
RoutingData(java.lang.String topic,
java.lang.String shardingKey,
java.lang.String tenantGroup)
RoutingData constructor with topic name sharding key and tenant group parameters
|
RoutingData(java.lang.String topic,
java.lang.String shardingKey,
java.lang.String tenantGroup,
java.lang.Integer partition)
RoutingData constructor with all parameters
|
Modifier and Type | Method and Description |
---|---|
java.lang.Integer |
getPartition()
Gets the partition number
|
java.lang.String |
getShardingKey()
Gets the sharding key
|
java.lang.String |
getTenantGroup()
Gets the tenant group
|
java.lang.String |
getTopic()
Gets the topic name
|
public RoutingData(java.lang.String topic)
topic
- The topic name where the message must be sentpublic RoutingData(java.lang.String topic, java.lang.String shardingKey, java.lang.String tenantGroup)
topic
- The topic name where the message must be sentshardingKey
- The Databus sharding keytenantGroup
- The name that groups topicspublic RoutingData(java.lang.String topic, java.lang.String shardingKey, java.lang.String tenantGroup, java.lang.Integer partition)
topic
- The topic name where the message must be sentshardingKey
- The Databus sharding keytenantGroup
- The name that groups topicspartition
- The partition numberpublic java.lang.String getTopic()
public java.lang.String getShardingKey()
public java.lang.String getTenantGroup()
public java.lang.Integer getPartition()