-
-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: Allow message handling of un-deserializable data
Co-authored-by: François Delbrayelle <fdelbrayelle@gmail.com>
- Loading branch information
1 parent
ea21510
commit 28fe9f1
Showing
5 changed files
with
71 additions
and
25 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
37 changes: 37 additions & 0 deletions
37
...app/templates/src/main/java/package/service/kafka/deserializer/DeserializerError.java.ejs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
package <%= packageName %>.service.kafka.deserializer; | ||
|
||
public class DeserializerError { | ||
|
||
private byte[] data; | ||
|
||
private Exception exception; | ||
|
||
public DeserializerError(byte[] data, Exception exception) { | ||
this.data = data; | ||
this.exception = exception; | ||
} | ||
|
||
public byte[] getData() { | ||
return data; | ||
} | ||
|
||
public void setData(byte[] data) { | ||
this.data = data; | ||
} | ||
|
||
public Exception getException() { | ||
return exception; | ||
} | ||
|
||
public void setException(Exception exception) { | ||
this.exception = exception; | ||
} | ||
|
||
@Override | ||
public String toString() { | ||
return "DeserializerError{" + | ||
"data='" + new String(data) + "'" + | ||
", exception=" + exception + | ||
'}'; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters