corvus-ch / rabbitmq-cli-consumer

Consume RabbitMQ messages into any cli program
MIT License
236 stars 36 forks source link

Failed parsing configuration: invalid variable: section "rabbitmq" subsection "" variable "amqpurl" #30

Closed grekpg closed 6 years ago

grekpg commented 6 years ago

config file:

 [rabbitmq]
#./rabbitmq-cli-consumer --verbose --executable command.php --configuration cli-consumer.conf 
# The url used to connect with RabbitMQ.
#
# If the consumer is started with the option --url or the environment variable
# AMQP_URL set, then this value set in the config file will be ignored.
#amqpurl = amqp://guest:guest@localhost:5672/myvhost
amqpurl = amqp://localhost

# The hostname of the RabbitMQ service.
#
# Will be ignored of amqpurl is set.
host = localhost

# The username used to authenticate with RabbitMq.
#
# Will be ignored of amqpurl is set.
username = root

# The password used to authenticate with RabbitMq.
#
# Will be ignored of amqpurl is set.
password = 123

# The vhost used when connecting with RabbitMq.
#
# Will be ignored of amqpurl is set.
vhost = /

# The port of the RabbitMQ service.
#
# Will be ignored of amqpurl is set.
port = 5672

# The queue to consume messages from.
#
# If the consumer is started with the --queue option set, this value will be
# ignored.
queue = ppm-parse

# Whether or not to compress the message passed to the script.
#
# Defaults to Off.
compression = Off

# Define the acknowledgment method used when the executable exits with an error
# and the --strict-exit-code option is not set.
#
# Defaults to 6.
onfailure = 3

# It's possible to configure the prefetch count and if you want set it as
# global.
[prefetch]
# Sets the prefetch count
#
# Defaults to 3.
count = 3

# Makes the prefetch count global.
# Defaults to Off.
global = On

# It's also possible to configure the exchange and its options. When left out
# in the configuration file, the default exchange will be used.
[exchange]
# The name of the exchange
name = mail

# The exchange type.
#
# Common types are "direct", "fanout", "topic" and "headers".
# Defaults to "direct".
type = direct

# Mark the exchange to be auto deleted.
#
# Defaults to Off
autodelete = On

# Mark the exchange to be durable.
#
# Defaults to Off.
durable = On

# Settings used to bind the queue with the exchange and other queue related
# settings.
[queuesettings]
# The routing key used to determine if a message send to the above configured
# exchange will be routed to the queue. Multiple routing keys can be configured.
routingkey = somekey
routingkey = anotherkey

# The default TTL of a message in the queue.
#
# If not set, the messages will never expire.
messagettl = 30000

# Exchange where message are sent when rejected and or the TTL expires.
deadLetterExchange = someexchange

# The routing key used when sending a message to the dead letter exchange.
deadLetterroutingkey = someroutingkey

# The priority range for this queue.
priority = 10

[logs]
# Path to the log file where informational output is written to
# #
# If not set, now log file will be written. Use the --verbose option to capture
# the output from the parent process.
info = /tmp/info.log

# Path to the log file where error output is written to
# #
# If not set, now log file will be written. Use the --verbose option to capture
# the output from the parent process.
error = error.log

run: ./rabbitmq-cli-consumer --verbose --executable command.php --configuration cli-consumer.conf

give

2018/03/04 09:22:17 Failed parsing configuration: invalid variable: section "rabbitmq" subsection "" variable "amqpurl"

grekpg commented 6 years ago

close - i use old rabbitmq-cli-consumer - https://github.com/ricbra/rabbitmq-cli-consumer this is possible to run this from binary file in my enviroment.