Class: Karafka::Pro::RecurringTasks::Deserializer
- Inherits:
-
Object
- Object
- Karafka::Pro::RecurringTasks::Deserializer
- Defined in:
- lib/karafka/pro/recurring_tasks/deserializer.rb
Overview
Note:
We use symbolize_names
because we want to use the same convention of hash building for producing, consuming and displaying related data as in other places.
Recurring Tasks data deserializer. We compress data ourselves because we cannot rely on any external optional features like certain compression types, etc. By doing this that way we can ensure we have full control over the compression.
Instance Method Summary collapse
-
#call(message) ⇒ Hash
Deserialized data.
Instance Method Details
#call(message) ⇒ Hash
Returns deserialized data.
26 27 28 29 30 31 |
# File 'lib/karafka/pro/recurring_tasks/deserializer.rb', line 26 def call() ::JSON.parse( Zlib::Inflate.inflate(.raw_payload), symbolize_names: true ) end |