roam/daily/2021-10-05.org
2021-10-08 16:06:24 -04:00

3.8 KiB

2021-10-05

Addressing Tagging message priorities

  • The campaign-engine-tag is defined with x-max-priority: 9
  • The bulk-tagging consumer makes requests to the tagging service with publishing-priority set to 0, the lowest priority, which the tagging service honors (it defaults to 2 when one is not provided).
  • Tag publisher makes requests to tagging with a priority between 0 and 3, depending on the new subscriber's source: https://gitlab.aweber.io/CP/Consumers/tagpublisher/-/blob/master/tagpublisher.py#L96-112

    Tagging Bulk Tagging Tag Publisher
    0 All Unknown / missing source
    1 source=api
    2 Default
    3 source=webform,api/atom
    4
    5
    6
    7
    8
    9
    Tagging publish priorities

For the interim, we'll increase the priorities of events from Tag Publisher by 1, leaving bulk tagging by itself at the lowest priority.

Building a new tag event

I'd like to move forward sooner rather than later with an updated tag event per recipient tagged (currently we emit an event per tag applied).

  From 111ad42ee99ce1e5f2c4c376efc887e3e2851289 Mon Sep 17 00:00:00 2001
  From: Correl <correl@gmail.com>
  Date: Tue, 5 Oct 2021 16:46:57 -0400
  Subject: [PATCH] Create a recipient tagged event

  This event is intended to replace usage of the existing `tag.v1` event,
  which is issued per tag with properties for the tagged recipient, with
  an event issued per recipient with a list of applied tags.

  This will allow campaign tag processing to handle multiple tag updates
  per subscriber in a single event, reducing lock contention on subscriber
  records.

  CCPANEL-11716
  ---
   events/recipient.tagged.v1.avsc | 40 +++++++++++++++++++++++++++++++++
   1 file changed, 40 insertions(+)
   create mode 100644 events/recipient.tagged.v1.avsc

  diff --git a/events/recipient.tagged.v1.avsc b/events/recipient.tagged.v1.avsc
  new file mode 100644
  index 0000000..b28bf28
  --- /dev/null
  +++ b/events/recipient.tagged.v1.avsc
  @@ -0,0 +1,40 @@
  +{
  +    "type": "record",
  +    "namespace": "com.aweber.events",
  +    "name": "recipient.tagged.v1",
  +    "fields": [
  +        {
  +            "name": "id",
  +            "type": "string"
  +        },
  +        {
  +            "name": "account",
  +            "type": "string"
  +        },
  +        {
  +            "name": "list",
  +            "type": [
  +                "string",
  +                "null"
  +            ]
  +        },
  +        {
  +            "name": "timestamp",
  +            "type": "string"
  +        },
  +        {
  +            "name": "tags",
  +            "type": {
  +                "type": "array",
  +                "items": {
  +                    "type": "record",
  +                    "name": "Tag",
  +                    "fields": [
  +                        {"name": "id", "type": "string"},
  +                        {"name": "label": "type": "string"}
  +                    ]
  +                }
  +            }
  +        }
  +    ]
  +}
  --
  2.30.2