File tree Expand file tree Collapse file tree 2 files changed +6
-7
lines changed
src/main/kotlin/infrastructure Expand file tree Collapse file tree 2 files changed +6
-7
lines changed Original file line number Diff line number Diff line change @@ -14,10 +14,9 @@ import com.fasterxml.jackson.module.kotlin.readValue
14
14
import entities.events.EmptyEvent
15
15
import entities.events.Event
16
16
import infrastructure.digitaltwins.events.RelationshipEvents.RelationshipEvent
17
- import infrastructure.digitaltwins.events.TwinProperties.DTEventTypes.UPDATE
18
- import infrastructure.digitaltwins.events.TwinProperties.DTEventTypes.RELATIONSHIP_DELETE
19
17
import infrastructure.digitaltwins.events.TwinProperties.DTEventTypes.RELATIONSHIP_CREATE
20
-
18
+ import infrastructure.digitaltwins.events.TwinProperties.DTEventTypes.RELATIONSHIP_DELETE
19
+ import infrastructure.digitaltwins.events.TwinProperties.DTEventTypes.UPDATE
21
20
import infrastructure.digitaltwins.events.UpdateEvents.UpdateTwinEvent
22
21
23
22
/* *
Original file line number Diff line number Diff line change @@ -17,15 +17,15 @@ import org.apache.kafka.clients.producer.ProducerRecord
17
17
/* *
18
18
* The publisher of events to a Kafka Event Broker.
19
19
*/
20
- class KafkaPublisher : EventPublisher <Event <Any >> {
20
+ class KafkaPublisher : EventPublisher <Event <* >> {
21
21
22
22
init {
23
23
listOf (System .getenv(" BOOTSTRAP_SERVER_URL" ), System .getenv(" SCHEMA_REGISTRY_URL" )).forEach {
24
24
requireNotNull(it) {
25
25
println (
26
26
"""
27
27
Invalid environment variable!
28
- Check the documentation here:
28
+ Check the documentation here:
29
29
https://github.com/SmartOperatingBlock/bootstrap")"""
30
30
.trimIndent()
31
31
)
@@ -46,9 +46,9 @@ class KafkaPublisher : EventPublisher<Event<Any>> {
46
46
" TRACKING_EVENT" to " tracking-events"
47
47
)
48
48
49
- private val producer: KafkaProducer <String , Event <Any >> = KafkaProducer (producerProps)
49
+ private val producer: KafkaProducer <String , Event <* >> = KafkaProducer (producerProps)
50
50
51
- override fun publishEvent (event : Event <Any >) {
51
+ override fun publishEvent (event : Event <* >) {
52
52
val record = ProducerRecord (eventToTopic[event.key], event.key, event)
53
53
producer.send(record)
54
54
}
You can’t perform that action at this time.
0 commit comments