process

package
v0.0.0-...-ec59de8 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 29, 2024 License: MIT Imports: 12 Imported by: 0

Documentation

Overview

process package contains Kafka message processing functions for media-docker-failed-consumer.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ProcessMessage

func ProcessMessage(msg kafka.Message, workerName string)

ProcessMessage processes the Kafka message based on its topic. If the message is successfully unmarshalled and validated, it calls handleDLQMessage. If not, it attempts to extract the newId and originalTopic from the message, logging the error and sending a failed response if necessary.

func RemoveDir

func RemoveDir(workerName, outputPath string)

RemoveDir attempts to remove the specified directory. It makes up to 3 attempts to delete the directory, logging warnings on failure and retrying after a 2-second delay between attempts. If the directory cannot be removed after 3 attempts, it logs an error.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL