Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: update sbmt-kafka_producer #3

Merged
merged 1 commit into from
Aug 29, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion quest/.dockerdev/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@ x-ruby: &ruby
tty: true
working_dir: ${WORK_DIR:-/app}
volumes:
- ../..:/gems:cached
- ..:/app:cached
- ${SBMT_RUBY_GEMS_PATH:-../..}:/gems:cached
- .psqlrc:/root/.psqlrc:ro
# We store Rails cache and gems in volumes to get speed up on Docker for Mac
- rails_cache:/app/tmp/cache
Expand Down
1 change: 1 addition & 0 deletions quest/.env
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
MALLOC_ARENA_MAX=2
RAILS_ENV=development
BACKTRACE=true
SENTRY_DSN=
AUTHORIZATION_SERVICE_HOST=
HEALTH_CHECK_PORT=8048
Expand Down
2 changes: 1 addition & 1 deletion quest/.rubocop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ inherit_gem:

AllCops:
TargetRubyVersion: 3.3
TargetRailsVersion: 7.1
TargetRailsVersion: 7.2
NewCops: enable
SuggestExtensions: false

Expand Down
185 changes: 92 additions & 93 deletions quest/Gemfile.lock
Original file line number Diff line number Diff line change
@@ -1,80 +1,76 @@
GEM
remote: https://rubygems.org/
specs:
actioncable (7.1.3.4)
actionpack (= 7.1.3.4)
activesupport (= 7.1.3.4)
actioncable (7.2.1)
actionpack (= 7.2.1)
activesupport (= 7.2.1)
nio4r (~> 2.0)
websocket-driver (>= 0.6.1)
zeitwerk (~> 2.6)
actionmailbox (7.1.3.4)
actionpack (= 7.1.3.4)
activejob (= 7.1.3.4)
activerecord (= 7.1.3.4)
activestorage (= 7.1.3.4)
activesupport (= 7.1.3.4)
mail (>= 2.7.1)
net-imap
net-pop
net-smtp
actionmailer (7.1.3.4)
actionpack (= 7.1.3.4)
actionview (= 7.1.3.4)
activejob (= 7.1.3.4)
activesupport (= 7.1.3.4)
mail (~> 2.5, >= 2.5.4)
net-imap
net-pop
net-smtp
actionmailbox (7.2.1)
actionpack (= 7.2.1)
activejob (= 7.2.1)
activerecord (= 7.2.1)
activestorage (= 7.2.1)
activesupport (= 7.2.1)
mail (>= 2.8.0)
actionmailer (7.2.1)
actionpack (= 7.2.1)
actionview (= 7.2.1)
activejob (= 7.2.1)
activesupport (= 7.2.1)
mail (>= 2.8.0)
rails-dom-testing (~> 2.2)
actionpack (7.1.3.4)
actionview (= 7.1.3.4)
activesupport (= 7.1.3.4)
actionpack (7.2.1)
actionview (= 7.2.1)
activesupport (= 7.2.1)
nokogiri (>= 1.8.5)
racc
rack (>= 2.2.4)
rack (>= 2.2.4, < 3.2)
rack-session (>= 1.0.1)
rack-test (>= 0.6.3)
rails-dom-testing (~> 2.2)
rails-html-sanitizer (~> 1.6)
actiontext (7.1.3.4)
actionpack (= 7.1.3.4)
activerecord (= 7.1.3.4)
activestorage (= 7.1.3.4)
activesupport (= 7.1.3.4)
useragent (~> 0.16)
actiontext (7.2.1)
actionpack (= 7.2.1)
activerecord (= 7.2.1)
activestorage (= 7.2.1)
activesupport (= 7.2.1)
globalid (>= 0.6.0)
nokogiri (>= 1.8.5)
actionview (7.1.3.4)
activesupport (= 7.1.3.4)
actionview (7.2.1)
activesupport (= 7.2.1)
builder (~> 3.1)
erubi (~> 1.11)
rails-dom-testing (~> 2.2)
rails-html-sanitizer (~> 1.6)
activejob (7.1.3.4)
activesupport (= 7.1.3.4)
activejob (7.2.1)
activesupport (= 7.2.1)
globalid (>= 0.3.6)
activemodel (7.1.3.4)
activesupport (= 7.1.3.4)
activerecord (7.1.3.4)
activemodel (= 7.1.3.4)
activesupport (= 7.1.3.4)
activemodel (7.2.1)
activesupport (= 7.2.1)
activerecord (7.2.1)
activemodel (= 7.2.1)
activesupport (= 7.2.1)
timeout (>= 0.4.0)
activestorage (7.1.3.4)
actionpack (= 7.1.3.4)
activejob (= 7.1.3.4)
activerecord (= 7.1.3.4)
activesupport (= 7.1.3.4)
activestorage (7.2.1)
actionpack (= 7.2.1)
activejob (= 7.2.1)
activerecord (= 7.2.1)
activesupport (= 7.2.1)
marcel (~> 1.0)
activesupport (7.1.3.4)
activesupport (7.2.1)
base64
bigdecimal
concurrent-ruby (~> 1.0, >= 1.0.2)
concurrent-ruby (~> 1.0, >= 1.3.1)
connection_pool (>= 2.2.5)
drb
i18n (>= 1.6, < 2)
logger (>= 1.4.2)
minitest (>= 5.1)
mutex_m
tzinfo (~> 2.0)
securerandom (>= 0.3)
tzinfo (~> 2.0, >= 2.0.5)
anyway_config (2.6.4)
ruby-next-core (~> 1.0)
ast (2.4.2)
Expand All @@ -84,7 +80,7 @@ GEM
bundler-audit (0.9.1)
bundler (>= 1.2.0, < 3)
thor (~> 1.0)
concurrent-ruby (1.3.1)
concurrent-ruby (1.3.4)
connection_pool (2.4.1)
crass (1.0.6)
cutoff (0.5.2)
Expand All @@ -98,7 +94,7 @@ GEM
dry-core (1.0.1)
concurrent-ruby (~> 1.0)
zeitwerk (~> 2.6)
dry-inflector (1.0.0)
dry-inflector (1.1.0)
dry-initializer (3.1.1)
dry-logic (1.5.0)
concurrent-ruby (~> 1.0)
Expand All @@ -120,7 +116,7 @@ GEM
dry-inflector (~> 1.0)
dry-logic (~> 1.4)
zeitwerk (~> 2.6)
erubi (1.12.0)
erubi (1.13.0)
et-orbi (1.2.11)
tzinfo
exponential-backoff (0.0.4)
Expand Down Expand Up @@ -171,15 +167,15 @@ GEM
concurrent-ruby (~> 1.0)
ice_nine (0.11.2)
io-console (0.7.2)
irb (1.13.1)
irb (1.14.0)
rdoc (>= 4.0.0)
reline (>= 0.4.2)
json (2.7.2)
jsonapi-serializer (2.2.0)
activesupport (>= 4.2)
karafka-core (2.4.0)
karafka-rdkafka (>= 0.15.0, < 0.16.0)
karafka-rdkafka (0.15.1)
karafka-core (2.4.4)
karafka-rdkafka (>= 0.15.0, < 0.18.0)
karafka-rdkafka (0.17.3)
ffi (~> 1.15)
mini_portile2 (~> 2.6)
rake (> 12)
Expand All @@ -188,6 +184,7 @@ GEM
listen (3.9.0)
rb-fsevent (~> 0.10, >= 0.10.3)
rb-inotify (~> 0.9, >= 0.9.10)
logger (1.6.0)
loofah (2.22.0)
crass (~> 1.0.2)
nokogiri (>= 1.12.0)
Expand All @@ -199,10 +196,9 @@ GEM
marcel (1.0.4)
mini_mime (1.1.5)
mini_portile2 (2.8.7)
minitest (5.23.1)
mutex_m (0.2.0)
minitest (5.25.1)
nanoid (2.0.0)
net-imap (0.4.12)
net-imap (0.4.15)
date
net-protocol
net-pop (0.1.2)
Expand All @@ -212,16 +208,16 @@ GEM
net-smtp (0.5.0)
net-protocol
nio4r (2.7.3)
nokogiri (1.16.5)
nokogiri (1.16.7)
mini_portile2 (~> 2.8.2)
racc (~> 1.4)
nokogiri (1.16.5-aarch64-linux)
nokogiri (1.16.7-aarch64-linux)
racc (~> 1.4)
nokogiri (1.16.5-arm64-darwin)
nokogiri (1.16.7-arm64-darwin)
racc (~> 1.4)
nokogiri (1.16.5-x86_64-darwin)
nokogiri (1.16.7-x86_64-darwin)
racc (~> 1.4)
nokogiri (1.16.5-x86_64-linux)
nokogiri (1.16.7-x86_64-linux)
racc (~> 1.4)
parallel (1.24.0)
parser (3.3.2.0)
Expand All @@ -243,7 +239,7 @@ GEM
puma (6.4.2)
nio4r (~> 2.0)
raabro (1.4.0)
racc (1.8.0)
racc (1.8.1)
rack (2.2.9)
rack-session (1.0.2)
rack (< 3)
Expand All @@ -252,20 +248,20 @@ GEM
rackup (1.0.0)
rack (< 3)
webrick
rails (7.1.3.4)
actioncable (= 7.1.3.4)
actionmailbox (= 7.1.3.4)
actionmailer (= 7.1.3.4)
actionpack (= 7.1.3.4)
actiontext (= 7.1.3.4)
actionview (= 7.1.3.4)
activejob (= 7.1.3.4)
activemodel (= 7.1.3.4)
activerecord (= 7.1.3.4)
activestorage (= 7.1.3.4)
activesupport (= 7.1.3.4)
rails (7.2.1)
actioncable (= 7.2.1)
actionmailbox (= 7.2.1)
actionmailer (= 7.2.1)
actionpack (= 7.2.1)
actiontext (= 7.2.1)
actionview (= 7.2.1)
activejob (= 7.2.1)
activemodel (= 7.2.1)
activerecord (= 7.2.1)
activestorage (= 7.2.1)
activesupport (= 7.2.1)
bundler (>= 1.15.0)
railties (= 7.1.3.4)
railties (= 7.2.1)
rails-dom-testing (2.2.0)
activesupport (>= 5.0.0)
minitest
Expand All @@ -280,10 +276,10 @@ GEM
rack
railties (>= 5.1)
semantic_logger (~> 4.13)
railties (7.1.3.4)
actionpack (= 7.1.3.4)
activesupport (= 7.1.3.4)
irb
railties (7.2.1)
actionpack (= 7.2.1)
activesupport (= 7.2.1)
irb (~> 1.13)
rackup (>= 1.0.0)
rake (>= 12.2)
thor (~> 1.0, >= 1.2.2)
Expand All @@ -303,7 +299,7 @@ GEM
redlock (2.0.6)
redis-client (>= 0.14.1, < 1.0.0)
regexp_parser (2.9.2)
reline (0.5.8)
reline (0.5.9)
io-console (~> 0.5)
rexml (3.2.8)
strscan (>= 3.0.9)
Expand Down Expand Up @@ -368,15 +364,15 @@ GEM
ruby-progressbar (1.13.0)
rufus-scheduler (3.9.1)
fugit (~> 1.1, >= 1.1.6)
sbmt-kafka_producer (2.2.1)
sbmt-kafka_producer (3.0.0)
anyway_config (~> 2.4)
connection_pool
connection_pool (~> 2.0)
dry-initializer (~> 3.0)
dry-struct
waterdrop (~> 2.5, < 2.7)
yabeda (>= 0.11)
dry-struct (~> 1.5)
waterdrop (~> 2.7, < 2.8)
yabeda (~> 0.11)
zeitwerk (~> 2.6)
sbmt-outbox (6.5.0)
sbmt-outbox (6.6.0)
connection_pool (~> 2.0)
cutoff (~> 0.5)
dry-initializer (~> 3.0)
Expand All @@ -394,6 +390,7 @@ GEM
redlock (> 1.0, < 3.0)
rufus-scheduler (~> 3.0)
thor
securerandom (0.3.1)
semantic_logger (4.15.0)
concurrent-ruby (~> 1.0)
sentry-rails (5.17.3)
Expand Down Expand Up @@ -427,7 +424,7 @@ GEM
standard-performance (1.4.0)
lint_roller (~> 1.1)
rubocop-performance (~> 1.21.0)
stringio (3.1.0)
stringio (3.1.1)
strong_migrations (1.8.0)
activerecord (>= 5.2)
strscan (3.1.0)
Expand All @@ -437,8 +434,10 @@ GEM
tzinfo (2.0.6)
concurrent-ruby (~> 1.0)
unicode-display_width (2.5.0)
waterdrop (2.6.14)
karafka-core (>= 2.2.3, < 3.0.0)
useragent (0.16.10)
waterdrop (2.7.4)
karafka-core (>= 2.4.3, < 3.0.0)
karafka-rdkafka (>= 0.15.1)
zeitwerk (~> 2.3)
webrick (1.8.1)
websocket-driver (0.7.6)
Expand Down Expand Up @@ -473,7 +472,7 @@ GEM
anyway_config (>= 1.3, < 3)
sidekiq
yabeda (~> 0.6)
zeitwerk (2.6.15)
zeitwerk (2.6.17)

