Class: DeliveryBoy::Config
- Inherits:
-
KingKonf::Config
- Object
- KingKonf::Config
- DeliveryBoy::Config
- Defined in:
- lib/delivery_boy/config.rb
Instance Attribute Summary collapse
-
#sasl_oauth_token_provider ⇒ Object
SASL OAUTHBEARER (legacy - callback-based, not supported with librdkafka).
Instance Method Summary collapse
- #ack_timeout_ms ⇒ Object
- #connection_timeout_ms ⇒ Object
- #delivery_interval_ms ⇒ Object
- #max_buffer_kbytesize ⇒ Object
- #retry_backoff_ms ⇒ Object
- #sasl_enabled? ⇒ Boolean
- #socket_timeout_ms ⇒ Object
- #transactional_timeout_ms ⇒ Object
- #validate_aws_msk_iam! ⇒ Object
Instance Attribute Details
#sasl_oauth_token_provider ⇒ Object
SASL OAUTHBEARER (legacy - callback-based, not supported with librdkafka)
116 117 118 |
# File 'lib/delivery_boy/config.rb', line 116 def sasl_oauth_token_provider @sasl_oauth_token_provider end |
Instance Method Details
#ack_timeout_ms ⇒ Object
27 28 29 |
# File 'lib/delivery_boy/config.rb', line 27 def ack_timeout_ms ack_timeout * 1000 end |
#connection_timeout_ms ⇒ Object
7 8 9 |
# File 'lib/delivery_boy/config.rb', line 7 def connection_timeout_ms connect_timeout * 1000 end |
#delivery_interval_ms ⇒ Object
23 24 25 |
# File 'lib/delivery_boy/config.rb', line 23 def delivery_interval_ms delivery_interval * 1000 end |
#max_buffer_kbytesize ⇒ Object
19 20 21 |
# File 'lib/delivery_boy/config.rb', line 19 def max_buffer_kbytesize max_buffer_bytesize / 1024 end |
#retry_backoff_ms ⇒ Object
31 32 33 |
# File 'lib/delivery_boy/config.rb', line 31 def retry_backoff_ms retry_backoff * 1000 end |
#sasl_enabled? ⇒ Boolean
35 36 37 38 |
# File 'lib/delivery_boy/config.rb', line 35 def sasl_enabled? return false unless sasl_mechanism && !sasl_mechanism.empty? sasl_mechanism.upcase != "GSSAPI" end |
#socket_timeout_ms ⇒ Object
11 12 13 |
# File 'lib/delivery_boy/config.rb', line 11 def socket_timeout_ms socket_timeout * 1000 end |
#transactional_timeout_ms ⇒ Object
15 16 17 |
# File 'lib/delivery_boy/config.rb', line 15 def transactional_timeout_ms transactional_timeout * 1000 end |
#validate_aws_msk_iam! ⇒ Object
40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 |
# File 'lib/delivery_boy/config.rb', line 40 def validate_aws_msk_iam! if sasl_aws_msk_iam_access_key_id || sasl_aws_msk_iam_secret_key_id || sasl_aws_msk_iam_aws_region raise ConfigError, <<~ERROR AWS MSK IAM authentication is not supported by librdkafka. Alternatives: 1. Use AWS MSK SCRAM-SHA-512 authentication (recommended) - Create SCRAM credentials in AWS Secrets Manager - Set sasl_mechanism = "SCRAM-SHA-512" - Set sasl_username and sasl_password 2. Use mTLS (mutual TLS) with client certificates - Configure ssl_client_cert and ssl_client_cert_key See migration guide: https://github.com/zendesk/delivery_boy/blob/master/MIGRATION.md#aws-msk-iam ERROR end end |