projects
/
demos
/
kafka
/
chat
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
5c75656
)
fix: `metadata` is never `null`
author
Kai Moritz
<kai@juplo.de>
Sun, 28 Jan 2024 17:50:33 +0000
(18:50 +0100)
committer
Kai Moritz
<kai@juplo.de>
Sun, 28 Jan 2024 17:50:46 +0000
(18:50 +0100)
src/main/java/de/juplo/kafka/chat/backend/implementation/kafka/DataChannel.java
patch
|
blob
|
history
src/main/java/de/juplo/kafka/chat/backend/implementation/kafka/InfoChannel.java
patch
|
blob
|
history
diff --git
a/src/main/java/de/juplo/kafka/chat/backend/implementation/kafka/DataChannel.java
b/src/main/java/de/juplo/kafka/chat/backend/implementation/kafka/DataChannel.java
index
da90663
..
381152b
100644
(file)
--- a/
src/main/java/de/juplo/kafka/chat/backend/implementation/kafka/DataChannel.java
+++ b/
src/main/java/de/juplo/kafka/chat/backend/implementation/kafka/DataChannel.java
@@
-96,7
+96,7
@@
public class DataChannel implements Runnable, ConsumerRebalanceListener
producer.send(record, ((metadata, exception) ->
{
- if (
metadata !
= null)
+ if (
exception =
= null)
{
// On successful send
Message message = new Message(key, metadata.offset(), timestamp, text);
diff --git
a/src/main/java/de/juplo/kafka/chat/backend/implementation/kafka/InfoChannel.java
b/src/main/java/de/juplo/kafka/chat/backend/implementation/kafka/InfoChannel.java
index
26e8696
..
1d9d801
100644
(file)
--- a/
src/main/java/de/juplo/kafka/chat/backend/implementation/kafka/InfoChannel.java
+++ b/
src/main/java/de/juplo/kafka/chat/backend/implementation/kafka/InfoChannel.java
@@
-81,7
+81,7
@@
public class InfoChannel implements Runnable
producer.send(record, ((metadata, exception) ->
{
- if (
metadata !
= null)
+ if (
exception =
= null)
{
log.info("Successfully sent chreate-request for chat room: {}", to);
ChatRoomInfo chatRoomInfo = new ChatRoomInfo(chatRoomId, name, shard);