Skip to content
This repository has been archived by the owner on Jun 17, 2024. It is now read-only.

Update out_rabbitmq.go #5

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion out_rabbitmq.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ func FLBPluginInit(plugin unsafe.Pointer) int {

host := output.FLBPluginConfigKey(plugin, "RabbitHost")
port := output.FLBPluginConfigKey(plugin, "RabbitPort")
vhost := output.FLBPluginConfigKey(plugin, "RabbitVHost")
user := output.FLBPluginConfigKey(plugin, "RabbitUser")
password := output.FLBPluginConfigKey(plugin, "RabbitPassword")
exchangeName = output.FLBPluginConfigKey(plugin, "ExchangeName")
Expand Down Expand Up @@ -74,7 +75,7 @@ func FLBPluginInit(plugin unsafe.Pointer) int {
return output.FLB_ERROR
}

connection, err = amqp.Dial("amqp://" + user + ":" + password + "@" + host + ":" + port + "/")
connection, err = amqp.Dial("amqp://" + user + ":" + password + "@" + host + ":" + port + "/"+ vhost)
if err != nil {
logError("Failed to establish a connection to RabbitMQ: ", err)
return output.FLB_ERROR
Expand Down