nulogy_message_bus_consumer 2.0.1 → 3.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/nulogy_message_bus_consumer/config.rb +2 -0
- data/lib/nulogy_message_bus_consumer/steps/connect_to_message_bus.rb +6 -1
- data/lib/nulogy_message_bus_consumer/version.rb +1 -1
- data/spec/dummy/log/development.log +83 -0
- data/spec/dummy/log/test.log +2680 -0
- data/spec/integration/nulogy_message_bus_consumer/auditor_spec.rb +3 -2
- data/spec/integration/nulogy_message_bus_consumer/steps/commit_on_success_spec.rb +3 -4
- data/spec/support/kafka.rb +6 -2
- metadata +29 -13
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 862741ddaf92ca7e2d6fde54ed615ba825bba19a4d273d1ebed423251d6b533d
|
4
|
+
data.tar.gz: 600762f9aa198ddbb83fbed2f515408da1eb92fa79906e53de946310e44814ce
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 675fe6e4b74840afdfcb044ba179f3c82878eb60740d5bfe5abb8568a25d45771b2aafbc33a77bdad97aac75bdc5d3fb047e450a7d970787f23b437ac626d2f6
|
7
|
+
data.tar.gz: e322f8822ebd5cc1c709f4f608cf17ee2ed66fe6e844089467a90304a7b3e73a529ef8847def2264b63208fbf41c17466b82454ce793120fda2879ca4405d84f
|
@@ -3,6 +3,7 @@ module NulogyMessageBusConsumer
|
|
3
3
|
attr_accessor :bootstrap_servers,
|
4
4
|
:client_id,
|
5
5
|
:consumer_group_id,
|
6
|
+
:security_protocol,
|
6
7
|
:lag_check_interval_seconds,
|
7
8
|
:lag_checks,
|
8
9
|
:lag_timeout_milliseconds,
|
@@ -13,6 +14,7 @@ module NulogyMessageBusConsumer
|
|
13
14
|
|
14
15
|
def initialize(options = {})
|
15
16
|
defaults = {
|
17
|
+
security_protocol: "ssl",
|
16
18
|
lag_check_interval_seconds: 20,
|
17
19
|
lag_checks: 6,
|
18
20
|
lag_timeout_milliseconds: 200,
|
@@ -31,7 +31,12 @@ module NulogyMessageBusConsumer
|
|
31
31
|
"bootstrap.servers": @config.bootstrap_servers,
|
32
32
|
"enable.auto.commit": false,
|
33
33
|
"group.id": @config.consumer_group_id,
|
34
|
-
"enable.auto.offset.store": false
|
34
|
+
"enable.auto.offset.store": false,
|
35
|
+
# Connect to the broker(s) using TLS:
|
36
|
+
# See "SSL" section in:
|
37
|
+
# https://github.com/confluentinc/librdkafka/blob/cb8c19c43011b66c4b08b25e5150455a247e1ff3/INTRODUCTION.md
|
38
|
+
# librdkafka will try to use CA certs from OpenSSL if installed
|
39
|
+
"security.protocol": @config.security_protocol
|
35
40
|
}
|
36
41
|
|
37
42
|
config["client.id"] = @config.client_id if @config.client_id
|
@@ -0,0 +1,83 @@
|
|
1
|
+
[1m[35m (0.9ms)[0m [1m[35mDROP DATABASE IF EXISTS "message_bus_consumer_development"[0m
|
2
|
+
[1m[35m (22.2ms)[0m [1m[35mDROP DATABASE IF EXISTS "message_bus_consumer_test"[0m
|
3
|
+
[1m[35m (76.6ms)[0m [1m[35mCREATE DATABASE "message_bus_consumer_development" ENCODING = 'utf8'[0m
|
4
|
+
[1m[35m (88.5ms)[0m [1m[35mCREATE DATABASE "message_bus_consumer_test" ENCODING = 'utf8'[0m
|
5
|
+
[1m[35mSQL (0.9ms)[0m [1m[35mCREATE EXTENSION IF NOT EXISTS "plpgsql"[0m
|
6
|
+
[1m[35mSQL (3.5ms)[0m [1m[35mCREATE EXTENSION IF NOT EXISTS "uuid-ossp"[0m
|
7
|
+
[1m[35m (0.9ms)[0m [1m[35mDROP TABLE IF EXISTS "message_bus_processed_messages" CASCADE[0m
|
8
|
+
[1m[35m (3.6ms)[0m [1m[35mCREATE TABLE "message_bus_processed_messages" ("id" uuid NOT NULL PRIMARY KEY, "created_at" timestamp NOT NULL)[0m
|
9
|
+
[1m[35m (5.9ms)[0m [1m[35mCREATE TABLE "schema_migrations" ("version" character varying NOT NULL PRIMARY KEY)[0m
|
10
|
+
[1m[35m (1.1ms)[0m [1m[34mSELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC[0m
|
11
|
+
[1m[35m (1.4ms)[0m [1m[32mINSERT INTO "schema_migrations" (version) VALUES (20200612184425)[0m
|
12
|
+
[1m[35m (1.1ms)[0m [1m[32mINSERT INTO "schema_migrations" (version) VALUES
|
13
|
+
(20200509095105);
|
14
|
+
|
15
|
+
[0m
|
16
|
+
[1m[35m (5.6ms)[0m [1m[35mCREATE TABLE "ar_internal_metadata" ("key" character varying NOT NULL PRIMARY KEY, "value" character varying, "created_at" timestamp(6) NOT NULL, "updated_at" timestamp(6) NOT NULL)[0m
|
17
|
+
[1m[36mActiveRecord::InternalMetadata Load (0.9ms)[0m [1m[34mSELECT "ar_internal_metadata".* FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = $1 LIMIT $2[0m [["key", "environment"], ["LIMIT", 1]]
|
18
|
+
[1m[35m (0.9ms)[0m [1m[35mBEGIN[0m
|
19
|
+
[1m[36mActiveRecord::InternalMetadata Create (1.2ms)[0m [1m[32mINSERT INTO "ar_internal_metadata" ("key", "value", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "key"[0m [["key", "environment"], ["value", "development"], ["created_at", "2022-11-22 15:53:48.407450"], ["updated_at", "2022-11-22 15:53:48.407450"]]
|
20
|
+
[1m[35m (1.1ms)[0m [1m[35mCOMMIT[0m
|
21
|
+
[1m[36mActiveRecord::InternalMetadata Load (0.8ms)[0m [1m[34mSELECT "ar_internal_metadata".* FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = $1 LIMIT $2[0m [["key", "environment"], ["LIMIT", 1]]
|
22
|
+
[1m[36mActiveRecord::InternalMetadata Load (0.8ms)[0m [1m[34mSELECT "ar_internal_metadata".* FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = $1 LIMIT $2[0m [["key", "schema_sha1"], ["LIMIT", 1]]
|
23
|
+
[1m[35m (0.7ms)[0m [1m[35mBEGIN[0m
|
24
|
+
[1m[36mActiveRecord::InternalMetadata Create (0.9ms)[0m [1m[32mINSERT INTO "ar_internal_metadata" ("key", "value", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "key"[0m [["key", "schema_sha1"], ["value", "dde38963e534769353e4aa869d2984e2f2b3db17"], ["created_at", "2022-11-22 15:53:48.418014"], ["updated_at", "2022-11-22 15:53:48.418014"]]
|
25
|
+
[1m[35m (1.2ms)[0m [1m[35mCOMMIT[0m
|
26
|
+
[1m[35mSQL (1.0ms)[0m [1m[35mCREATE EXTENSION IF NOT EXISTS "plpgsql"[0m
|
27
|
+
[1m[35mSQL (5.0ms)[0m [1m[35mCREATE EXTENSION IF NOT EXISTS "uuid-ossp"[0m
|
28
|
+
[1m[35m (1.3ms)[0m [1m[35mDROP TABLE IF EXISTS "message_bus_processed_messages" CASCADE[0m
|
29
|
+
[1m[35m (6.9ms)[0m [1m[35mCREATE TABLE "message_bus_processed_messages" ("id" uuid NOT NULL PRIMARY KEY, "created_at" timestamp NOT NULL)[0m
|
30
|
+
[1m[35m (5.4ms)[0m [1m[35mCREATE TABLE "schema_migrations" ("version" character varying NOT NULL PRIMARY KEY)[0m
|
31
|
+
[1m[35m (1.0ms)[0m [1m[34mSELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC[0m
|
32
|
+
[1m[35m (1.4ms)[0m [1m[32mINSERT INTO "schema_migrations" (version) VALUES (20200612184425)[0m
|
33
|
+
[1m[35m (1.3ms)[0m [1m[32mINSERT INTO "schema_migrations" (version) VALUES
|
34
|
+
(20200509095105);
|
35
|
+
|
36
|
+
[0m
|
37
|
+
[1m[35m (4.4ms)[0m [1m[35mCREATE TABLE "ar_internal_metadata" ("key" character varying NOT NULL PRIMARY KEY, "value" character varying, "created_at" timestamp(6) NOT NULL, "updated_at" timestamp(6) NOT NULL)[0m
|
38
|
+
[1m[36mActiveRecord::InternalMetadata Load (0.9ms)[0m [1m[34mSELECT "ar_internal_metadata".* FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = $1 LIMIT $2[0m [["key", "environment"], ["LIMIT", 1]]
|
39
|
+
[1m[35m (0.7ms)[0m [1m[35mBEGIN[0m
|
40
|
+
[1m[36mActiveRecord::InternalMetadata Create (1.7ms)[0m [1m[32mINSERT INTO "ar_internal_metadata" ("key", "value", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "key"[0m [["key", "environment"], ["value", "development"], ["created_at", "2022-11-22 15:53:48.493798"], ["updated_at", "2022-11-22 15:53:48.493798"]]
|
41
|
+
[1m[35m (1.1ms)[0m [1m[35mCOMMIT[0m
|
42
|
+
[1m[36mActiveRecord::InternalMetadata Load (2.0ms)[0m [1m[34mSELECT "ar_internal_metadata".* FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = $1 LIMIT $2[0m [["key", "environment"], ["LIMIT", 1]]
|
43
|
+
[1m[35m (0.7ms)[0m [1m[35mBEGIN[0m
|
44
|
+
[1m[36mActiveRecord::InternalMetadata Update (2.0ms)[0m [1m[33mUPDATE "ar_internal_metadata" SET "value" = $1, "updated_at" = $2 WHERE "ar_internal_metadata"."key" = $3[0m [["value", "test"], ["updated_at", "2022-11-22 15:53:48.503739"], ["key", "environment"]]
|
45
|
+
[1m[35m (1.1ms)[0m [1m[35mCOMMIT[0m
|
46
|
+
[1m[36mActiveRecord::InternalMetadata Load (0.8ms)[0m [1m[34mSELECT "ar_internal_metadata".* FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = $1 LIMIT $2[0m [["key", "schema_sha1"], ["LIMIT", 1]]
|
47
|
+
[1m[35m (0.7ms)[0m [1m[35mBEGIN[0m
|
48
|
+
[1m[36mActiveRecord::InternalMetadata Create (0.8ms)[0m [1m[32mINSERT INTO "ar_internal_metadata" ("key", "value", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "key"[0m [["key", "schema_sha1"], ["value", "dde38963e534769353e4aa869d2984e2f2b3db17"], ["created_at", "2022-11-22 15:53:48.511603"], ["updated_at", "2022-11-22 15:53:48.511603"]]
|
49
|
+
[1m[35m (1.3ms)[0m [1m[35mCOMMIT[0m
|
50
|
+
[1m[35m (1.1ms)[0m [1m[34mSELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC[0m
|
51
|
+
[1m[35m (1.3ms)[0m [1m[34mSELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC[0m
|
52
|
+
[1m[35m (0.9ms)[0m [1m[34mSELECT "ar_internal_metadata"."value" FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = $1[0m [["key", "environment"]]
|
53
|
+
[1m[35m (0.9ms)[0m [1m[34mSELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC[0m
|
54
|
+
[1m[35m (0.8ms)[0m [1m[34mSELECT "ar_internal_metadata"."value" FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = $1[0m [["key", "environment"]]
|
55
|
+
[1m[35m (0.8ms)[0m [1m[34mSELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC[0m
|
56
|
+
[1m[35m (0.8ms)[0m [1m[34mSELECT "ar_internal_metadata"."value" FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = $1[0m [["key", "environment"]]
|
57
|
+
[1m[35mSQL (0.8ms)[0m [1m[35mCREATE EXTENSION IF NOT EXISTS "plpgsql"[0m
|
58
|
+
[1m[35mSQL (0.8ms)[0m [1m[35mCREATE EXTENSION IF NOT EXISTS "uuid-ossp"[0m
|
59
|
+
[1m[35m (2.3ms)[0m [1m[35mDROP TABLE IF EXISTS "message_bus_processed_messages" CASCADE[0m
|
60
|
+
[1m[35m (2.9ms)[0m [1m[35mCREATE TABLE "message_bus_processed_messages" ("id" uuid NOT NULL PRIMARY KEY, "created_at" timestamp NOT NULL)[0m
|
61
|
+
[1m[35m (1.0ms)[0m [1m[34mSELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC[0m
|
62
|
+
[1m[36mActiveRecord::InternalMetadata Load (0.9ms)[0m [1m[34mSELECT "ar_internal_metadata".* FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = $1 LIMIT $2[0m [["key", "environment"], ["LIMIT", 1]]
|
63
|
+
[1m[36mActiveRecord::InternalMetadata Load (0.9ms)[0m [1m[34mSELECT "ar_internal_metadata".* FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = $1 LIMIT $2[0m [["key", "environment"], ["LIMIT", 1]]
|
64
|
+
[1m[36mActiveRecord::InternalMetadata Load (0.9ms)[0m [1m[34mSELECT "ar_internal_metadata".* FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = $1 LIMIT $2[0m [["key", "schema_sha1"], ["LIMIT", 1]]
|
65
|
+
[1m[35mSQL (0.8ms)[0m [1m[35mCREATE EXTENSION IF NOT EXISTS "plpgsql"[0m
|
66
|
+
[1m[35mSQL (0.8ms)[0m [1m[35mCREATE EXTENSION IF NOT EXISTS "uuid-ossp"[0m
|
67
|
+
[1m[35m (2.0ms)[0m [1m[35mDROP TABLE IF EXISTS "message_bus_processed_messages" CASCADE[0m
|
68
|
+
[1m[35m (4.0ms)[0m [1m[35mCREATE TABLE "message_bus_processed_messages" ("id" uuid NOT NULL PRIMARY KEY, "created_at" timestamp NOT NULL)[0m
|
69
|
+
[1m[35m (1.0ms)[0m [1m[34mSELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC[0m
|
70
|
+
[1m[36mActiveRecord::InternalMetadata Load (0.9ms)[0m [1m[34mSELECT "ar_internal_metadata".* FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = $1 LIMIT $2[0m [["key", "environment"], ["LIMIT", 1]]
|
71
|
+
[1m[35m (0.8ms)[0m [1m[35mBEGIN[0m
|
72
|
+
[1m[36mActiveRecord::InternalMetadata Update (1.5ms)[0m [1m[33mUPDATE "ar_internal_metadata" SET "value" = $1, "updated_at" = $2 WHERE "ar_internal_metadata"."key" = $3[0m [["value", "development"], ["updated_at", "2022-11-22 15:54:02.152053"], ["key", "environment"]]
|
73
|
+
[1m[35m (1.1ms)[0m [1m[35mCOMMIT[0m
|
74
|
+
[1m[36mActiveRecord::InternalMetadata Load (0.9ms)[0m [1m[34mSELECT "ar_internal_metadata".* FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = $1 LIMIT $2[0m [["key", "environment"], ["LIMIT", 1]]
|
75
|
+
[1m[35m (0.8ms)[0m [1m[35mBEGIN[0m
|
76
|
+
[1m[36mActiveRecord::InternalMetadata Update (2.1ms)[0m [1m[33mUPDATE "ar_internal_metadata" SET "value" = $1, "updated_at" = $2 WHERE "ar_internal_metadata"."key" = $3[0m [["value", "test"], ["updated_at", "2022-11-22 15:54:02.160153"], ["key", "environment"]]
|
77
|
+
[1m[35m (1.2ms)[0m [1m[35mCOMMIT[0m
|
78
|
+
[1m[36mActiveRecord::InternalMetadata Load (0.9ms)[0m [1m[34mSELECT "ar_internal_metadata".* FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = $1 LIMIT $2[0m [["key", "schema_sha1"], ["LIMIT", 1]]
|
79
|
+
[1m[35m (1.2ms)[0m [1m[34mSELECT pg_try_advisory_lock(5775182565276900090)[0m
|
80
|
+
[1m[35m (2.0ms)[0m [1m[34mSELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC[0m
|
81
|
+
[1m[36mActiveRecord::InternalMetadata Load (0.9ms)[0m [1m[34mSELECT "ar_internal_metadata".* FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = $1 LIMIT $2[0m [["key", "environment"], ["LIMIT", 1]]
|
82
|
+
[1m[35m (0.9ms)[0m [1m[34mSELECT pg_advisory_unlock(5775182565276900090)[0m
|
83
|
+
[1m[35m (1.7ms)[0m [1m[34mSELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC[0m
|