@@ -72,19 +72,14 @@ sqs_config =
7272 }
7373 end
7474
75- # Enable via_sqs_for_new_sinks? flag for HttpPushSink
76- config :sequin , Sequin.Consumers.HttpPushSink ,
77- via_sqs_for_new_sinks?: System . get_env ( "HTTP_PUSH_VIA_SQS_NEW_SINKS" ) in ~w( true 1)
78-
79- # Configure the SQS pipeline with credentials
80- config :sequin , Sequin.Runtime.HttpPushSqsPipeline ,
81- sqs: sqs_config ,
82- discards_disabled?: System . get_env ( "HTTP_PUSH_VIA_SQS_DISCARDS_DISABLED" ) in ~w( true 1)
83-
8475kafka_producer_compression =
8576 case System . get_env ( "KAFKA_PRODUCER_COMPRESSION" ) do
86- "lz4" -> :lz4
87- nil -> :no_compression
77+ "lz4" ->
78+ :lz4
79+
80+ nil ->
81+ :no_compression
82+
8883 other ->
8984 raise """
9085 Invalid value for KAFKA_PRODUCER_COMPRESSION: #{ inspect ( other ) }
@@ -94,23 +89,31 @@ kafka_producer_compression =
9489 """
9590 end
9691
97- config :sequin , Sequin.Consumers.KafkaSink ,
98- producer_compression: kafka_producer_compression
92+ # Enable via_sqs_for_new_sinks? flag for HttpPushSink
93+ config :sequin , Sequin.Consumers.HttpPushSink ,
94+ via_sqs_for_new_sinks?: System . get_env ( "HTTP_PUSH_VIA_SQS_NEW_SINKS" ) in ~w( true 1)
95+
96+ config :sequin , Sequin.Consumers.KafkaSink , producer_compression: kafka_producer_compression
97+
98+ # Configure the SQS pipeline with credentials
99+ config :sequin , Sequin.Runtime.HttpPushSqsPipeline ,
100+ sqs: sqs_config ,
101+ discards_disabled?: System . get_env ( "HTTP_PUSH_VIA_SQS_DISCARDS_DISABLED" ) in ~w( true 1)
99102
100103config :sequin , Sequin.Runtime.SlotProcessorServer ,
101104 max_accumulated_bytes: ConfigParser . replication_flush_max_accumulated_bytes ( env_vars ) ,
102105 max_accumulated_messages: ConfigParser . replication_flush_max_accumulated_messages ( env_vars ) ,
106+ # ## Using releases
107+ #
108+ # If you use `mix release`, you need to explicitly enable the server
109+ # by passing the PHX_SERVER=true when you start it:
110+ #
111+ # PHX_SERVER=true bin/sequin start
112+ #
113+ # Alternatively, you can use `mix phx.gen.release` to generate a `bin/server`
114+ # script that automatically sets the env var above.
103115 max_accumulated_messages_time_ms: ConfigParser . replication_flush_max_accumulated_time_ms ( env_vars )
104116
105- # ## Using releases
106- #
107- # If you use `mix release`, you need to explicitly enable the server
108- # by passing the PHX_SERVER=true when you start it:
109- #
110- # PHX_SERVER=true bin/sequin start
111- #
112- # Alternatively, you can use `mix phx.gen.release` to generate a `bin/server`
113- # script that automatically sets the env var above.
114117if System . get_env ( "PHX_SERVER" ) do
115118 config :sequin , SequinWeb.Endpoint , server: true
116119 config :sequin , SequinWeb.MetricsEndpoint , server: true
0 commit comments