justinmclean opened a new issue, #56:
URL: https://github.com/apache/iggy-website/issues/56
The Java snippets compile and the API usage is correct, unlike the other SDK
pages. Two runtime problems, both found by running them.
The consumer prints the loop's `offset` variable rather than each message's
own
offset, so every line reads `Offset: 0`:
Offset: 0, Payload: message-0
Offset: 0, Payload: message-1
...
It should be `message.header().offset()`.
The producer calls `createStream` unconditionally, so a second run throws
`IggyConflictException: Server error [code=1012 (STREAM_ALREADY_EXISTS)]`.
`getStream` and `getTopic` return `Optional`, so guarding is straightforward.
Also: both snippets connect to `localhost`, while the tested examples and the
server config use `127.0.0.1`, and the server listens on IPv4 only by
default.
The producer prints nothing on success, so a working run looks like it did
nothing.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]