I am trying to consume messages from my ActiveMQ broker using the AMQP plugin but it’s giving an error that it’s not able to connect to the broker.
Below I have given my telegraf configuration
[[inputs.amqp_consumer]]
url = "amqp+ssl://URL:5671"
## Authentication credentials for the PLAIN auth_method.
username = "username"
password = "password"
## Name of the exchange to declare. If unset, no exchange will be declared.
exchange = "telegraf"
## AMQP queue name.
queue = "queue_name"
## AMQP queue durability can be "transient" or "durable".
queue_durability = "durable"
## If true, queue will be passively declared.
# queue_passive = false
binding_key = "#"
data_format = "influx"
I want to consume the message from the queue not from the topic so I am using this plugin
Telegraf MQTT plugin gives the option to consume messages from topics, not from the queue.
Is there any way I can consume messages from the queue instead of the topic using the MQTT or AMQP plugin?
I have two questions as well.
The first one can we consume messages using the AMQP plugin from ActiveMQ broker
The second is there any plugin that can consume the data from the ActiveMQ queue instead of the topic?
Per the README the URL option is deprecated and you should try the brokers option as well. They are essentially the same thing, with brokers being an array, but in the future, the URL option will disappear.
This error message is essentially saying we could not connect to any of the URLs you provided. I would ensure that your connection string format is correct for your setup and configuration.
I would also enable debug mode to get one additional message that might give more details.
Without knowing more about your configuration or the setup of your amqp I am at a bit of a loss. Can you verify the connection string you are using? Have you tried it without the +ssl, are you sure there isn’t an ending like /metrics missing?
I have tried without +ssl. I am using AWS ActiveMQ so that’s why I can’t provide the exact URL.
I am putting this URL brokers = ["amqp+ssl://AWS Active MQ URL:5671"]. Nothing in starting and nothing after URL no /metrics.
Do I have to put /metrics at the end?
Per the AWS docs it looks like your connection string is correct.
Given this is in AWS, one of the most common issues is not having your VPC or network settings configured correctly to allow incoming connections. That is what I would go and verify test.