nulogy_message_bus_consumer 0.3.2 → 0.3.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/config/credentials/message-bus-us-east-1.key +1 -0
- data/config/credentials/message-bus-us-east-1.yml.enc +1 -0
- data/lib/nulogy_message_bus_consumer/steps/commit_on_success.rb +2 -1
- data/lib/nulogy_message_bus_consumer/steps/connect_to_message_bus.rb +1 -0
- data/lib/nulogy_message_bus_consumer/version.rb +1 -1
- data/lib/tasks/engine/message_bus_consumer.rake +7 -8
- metadata +34 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c47fb7fab95cd7d64e9654c0ce43fec64f77f8718331f8028afc6c18ab993f81
|
4
|
+
data.tar.gz: 3c656a7dea18d149f04ccfbc3dc4db04e9aa7b3cd6183be7b0a1a45337c3a975
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 04320f62a752bcfcc4bad93bd0611ba0f8945018dfb1680016ab739b70ba66cb7ebcf5062fb12f316745e59386714613c44f17f7feea4006a56b8625da119e23
|
7
|
+
data.tar.gz: c480ced5fb50feeb8d655cb8c0b45c19a12bd733088db6fe4bf78ce33d08a7051594eb86a011227d2cc1363ea058e1544435c318824a6c9549be2e32fb6f65ef
|
@@ -0,0 +1 @@
|
|
1
|
+
dfa19863b2709390893da4c2fb85579a
|
@@ -0,0 +1 @@
|
|
1
|
+
/WXdqUYePaHqAq3P0iTEsrLiMfRKzp2qYYh7K+q6LUNgi4eHNv0+SoLdI1bUNb9UaGvDPGNT3fCwAdkurk5Iud16ok3b4wD6yZ7UkfqbXqZaKH/dciQ5s63p9Hiuq1rbfcqoZ3KR1SXYAwvy8vNqbdwbAzz2N66B1wE5fNibZZlrWzXJjLReiTcNyxNbCPz6vwEwFF52RntuYlIJo4Nkm8vEk3No+HWrOkM8xptr5qApbd+RowLCLZ4/kcAMDB/XPiGobf0AOFv1NUR/9ChEy20usa8Fqd6HtEn4A25HnAC0uaN0K8ZRXjxhMpnXtfMBItn7yxyJ1ubjRZK5a1xVBRU7L/CVV9ZuIsqAHL1++gH5FBrEe83ZIUhN7AzngMDlOPKGiCLiZLrm18I1AEQrD7tJLyXos15AeAzj--cER8cN0iMLwu8Le+--FL7dhMTgr6xL6SkMnYKmeg==
|
@@ -1,12 +1,13 @@
|
|
1
1
|
module NulogyMessageBusConsumer
|
2
2
|
module Steps
|
3
3
|
class CommitOnSuccess
|
4
|
-
def call(kafka_consumer:, **_)
|
4
|
+
def call(kafka_consumer:, message:, **_)
|
5
5
|
result = yield
|
6
6
|
|
7
7
|
raise_if_invalid(result)
|
8
8
|
|
9
9
|
if result == :success
|
10
|
+
kafka_consumer.store_offset(message)
|
10
11
|
kafka_consumer.commit
|
11
12
|
else
|
12
13
|
reconnect_to_reprocess_same_message(kafka_consumer)
|
@@ -1,16 +1,15 @@
|
|
1
1
|
namespace :message_bus_consumer do
|
2
2
|
desc "Verifies that the messages in the message bus have been processed"
|
3
3
|
task audit: :environment do
|
4
|
-
|
4
|
+
logger = Rails.logger
|
5
|
+
config = NulogyMessageBusConsumer::Config.new(
|
6
|
+
consumer_group_id: ENV.fetch("MB_AUDIT_GROUP"),
|
7
|
+
bootstrap_servers: ENV.fetch("MB_BOOTSTRAP_SERVERS"),
|
8
|
+
topic_name: ENV.fetch("MB_CONSUMER_TOPIC")
|
9
|
+
)
|
5
10
|
|
6
11
|
NulogyMessageBusConsumer
|
7
|
-
.consumer_audit_pipeline(config: config)
|
12
|
+
.consumer_audit_pipeline(config: config, logger: logger)
|
8
13
|
.invoke
|
9
14
|
end
|
10
|
-
|
11
|
-
def build_audit_config
|
12
|
-
audit_config = NulogyMessageBusConsumer.config.dup
|
13
|
-
audit_config.consumer_group_id = "#{audit_config.consumer_group_id}_consumer_audit"
|
14
|
-
NulogyMessageBusConsumer.config
|
15
|
-
end
|
16
15
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: nulogy_message_bus_consumer
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.3.
|
4
|
+
version: 0.3.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Nulogy
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-
|
11
|
+
date: 2020-12-02 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activerecord
|
@@ -52,6 +52,34 @@ dependencies:
|
|
52
52
|
- - ">="
|
53
53
|
- !ruby/object:Gem::Version
|
54
54
|
version: '0'
|
55
|
+
- !ruby/object:Gem::Dependency
|
56
|
+
name: bundler-audit
|
57
|
+
requirement: !ruby/object:Gem::Requirement
|
58
|
+
requirements:
|
59
|
+
- - '='
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: 0.7.0.1
|
62
|
+
type: :development
|
63
|
+
prerelease: false
|
64
|
+
version_requirements: !ruby/object:Gem::Requirement
|
65
|
+
requirements:
|
66
|
+
- - '='
|
67
|
+
- !ruby/object:Gem::Version
|
68
|
+
version: 0.7.0.1
|
69
|
+
- !ruby/object:Gem::Dependency
|
70
|
+
name: dotenv
|
71
|
+
requirement: !ruby/object:Gem::Requirement
|
72
|
+
requirements:
|
73
|
+
- - '='
|
74
|
+
- !ruby/object:Gem::Version
|
75
|
+
version: 2.7.6
|
76
|
+
type: :development
|
77
|
+
prerelease: false
|
78
|
+
version_requirements: !ruby/object:Gem::Requirement
|
79
|
+
requirements:
|
80
|
+
- - '='
|
81
|
+
- !ruby/object:Gem::Version
|
82
|
+
version: 2.7.6
|
55
83
|
- !ruby/object:Gem::Dependency
|
56
84
|
name: pg
|
57
85
|
requirement: !ruby/object:Gem::Requirement
|
@@ -100,14 +128,14 @@ dependencies:
|
|
100
128
|
requirements:
|
101
129
|
- - '='
|
102
130
|
- !ruby/object:Gem::Version
|
103
|
-
version: 6.0.3
|
131
|
+
version: 6.0.3.1
|
104
132
|
type: :development
|
105
133
|
prerelease: false
|
106
134
|
version_requirements: !ruby/object:Gem::Requirement
|
107
135
|
requirements:
|
108
136
|
- - '='
|
109
137
|
- !ruby/object:Gem::Version
|
110
|
-
version: 6.0.3
|
138
|
+
version: 6.0.3.1
|
111
139
|
- !ruby/object:Gem::Dependency
|
112
140
|
name: rake-release
|
113
141
|
requirement: !ruby/object:Gem::Requirement
|
@@ -214,6 +242,8 @@ extensions: []
|
|
214
242
|
extra_rdoc_files: []
|
215
243
|
files:
|
216
244
|
- Rakefile
|
245
|
+
- config/credentials/message-bus-us-east-1.key
|
246
|
+
- config/credentials/message-bus-us-east-1.yml.enc
|
217
247
|
- config/routes.rb
|
218
248
|
- db/migrate/20200509095105_create_message_bus_processed_messages.rb
|
219
249
|
- lib/nulogy_message_bus_consumer.rb
|