File tree 1 file changed +9
-5
lines changed
integrasjon/kafka-properties/src/main/java/no/nav/vedtak/felles/integrasjon/kafka
1 file changed +9
-5
lines changed Original file line number Diff line number Diff line change 10
10
public class KafkaSender {
11
11
12
12
private final Producer <String , String > producer ;
13
- private final String topic ;
13
+ private final String topicName ;
14
14
15
- public KafkaSender (String topic ) {
15
+ public KafkaSender (String topicName ) {
16
16
this .producer = new KafkaProducer <>(KafkaProperties .forProducer ());
17
- this .topic = topic ;
17
+ this .topicName = topicName ;
18
+ }
19
+
20
+ public String getTopicName () {
21
+ return topicName ;
18
22
}
19
23
20
24
public RecordMetadata send (String key , String message ) {
21
- if (topic == null ) {
25
+ if (topicName == null ) {
22
26
throw kafkaPubliseringException ("null" , new IllegalArgumentException ());
23
27
}
24
- return send (key , message , this .topic );
28
+ return send (key , message , this .topicName );
25
29
}
26
30
27
31
public RecordMetadata send (String key , String message , String topic ) {
You can’t perform that action at this time.
0 commit comments