Specifying queue name in SQS send_message
Closed this issue · 2 comments
How I can specify my queue name in the url of the request?
I couldn't find the parameter that accepts the queue name in the method.
https://hexdocs.pm/aws/AWS.SQS.html#send_message/3
send_message(client, input, options \\ [])
client = AWS.Client.create("access_key", "client_secret", "us-east-1")
msg = %{
"MessageBody" => Jason.encode!(%{some_key: "message"})
}
# Where to put queue_name?
client |> AWS.SQS.send_message(msg)
Its sending POST to https://sqs.us-east-1.amazonaws.com:443/
. Instead we need to send it to the queue url.
https://sqs.us-east-1.amazonaws.com:443/account_number/queue_name
Hi @justcoding121 👋
According to the official guides, the queue is set by the QueueUrl
parameter, which is the URL you mentioned.
See: https://docs.aws.amazon.com/AWSSimpleQueueService/latest/APIReference/API_SendMessage.html
Please feel free to re-open if this doesn't work. :)
Thanks! that worked.
I was looking at a different documentation, which shows queue name in the url.