Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adds basic MQTT support with remote events #1509

Merged
merged 1 commit into from
Apr 8, 2023

Conversation

reinhapa
Copy link
Contributor

@reinhapa reinhapa commented Apr 5, 2023

  • adds short cut to signal restart on rc 42
  • adds heartbeat over mqtt

@reinhapa reinhapa requested a review from mklaehn April 5, 2023 18:42
@reinhapa
Copy link
Contributor Author

reinhapa commented Apr 5, 2023

Initial implementation for #906

@reinhapa reinhapa added the enhancement New feature or request label Apr 5, 2023
@reinhapa reinhapa self-assigned this Apr 5, 2023
@reinhapa reinhapa added the java Pull requests that update Java code label Apr 5, 2023
mklaehn
mklaehn previously approved these changes Apr 6, 2023
Copy link
Contributor

@mklaehn mklaehn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've noted a few points but looks good.

mqtt/build.gradle Outdated Show resolved Hide resolved
- adds short cut to signal restart on rc 42
- adds heartbeat over mqtt

Signed-off-by: Patrick Reinhart <[email protected]>
@reinhapa
Copy link
Contributor Author

reinhapa commented Apr 7, 2023

@mklaehn addressed re-use of JsonDataConverter but switched to JSONB within.

Copy link
Contributor

@mklaehn mklaehn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Okay, works for me :)

dependencies {
implementation project(':tweetwallfx-configuration')
implementation 'org.eclipse.paho:org.eclipse.paho.client.mqttv3:1.2.5'
implementation 'org.slf4j:slf4j-api:2.0.6'
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

not strictly required at the moment as the rootProject adds it as implementation dependency to every leaf project. not bad per se...

Suggested change
implementation 'org.slf4j:slf4j-api:2.0.6'


@Test
void convertFromInputStream() {
var is = new ByteArrayInputStream("{\"one\":\"11\",\"tree\":false,\"two\":22}".getBytes(UTF_8));
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This works.
with text block this would look like

Suggested change
var is = new ByteArrayInputStream("{\"one\":\"11\",\"tree\":false,\"two\":22}".getBytes(UTF_8));
var is = new ByteArrayInputStream("""{"one":"11","tree":false,"two":22}""".getBytes(UTF_8));

@reinhapa reinhapa merged commit ec65ae6 into TweetWallFX:master Apr 8, 2023
@reinhapa reinhapa deleted the mqtt branch April 8, 2023 07:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request java Pull requests that update Java code
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants