Skip to content

Commit

Permalink
[9964] destination-mqtt: fixed build tests failures (#13099)
Browse files Browse the repository at this point in the history
* [9964] destination-mqtt: fixed build tests failures
  • Loading branch information
etsybaev authored May 24, 2022
1 parent 44a43f0 commit d6f4ef4
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
package io.airbyte.integrations.destination.mqtt;

import com.fasterxml.jackson.databind.JsonNode;
import com.google.common.base.Charsets;
import com.google.common.collect.ImmutableMap;
import io.airbyte.commons.json.Jsons;
import io.airbyte.integrations.BaseConnector;
Expand Down Expand Up @@ -49,7 +50,7 @@ public AirbyteConnectionStatus check(final JsonNode config) {
COLUMN_NAME_EMITTED_AT, System.currentTimeMillis(),
COLUMN_NAME_DATA, Jsons.jsonNode(ImmutableMap.of("test-key", "test-value"))));

final MqttMessage message = new MqttMessage(payload.toString().getBytes());
final MqttMessage message = new MqttMessage(payload.toString().getBytes(Charsets.UTF_8));
message.setQos(mqttConfig.getQos());
message.setRetained(mqttConfig.isRetainedMessage());

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
package io.airbyte.integrations.destination.mqtt;

import com.fasterxml.jackson.databind.JsonNode;
import com.google.common.base.Charsets;
import com.google.common.collect.ImmutableMap;
import io.airbyte.commons.json.Jsons;
import io.airbyte.commons.lang.Exceptions;
Expand Down Expand Up @@ -86,7 +87,7 @@ protected void acceptTracked(final AirbyteMessage airbyteMessage) {
MqttDestination.COLUMN_NAME_EMITTED_AT, recordMessage.getEmittedAt(),
MqttDestination.COLUMN_NAME_DATA, recordMessage.getData()));

final MqttMessage message = new MqttMessage(payload.toString().getBytes());
final MqttMessage message = new MqttMessage(payload.toString().getBytes(Charsets.UTF_8));
message.setRetained(config.isRetainedMessage());
message.setQos(config.getQos());

Expand Down
7 changes: 7 additions & 0 deletions docs/integrations/destinations/mqtt.md
Original file line number Diff line number Diff line change
Expand Up @@ -76,3 +76,10 @@ You should now have all the requirements needed to configure MQTT as a destinati
More info about this can be found in the [OASIS MQTT standard site](http://docs.oasis-open.org/mqtt/mqtt/v3.1.1/mqtt-v3.1.1.html).

_NOTE_: MQTT version 5 is not supported yet.


## Changelog

| Version | Date | Pull Request | Subject |
| :--- | :--- | :--- | :--- |
| 0.1.2 | 2022-05-24 | [13099](https://github.com/airbytehq/airbyte/pull/13099) | Fixed build's tests |

0 comments on commit d6f4ef4

Please sign in to comment.