Skip to content

Questions about .tags file and failure_policy #393

@dearith

Description

@dearith

I would like to know how to use the .tags file.

My use case is as follows.

==> a MFDATA plugin A (a listener)

  • consumes message on an amqp queue

  • depending of the content of the message, plugin A creates a file F containing the message, adds custom tags (e.g. tag "subject", value "xxxx") and then redirects the new file to switch plugin using move_to_plugin_step function

==> a MFDATA plugin B processes input files whose tag "subject" is "xxxx":

  • processing failed for some reason (e.g. database is shutdown) and failure policy is applied (e.g. keep)

  • so the "trash" directory contains the file F and its tags file (.tags)

Later (e.g. when database is OK), I would like to process again the file F : reinject the file to switch plugin with custom tag "subject" and its value "xxxx".
(I can't read any the message from the amqp queue)

To do this :

  • either I have to publish again a message in the amqp queue from the file F (that's not my favorite solution)

  • or I have to extract the tag subject from the .tags file and then redirects file F to switch plugin using move_to_plugin_step function

My first question : is there a mecanism implemented in Metwork to do this without implementing a new plugin ?

My second question : if I use failure_policy = move, I notice the .tags file is not created when failure policy is "move"
see _trash function in the AcquisitionStep class. Is there a way to get the .tags file in this case ?

In your opinion, what's the best way to implement my use case?

Thanks.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions