produceTopicMessage :: ToJSON a => TopicName -> Message a -> WithConn ()
produceTopicMessage topic msg = ask >>= \conn ->
  let exchangeName = ExchangeName $ Config.getExchangeName (getConfig conn)
      message      = buildMessage msg
      channel      = getChannel conn
  in liftIO $ publishMessage channel exchangeName topic message
produceTopicMessage :: ToJSON a => TopicName -> Message a -> WithConn ()
produceTopicMessage topic msg = ask >>= \conn ->
  let exchangeName = ExchangeName $ Config.getExchangeName (getConfig conn)
      message      = buildMessage msg
      channel      = getChannel conn
  in liftIO $ publishMessage channel exchangeName topic message
produceTopicMessage topic msg = ask >>= \conn ->
  let exchangeName = ExchangeName $ Config.getExchangeName (getConfig conn)
      message      = buildMessage msg
      channel      = getChannel conn
  in liftIO $ publishMessage channel exchangeName topic message