Class: Dionysus::Producer::Config
- Inherits:
-
Object
- Object
- Dionysus::Producer::Config
- Defined in:
- lib/dionysus/producer/config.rb
Instance Attribute Summary collapse
-
#database_connection_provider ⇒ Object
Returns the value of attribute database_connection_provider.
-
#datadog_statsd_client ⇒ Object
Returns the value of attribute datadog_statsd_client.
- #default_partition_key ⇒ Object
- #error_handler ⇒ Object
- #event_bus ⇒ Object
- #genesis_consistency_safety_delay ⇒ Object
- #hermes_event_producer ⇒ Object
- #high_priority_sidekiq_queue ⇒ Object
-
#include_serialized_at_in_payload ⇒ Object
Off by default so consumers, which fall back to the offset when the field is absent, can be rolled out first.
- #instrumenter ⇒ Object
- #lock_client ⇒ Object
- #lock_expiry_time ⇒ Object
- #observers_inline_maximum_size ⇒ Object
-
#outbox_model ⇒ Object
Returns the value of attribute outbox_model.
- #outbox_publishing_batch_size ⇒ Object
- #outbox_worker_publishing_delay ⇒ Object
- #outbox_worker_sleep_seconds ⇒ Object
- #publish_after_commit ⇒ Object
-
#publish_with_uncached_reads ⇒ Object
Off by default so it can be switched on per producer, and switched back off in one env change if the extra reads ever cost more than they are worth.
- #publisher_service_name ⇒ Object
-
#registry ⇒ Object
Returns the value of attribute registry.
- #remove_consecutive_duplicates_before_publishing ⇒ Object
- #sidekiq_queue ⇒ Object
- #soft_delete_column ⇒ Object
-
#transaction_provider ⇒ Object
Returns the value of attribute transaction_provider.
- #transactional_outbox_enabled ⇒ Object
Class Method Summary collapse
Instance Attribute Details
#database_connection_provider ⇒ Object
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_client ⇒ Object
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_key ⇒ Object
34 35 36 |
# File 'lib/dionysus/producer/config.rb', line 34 def default_partition_key @default_partition_key || :account_id end |
#error_handler ⇒ Object
52 53 54 |
# File 'lib/dionysus/producer/config.rb', line 52 def error_handler @error_handler || Dionysus::Utils::NullErrorHandler end |
#event_bus ⇒ Object
26 27 28 |
# File 'lib/dionysus/producer/config.rb', line 26 def event_bus @event_bus || Dionysus::Utils::NullEventBus end |
#genesis_consistency_safety_delay ⇒ Object
74 75 76 |
# File 'lib/dionysus/producer/config.rb', line 74 def genesis_consistency_safety_delay @genesis_consistency_safety_delay || 60.seconds end |
#hermes_event_producer ⇒ Object
78 79 80 |
# File 'lib/dionysus/producer/config.rb', line 78 def hermes_event_producer @hermes_event_producer || Dionysus::Utils::NullHermesEventProducer end |
#high_priority_sidekiq_queue ⇒ Object
92 93 94 |
# File 'lib/dionysus/producer/config.rb', line 92 def high_priority_sidekiq_queue @high_priority_sidekiq_queue || self.class.high_priority_sidekiq_queue end |
#include_serialized_at_in_payload ⇒ Object
Off by default so consumers, which fall back to the offset when the field is absent, can be rolled out first.
110 111 112 113 114 |
# File 'lib/dionysus/producer/config.rb', line 110 def include_serialized_at_in_payload return @include_serialized_at_in_payload if defined?(@include_serialized_at_in_payload) false end |
#instrumenter ⇒ Object
22 23 24 |
# File 'lib/dionysus/producer/config.rb', line 22 def instrumenter @instrumenter || Dionysus::Utils::NullInstrumenter end |
#lock_client ⇒ Object
44 45 46 |
# File 'lib/dionysus/producer/config.rb', line 44 def lock_client @lock_client || Dionysus::Utils::NullLockClient end |
#lock_expiry_time ⇒ Object
48 49 50 |
# File 'lib/dionysus/producer/config.rb', line 48 def lock_expiry_time @lock_expiry_time || 10_000 end |
#observers_inline_maximum_size ⇒ Object
96 97 98 |
# File 'lib/dionysus/producer/config.rb', line 96 def observers_inline_maximum_size @observers_inline_maximum_size || 1000 end |
#outbox_model ⇒ Object
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_size ⇒ Object
56 57 58 |
# File 'lib/dionysus/producer/config.rb', line 56 def outbox_publishing_batch_size @outbox_publishing_batch_size || 100 end |
#outbox_worker_publishing_delay ⇒ Object
88 89 90 |
# File 'lib/dionysus/producer/config.rb', line 88 def outbox_worker_publishing_delay (@outbox_worker_publishing_delay || 0).to_d.seconds end |
#outbox_worker_sleep_seconds ⇒ Object
38 39 40 41 42 |
# File 'lib/dionysus/producer/config.rb', line 38 def outbox_worker_sleep_seconds return BigDecimal("0.2") if @outbox_worker_sleep_seconds.nil? @outbox_worker_sleep_seconds.to_d end |
#publish_after_commit ⇒ Object
82 83 84 85 86 |
# File 'lib/dionysus/producer/config.rb', line 82 def publish_after_commit return @publish_after_commit if defined?(@publish_after_commit) false end |
#publish_with_uncached_reads ⇒ Object
Off by default so it can be switched on per producer, and switched back off in one env change if the extra reads ever cost more than they are worth.
102 103 104 105 106 |
# File 'lib/dionysus/producer/config.rb', line 102 def publish_with_uncached_reads return @publish_with_uncached_reads if defined?(@publish_with_uncached_reads) false end |
#publisher_service_name ⇒ Object
70 71 72 |
# File 'lib/dionysus/producer/config.rb', line 70 def publisher_service_name @publisher_service_name || Karafka.producer.id end |
#registry ⇒ Object
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_publishing ⇒ Object
116 117 118 119 120 |
# File 'lib/dionysus/producer/config.rb', line 116 def remove_consecutive_duplicates_before_publishing return @remove_consecutive_duplicates_before_publishing if defined?(@remove_consecutive_duplicates_before_publishing) false end |
#sidekiq_queue ⇒ Object
66 67 68 |
# File 'lib/dionysus/producer/config.rb', line 66 def sidekiq_queue @sidekiq_queue || self.class.default_sidekiq_queue end |
#soft_delete_column ⇒ Object
30 31 32 |
# File 'lib/dionysus/producer/config.rb', line 30 def soft_delete_column @soft_delete_column || "canceled_at" end |
#transaction_provider ⇒ Object
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_enabled ⇒ Object
60 61 62 63 64 |
# File 'lib/dionysus/producer/config.rb', line 60 def transactional_outbox_enabled return @transactional_outbox_enabled if defined?(@transactional_outbox_enabled) true end |
Class Method Details
.default_sidekiq_queue ⇒ Object
14 15 16 |
# File 'lib/dionysus/producer/config.rb', line 14 def self.default_sidekiq_queue :dionysus end |
.high_priority_sidekiq_queue ⇒ Object
18 19 20 |
# File 'lib/dionysus/producer/config.rb', line 18 def self.high_priority_sidekiq_queue :dionysus_high_priority end |