From bfc2920a5521e62a1fa24e0d0cbbd66038c0b3c1 Mon Sep 17 00:00:00 2001 From: firest Date: Mon, 6 Mar 2023 10:51:27 +0800 Subject: [PATCH] feat(bridges): introduce DynamoDB definition files from v4 --- .../emqx_ee_bridge/priv/dynamo/mqtt_acked.json | 15 +++++++++++++++ .../emqx_ee_bridge/priv/dynamo/mqtt_client.json | 13 +++++++++++++ .../priv/dynamo/mqtt_clientid_msg_map.json | 13 +++++++++++++ lib-ee/emqx_ee_bridge/priv/dynamo/mqtt_msg.json | 13 +++++++++++++ .../emqx_ee_bridge/priv/dynamo/mqtt_retain.json | 13 +++++++++++++ lib-ee/emqx_ee_bridge/priv/dynamo/mqtt_sub.json | 16 ++++++++++++++++ .../priv/dynamo/mqtt_topic_msg_map.json | 13 +++++++++++++ 7 files changed, 96 insertions(+) create mode 100644 lib-ee/emqx_ee_bridge/priv/dynamo/mqtt_acked.json create mode 100644 lib-ee/emqx_ee_bridge/priv/dynamo/mqtt_client.json create mode 100644 lib-ee/emqx_ee_bridge/priv/dynamo/mqtt_clientid_msg_map.json create mode 100644 lib-ee/emqx_ee_bridge/priv/dynamo/mqtt_msg.json create mode 100644 lib-ee/emqx_ee_bridge/priv/dynamo/mqtt_retain.json create mode 100644 lib-ee/emqx_ee_bridge/priv/dynamo/mqtt_sub.json create mode 100644 lib-ee/emqx_ee_bridge/priv/dynamo/mqtt_topic_msg_map.json diff --git a/lib-ee/emqx_ee_bridge/priv/dynamo/mqtt_acked.json b/lib-ee/emqx_ee_bridge/priv/dynamo/mqtt_acked.json new file mode 100644 index 000000000..6ede088a4 --- /dev/null +++ b/lib-ee/emqx_ee_bridge/priv/dynamo/mqtt_acked.json @@ -0,0 +1,15 @@ +{ + "TableName": "mqtt_acked", + "KeySchema": [ + { "AttributeName": "topic", "KeyType": "HASH" }, + { "AttributeName": "clientid", "KeyType": "RANGE" } + ], + "AttributeDefinitions": [ + { "AttributeName": "topic", "AttributeType": "S" }, + { "AttributeName": "clientid", "AttributeType": "S" } + ], + "ProvisionedThroughput": { + "ReadCapacityUnits": 5, + "WriteCapacityUnits": 5 + } +} diff --git a/lib-ee/emqx_ee_bridge/priv/dynamo/mqtt_client.json b/lib-ee/emqx_ee_bridge/priv/dynamo/mqtt_client.json new file mode 100644 index 000000000..ce1b7d267 --- /dev/null +++ b/lib-ee/emqx_ee_bridge/priv/dynamo/mqtt_client.json @@ -0,0 +1,13 @@ +{ + "TableName": "mqtt_client", + "KeySchema": [ + { "AttributeName": "clientid", "KeyType": "HASH" } + ], + "AttributeDefinitions": [ + { "AttributeName": "clientid", "AttributeType": "S" } + ], + "ProvisionedThroughput": { + "ReadCapacityUnits": 5, + "WriteCapacityUnits": 5 + } +} diff --git a/lib-ee/emqx_ee_bridge/priv/dynamo/mqtt_clientid_msg_map.json b/lib-ee/emqx_ee_bridge/priv/dynamo/mqtt_clientid_msg_map.json new file mode 100644 index 000000000..fd703c664 --- /dev/null +++ b/lib-ee/emqx_ee_bridge/priv/dynamo/mqtt_clientid_msg_map.json @@ -0,0 +1,13 @@ +{ + "TableName": "mqtt_clientid_msg_map", + "KeySchema": [ + { "AttributeName": "clientid", "KeyType": "HASH" } + ], + "AttributeDefinitions": [ + { "AttributeName": "clientid", "AttributeType": "S" } + ], + "ProvisionedThroughput": { + "ReadCapacityUnits": 5, + "WriteCapacityUnits": 5 + } +} diff --git a/lib-ee/emqx_ee_bridge/priv/dynamo/mqtt_msg.json b/lib-ee/emqx_ee_bridge/priv/dynamo/mqtt_msg.json new file mode 100644 index 000000000..ad94b8f72 --- /dev/null +++ b/lib-ee/emqx_ee_bridge/priv/dynamo/mqtt_msg.json @@ -0,0 +1,13 @@ +{ + "TableName": "mqtt_msg", + "KeySchema": [ + { "AttributeName": "id", "KeyType": "HASH" } + ], + "AttributeDefinitions": [ + { "AttributeName": "id", "AttributeType": "S" } + ], + "ProvisionedThroughput": { + "ReadCapacityUnits": 5, + "WriteCapacityUnits": 5 + } +} diff --git a/lib-ee/emqx_ee_bridge/priv/dynamo/mqtt_retain.json b/lib-ee/emqx_ee_bridge/priv/dynamo/mqtt_retain.json new file mode 100644 index 000000000..2a0af2e86 --- /dev/null +++ b/lib-ee/emqx_ee_bridge/priv/dynamo/mqtt_retain.json @@ -0,0 +1,13 @@ +{ + "TableName": "mqtt_retain", + "KeySchema": [ + { "AttributeName": "topic", "KeyType": "HASH" } + ], + "AttributeDefinitions": [ + { "AttributeName": "topic", "AttributeType": "S" } + ], + "ProvisionedThroughput": { + "ReadCapacityUnits": 5, + "WriteCapacityUnits": 5 + } +} diff --git a/lib-ee/emqx_ee_bridge/priv/dynamo/mqtt_sub.json b/lib-ee/emqx_ee_bridge/priv/dynamo/mqtt_sub.json new file mode 100644 index 000000000..9a559f048 --- /dev/null +++ b/lib-ee/emqx_ee_bridge/priv/dynamo/mqtt_sub.json @@ -0,0 +1,16 @@ +{ + "TableName": "mqtt_sub", + "KeySchema": [ + { "AttributeName": "clientid", "KeyType": "HASH" }, + { "AttributeName": "topic", "KeyType": "RANGE" } + ], + "AttributeDefinitions": [ + { "AttributeName": "clientid", "AttributeType": "S" }, + { "AttributeName": "topic", "AttributeType": "S" } + ], + "ProvisionedThroughput": { + "ReadCapacityUnits": 5, + "WriteCapacityUnits": 5 + } +} + diff --git a/lib-ee/emqx_ee_bridge/priv/dynamo/mqtt_topic_msg_map.json b/lib-ee/emqx_ee_bridge/priv/dynamo/mqtt_topic_msg_map.json new file mode 100644 index 000000000..effd4b4b9 --- /dev/null +++ b/lib-ee/emqx_ee_bridge/priv/dynamo/mqtt_topic_msg_map.json @@ -0,0 +1,13 @@ +{ + "TableName": "mqtt_topic_msg_map", + "KeySchema": [ + { "AttributeName": "topic", "KeyType": "HASH" } + ], + "AttributeDefinitions": [ + { "AttributeName": "topic", "AttributeType": "S" } + ], + "ProvisionedThroughput": { + "ReadCapacityUnits": 5, + "WriteCapacityUnits": 5 + } +}