sbmt-kafka_producer 2.1.0 → 2.2.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 426c17a9e1adcdb138988d2a2b5721556f0740f37b284d805fdb7c5c230488c6
4
- data.tar.gz: 7252b48e77ad609bbcabf45c84c8fc57de44532975e899dc2bcb96ecc696c83d
3
+ metadata.gz: 4f2c9bec545e5dd939135a388d69acd38c4adfbc65c5d0f9db1cfc94d5431290
4
+ data.tar.gz: 77d7376225e878c89499bb19bea8cd87230b247a4b238856fc2724101872a9f8
5
5
  SHA512:
6
- metadata.gz: 0f8c5a811b2fb7b393d595b865ecdb380c6e1dbd73f9dd48805de791d86e1dff212442b141d703c32fd37f8bf1bb5587245ac37961ddc9a9185834cb539b8a35
7
- data.tar.gz: b659ad4c35ea544d9658d1385825c5b7485990585058d25dcc515a35b3b7a9ff7c532fa1236bcffa117089a5101a41b2e2b0293a3ce204822896becd675b8bde
6
+ metadata.gz: 9fb93062edacf5150ad961b79031acdbc4adcf7cf823563014b041bd69e78cb988caf46b107b5f27c6fb0eafdc8d460da2b88c3279786aedf7534a3ad4febfb2
7
+ data.tar.gz: 11cc83bda4221bac3b65be54606d75dbb2c1acc7e55d6cb41012207ad78fc6715d1bdc3fc8da58ff1bd45d339bdfc2a77167bc7af7115c005d0aa9dd77e536ae
data/CHANGELOG.md CHANGED
@@ -13,6 +13,12 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
13
13
 
14
14
  ### Fixed
15
15
 
16
+ ## [2.2.0] - 2024-04-12
17
+
18
+ ### Changed
19
+
20
+ - Add logs with `offset`.
21
+
16
22
  ## [2.1.0] - 2024-03-14
17
23
 
18
24
  ### Changed
@@ -9,9 +9,10 @@ module Sbmt
9
9
  option :topic
10
10
 
11
11
  def sync_publish!(payload, options = {})
12
- around_publish do
12
+ report = around_publish do
13
13
  client.produce_sync(payload: payload, **options.merge(topic: topic))
14
14
  end
15
+ log_success(report)
15
16
  true
16
17
  end
17
18
 
@@ -81,6 +82,10 @@ module Sbmt
81
82
  ErrorTracker.error(error)
82
83
  end
83
84
 
85
+ def log_success(report)
86
+ logger.info "Message has been successfully sent to Kafka - topic: #{report.topic_name}, partition: #{report.partition}, offset: #{report.offset}"
87
+ end
88
+
84
89
  def format_exception_error(error)
85
90
  text = "#{format_exception_error(error.cause)}. " if with_cause?(error)
86
91
 
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Sbmt
4
4
  module KafkaProducer
5
- VERSION = "2.1.0"
5
+ VERSION = "2.2.0"
6
6
  end
7
7
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sbmt-kafka_producer
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.1.0
4
+ version: 2.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Sbermarket Ruby-Platform Team
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2024-03-29 00:00:00.000000000 Z
11
+ date: 2024-04-16 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: anyway_config