You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@Incoming("channel-topic")
public CompletionStage<Void> readMessage(Message<byte[]> message) {
String s = new String(message.getPayload());
Pack pack = new Pack();
pack.setPackId(s);
Panache.withTransaction(()->packRepository.persist(pack))
.call(()->Uni.createFrom().item(pack))
.subscribe().with(panacheEntityBase -> log.info("Persisted "));
String topic = "topc2";
mqttSensorProducer.sendMessageByTopic(topic, "content topic 2");
return message.ack();
}
I read the message from mqtt and based on that information to add a pack record to the database and continue sending the event to another topic. However the record is not inserted. Can someone explain where I am wrong?
The text was updated successfully, but these errors were encountered:
I read the message from mqtt and based on that information to add a pack record to the database and continue sending the event to another topic. However the record is not inserted. Can someone explain where I am wrong?
The text was updated successfully, but these errors were encountered: