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

103 lines
3.8 KiB
Org Mode

:PROPERTIES:
:ID: 909b87cb-8777-48e4-9ce9-59c58461797c
:END:
#+title: 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
#+caption: Tagging publish priorities
| | [[id:7e503917-646f-4275-aab9-3a125b99cbfd][Tagging]] | [[id:321075e7-db53-4676-b785-7c77ed9d1150][Bulk Tagging]] | [[id:131dde93-60d3-4813-a16e-7568c79ba6c4][Tag Publisher]] |
|---+---------+--------------+--------------------------|
| 0 | | All | Unknown / missing source |
| 1 | | | source=api |
| 2 | Default | | |
| 3 | | | source=webform,api/atom |
| 4 | | | |
| 5 | | | |
| 6 | | | |
| 7 | | | |
| 8 | | | |
| 9 | | | |
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).
#+begin_src diff
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
#+end_src