PLATFORMS
aarch64-linux
Expand Down
10 changes: 5 additions & 5 deletions quest/config/kafka_producer.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,7 @@ default: &default
deliver: true
wait_on_queue_full: true
max_payload_size: 1000012
max_wait_timeout: 5
wait_timeout: 0.005
max_wait_timeout: 60000
ignore_kafka_error: <%= ENV.fetch('QUEST__KAFKA__IGNORE_KAFKA_ERRORS') { 'true' } %>
auth:
kind: 'sasl_plaintext'
Expand All @@ -14,9 +13,10 @@ default: &default
servers: <%= ENV.fetch('BROKER_URL'){ 'localhost:9092' } %>
max_retries: <%= ENV.fetch('QUEST__KAFKA__PRODUCER__MAX_RETRIES') { 2 }%>
required_acks: <%= ENV.fetch('QUEST__KAFKA__PRODUCER_REQUIRED_ACKS') { -1 }%>
ack_timeout: <%= ENV.fetch('QUEST__KAFKA__PRODUCER_ACK_TIMEOUT') { 1 }%>
retry_backoff: <%= ENV.fetch('QUEST__KAFKA__PRODUCER_RETRY_BACKOFF') { 1 }%>
connect_timeout: <%= ENV.fetch('QUEST__KAFKA__PRODUCER_CONNECT_TIMEOUT') { 1 }%>
ack_timeout: <%= ENV.fetch('QUEST__KAFKA__PRODUCER_ACK_TIMEOUT') { 1000 }%>
retry_backoff: <%= ENV.fetch('QUEST__KAFKA__PRODUCER_RETRY_BACKOFF') { 1000 }%>
connect_timeout: <%= ENV.fetch('QUEST__KAFKA__PRODUCER_CONNECT_TIMEOUT') { 2000 }%>
message_timeout: <%= ENV.fetch('SEEKER__KAFKA__PRODUCER_MESSAGE_TIMEOUT') { 55000 }%>
development:
<<: *default
auth:
Expand Down
Loading
Loading