Class: Karafka::Web::Deserializer
- Inherits:
-
Object
- Object
- Karafka::Web::Deserializer
- Defined in:
- lib/karafka/web/deserializer.rb
Overview
Note:
We use symbolize_names
because we want to use the same convention of hash building for producing, consuming and displaying metrics related data
Note:
We have to check if we compress the data, because older Web-UI versions were not compressing the payload.
Web reporting deserializer
Instance Method Summary collapse
-
#call(message) ⇒ Object
Deserialized data.
Instance Method Details
#call(message) ⇒ Object
Returns deserialized data.
15 16 17 18 19 20 21 22 23 24 25 26 |
# File 'lib/karafka/web/deserializer.rb', line 15 def call() raw_payload = if .headers.key?('zlib') Zlib::Inflate.inflate(.raw_payload) else .raw_payload end ::JSON.parse( raw_payload, symbolize_names: true ) end |