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.