Issue with defining two influxdb connection module[help]

hello friends

  1. i am defining two config for influxdb connection
  2. and defining two instream connection module
config :my_app, Mymodule.InfluxConnection, --> first config 
  database:  "price_service",
  host: "localhost",
  pool: [max_overflow: 10, size: 50],
  port: 8086,
  scheme: "http",
  writer: Instream.Writer.Line

config :my_app, Mymodule.InfluxReplicaConnection, --> second config
  database:  "price_service_replica",
  host: "localhost",
  pool: [max_overflow: 10, size: 50],
  port: 8086,
  scheme: "http",
  writer: Instream.Writer.Line


defmodule Mymodule.InfluxConnection do
  use Instream.Connection, otp_app: :my_app
  def safe_write(data_points, opts \\ [log: false]) do
end

defmodule Mymodule.InfluxReplicaConnection do
  use Instream.Connection, otp_app: :my_app
  def safe_write(data_points, opts \\ [log: false]) do
end

issues after calling these two function

iex(4)> Mymodule.InfluxConnection.safe_write(data) → this is writing in database: “price_service”,(good)
iex(4)> Mymodule.InfluxReplicaConnection.safe_write(data) → this is also writing in this is writing in database: “price_service”, but i want this should write in this is writing in database: “price_service_replica”,

seems like my InfluxReplicaConnection module is picking the first config as default, what should i do so that my InfluxReplicaConnection module pick second config??

Help me

The database was getting inferred from here

defmodule IndexSeries do 
  use Instream.Series
  series do
    database    "price_service"
    measurement "prices"

for a separate host, i think replica connection will work