command
Version:
v0.1.1
Opens a new window with list of versions in this module.
Published: Mar 5, 2021
License: Apache-2.0
Opens a new window with license information.
Imports: 4
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
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
¶
There is no documentation for this package.
Source Files
¶
Click to show internal directories.
Click to hide internal directories.