Conduit SQS subscriber implementation not calling my callback

Good afternoon peoples.

I’m here with the conduct-sqs subscriber implementation.
He’s not calling my callback.

My setup is broken like this:

configure do
	queue System.get_env("AWS_SQS_NAME_QUEUE")

incoming MyappWebQueue do
	subscribe :message, GenSubscriber, from: System.get_env("AWS_SQS_NAME_QUEUE")

Implements MyappWebQueue.

defmodule MyappWebQueue.GenSubscriber do
  use Conduit.Subscriber
  require Logger

  def process(message, _opts) do
    # Code to process the message

What am I doing wrong?

The System.get_env/1 calls are going to be executed at compile time rather than runtime the way you’re doing it. Pass a function instead.

configure do
  queue fn -> System.get_env(“AWS_SQS_NAME_QUEUE”) end

incoming MyappWebQueue do
  subscribe :message, GenSubscriber, from: fn -> System.get_env(“AWS_SQS_NAME_QUEUE”) end

Thanks for the information. But it did not work the envs are listing in that context.

I m:

What do your logs say?

EDIT: You don’t appear to be using the logger that comes with conduit. Set this up and it’ll likely be more obvious something is going wrong.

Also, the following is going to raise an exception. You should be calling inspect/1 on the message before sending it to logger.

Take a look at this: