Unverified Commit 90da24b1 authored by Sebastian Schüpbach's avatar Sebastian Schüpbach
Browse files

fix service name for report

Signed-off-by: Sebastian Schüpbach's avatarSebastian Schüpbach <sebastian.schuepbach@unibas.ch>
parent c65d8a62
Pipeline #19270 failed with stages
in 3 minutes and 13 seconds
......@@ -17,7 +17,7 @@
~ along with this program. If not, see <https://www.gnu.org/licenses/>.
<Configuration status="info" name="media-converter" packages="">
<Configuration status="debug" name="media-converter" packages="">
<Console name="STDOUT" target="SYSTEM_OUT">
<PatternLayout pattern="[%-5level] [%c{1}] %m%n"/>
......@@ -21,6 +21,7 @@ package ch.memobase
import org.apache.kafka.clients.producer.{KafkaProducer, ProducerRecord, RecordMetadata}
import org.apache.kafka.common.header.Header
import org.apache.logging.log4j.scala.Logging
import java.util.Properties
import java.util.concurrent.{Future => JavaFuture}
......@@ -33,12 +34,13 @@ import scala.collection.JavaConverters._
* @param props Properties for wrapped KafkaProducer
* @param reportingTopic Name of reporting topic
class Reporter(props: Properties, reportingTopic: String) {
class Reporter(props: Properties, reportingTopic: String) extends Logging {
private val producer = new KafkaProducer[String, String](props)
def send(report: models.ReportingObject, recordSetHeader: Header, institutionHeader: Header): JavaFuture[RecordMetadata] = {
val producerRecord = new ProducerRecord[String, String](reportingTopic, 0, report.id, report.toString, List(recordSetHeader, institutionHeader).asJava)
logger.debug(s"Sending report: $report")
......@@ -54,7 +54,7 @@ case class ReportingObject(id: String,
override def toString: String =
("step", "media-metadata-extractor"),
("step", "media-converter"),
("timestamp", createTimestamp),
("id", id),
("status", mergeStatus(digitalObject, poster, audioSnippet)),
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment