producer

command
v0.1.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 5, 2021 License: Apache-2.0 Imports: 4 Imported by: 0

README

RabbitMQ producer

Run a producer and publish a message contains the word "test".

Environment

Copy/Rename .env.example to .env
Change the values of the variables to your need in .env file.

Run

Open your terminal in this current path, then run

go run rabbitmq-producer.go

Methods

1- NewInstance

  • Stablish a connection with RabbitMq in pkg using the variables from .env file.

2- NewQueuePublisher

  • Opens a unique, concurrent server channel to process the bulk of AMQP messages.
  • Declares an exchange on the server.

3- PublishMessage

  • Sends a Publishing from the client to an exchange on the server.

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL