Class: Dionysus::Producer::Config

Inherits:
Object
  • Object
show all
Defined in:
lib/dionysus/producer/config.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Attribute Details

#database_connection_providerObject

Returns the value of attribute database_connection_provider.



4
5
6
# File 'lib/dionysus/producer/config.rb', line 4

def database_connection_provider
  @database_connection_provider
end

#datadog_statsd_clientObject

Returns the value of attribute datadog_statsd_client.



4
5
6
# File 'lib/dionysus/producer/config.rb', line 4

def datadog_statsd_client
  @datadog_statsd_client
end

#default_partition_keyObject



33
34
35
# File 'lib/dionysus/producer/config.rb', line 33

def default_partition_key
  @default_partition_key || :account_id
end

#error_handlerObject



51
52
53
# File 'lib/dionysus/producer/config.rb', line 51

def error_handler
  @error_handler || Dionysus::Utils::NullErrorHandler
end

#event_busObject



25
26
27
# File 'lib/dionysus/producer/config.rb', line 25

def event_bus
  @event_bus || Dionysus::Utils::NullEventBus
end

#genesis_consistency_safety_delayObject



73
74
75
# File 'lib/dionysus/producer/config.rb', line 73

def genesis_consistency_safety_delay
  @genesis_consistency_safety_delay || 60.seconds
end

#hermes_event_producerObject



77
78
79
# File 'lib/dionysus/producer/config.rb', line 77

def hermes_event_producer
  @hermes_event_producer || Dionysus::Utils::NullHermesEventProducer
end

#high_priority_sidekiq_queueObject



91
92
93
# File 'lib/dionysus/producer/config.rb', line 91

def high_priority_sidekiq_queue
  @high_priority_sidekiq_queue || self.class.high_priority_sidekiq_queue
end

#instrumenterObject



21
22
23
# File 'lib/dionysus/producer/config.rb', line 21

def instrumenter
  @instrumenter || Dionysus::Utils::NullInstrumenter
end

#lock_clientObject



43
44
45
# File 'lib/dionysus/producer/config.rb', line 43

def lock_client
  @lock_client || Dionysus::Utils::NullLockClient
end

#lock_expiry_timeObject



47
48
49
# File 'lib/dionysus/producer/config.rb', line 47

def lock_expiry_time
  @lock_expiry_time || 10_000
end

#observers_inline_maximum_sizeObject



95
96
97
# File 'lib/dionysus/producer/config.rb', line 95

def observers_inline_maximum_size
  @observers_inline_maximum_size || 1000
end

#outbox_modelObject

Returns the value of attribute outbox_model.



4
5
6
# File 'lib/dionysus/producer/config.rb', line 4

def outbox_model
  @outbox_model
end

#outbox_publishing_batch_sizeObject



55
56
57
# File 'lib/dionysus/producer/config.rb', line 55

def outbox_publishing_batch_size
  @outbox_publishing_batch_size || 100
end

#outbox_worker_publishing_delayObject



87
88
89
# File 'lib/dionysus/producer/config.rb', line 87

def outbox_worker_publishing_delay
  (@outbox_worker_publishing_delay || 0).to_d.seconds
end

#outbox_worker_sleep_secondsObject



37
38
39
40
41
# File 'lib/dionysus/producer/config.rb', line 37

def outbox_worker_sleep_seconds
  return BigDecimal("0.2") if @outbox_worker_sleep_seconds.nil?

  @outbox_worker_sleep_seconds.to_d
end

#publish_after_commitObject



81
82
83
84
85
# File 'lib/dionysus/producer/config.rb', line 81

def publish_after_commit
  return @publish_after_commit if defined?(@publish_after_commit)

  false
end

#publisher_service_nameObject



69
70
71
# File 'lib/dionysus/producer/config.rb', line 69

def publisher_service_name
  @publisher_service_name || Karafka.producer.id
end

#registryObject

Returns the value of attribute registry.



4
5
6
# File 'lib/dionysus/producer/config.rb', line 4

def registry
  @registry
end

#remove_consecutive_duplicates_before_publishingObject



99
100
101
102
103
# File 'lib/dionysus/producer/config.rb', line 99

def remove_consecutive_duplicates_before_publishing
  return @remove_consecutive_duplicates_before_publishing if defined?(@remove_consecutive_duplicates_before_publishing)

  false
end

#sidekiq_queueObject



65
66
67
# File 'lib/dionysus/producer/config.rb', line 65

def sidekiq_queue
  @sidekiq_queue || self.class.default_sidekiq_queue
end

#soft_delete_columnObject



29
30
31
# File 'lib/dionysus/producer/config.rb', line 29

def soft_delete_column
  @soft_delete_column || "canceled_at"
end

#transaction_providerObject

Returns the value of attribute transaction_provider.



4
5
6
# File 'lib/dionysus/producer/config.rb', line 4

def transaction_provider
  @transaction_provider
end

#transactional_outbox_enabledObject



59
60
61
62
63
# File 'lib/dionysus/producer/config.rb', line 59

def transactional_outbox_enabled
  return @transactional_outbox_enabled if defined?(@transactional_outbox_enabled)

  true
end

Class Method Details

.default_sidekiq_queueObject



13
14
15
# File 'lib/dionysus/producer/config.rb', line 13

def self.default_sidekiq_queue
  :dionysus
end

.high_priority_sidekiq_queueObject



17
18
19
# File 'lib/dionysus/producer/config.rb', line 17

def self.high_priority_sidekiq_queue
  :dionysus_high_priority
end